Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger DISK INFO QoL #1212

Merged
merged 19 commits into from Apr 28, 2023
Merged

Debugger DISK INFO QoL #1212

merged 19 commits into from Apr 28, 2023

Conversation

Michaelangel007
Copy link
Contributor

The debugger's DISK INFO was lacking readability. Small QoL patch.

Repro:

<F7>
BPX C65E
<F7>
Boot any .woz (floppy) disk
DISK INFO

Before:
disk_info_before

After:
disk_info_after

Also alphabetized the DiskGetCurrent*() helper functions.

@Michaelangel007
Copy link
Contributor Author

Michaelangel007 commented Apr 15, 2023

@tomcw The last number is the Shift Register. Would it make more sense to display this with the shift operator as a visual mnemonic? i.e.

Reading << 03

@tomcw
Copy link
Contributor

tomcw commented Apr 23, 2023

  1. I prefer leaving the text as "bitOffset" (instead of just "Offset"), otherwise it's ambiguous (ie. is it a byte or bit offset?)

@tomcw
Copy link
Contributor

tomcw commented Apr 23, 2023

  1. If you look at the strings that Disk2InterfaceCard::GetCurrentState() can return, then I think it's only useful to return the shift register for Writing and Reading states.

  2. Would it make more sense to display this with the shift operator as a visual mnemonic? i.e. Reading << 03

Probably fine as-is (so without the "<<" operator).

  1. You have done work in another PR to truncate the line at 78 chars. But Disk2InterfaceCard::GetCurrentState() can return these longer strings: Off (spinning) and Writing (write protected). Worth checking what the line looks like for these 2 cases.

@Michaelangel007
Copy link
Contributor Author

Michaelangel007 commented Apr 25, 2023

  • Restored full label bitOffset,
  • Split the disk status string into a 2nd line (which I'm not really happy with) but it is always guaranteed to fit now,
  • Fixed ConsolePrint() to split long width text lines (not needed but future proof),
  • Colorized the disk status string based reading, writing, write-protected,
  • Added 3 shift symbols:
    • << reading
    • >> writing
    • >| write protected
  • Lastly, mirrored m_shiftReg for non .WOZ disks so you can see the last nibble read/wrote.

image

@Michaelangel007
Copy link
Contributor Author

@tomcw Made another pass. I'm pretty happy with this now. I would have preferred a "short" disk status string to fit on one line but I'll live with a descriptive 2-line output since the colorized output is way nicer to read now.

source/Disk.cpp Outdated Show resolved Hide resolved
@Michaelangel007
Copy link
Contributor Author

Michaelangel007 commented Apr 27, 2023

  • Refactored output to be cleaner and table driven.
  • Added undocumented support for 1 line output. Will add CONFIG DISK # in future work. Currently defaults to two lines.

Example of single line output:

disk_info_one_line

Default 2 lines: (Indented two spaces to improve readability)
disk_info_after_2

@Michaelangel007
Copy link
Contributor Author

Michaelangel007 commented Apr 27, 2023

We have the best of both worlds now.

Overloaded the DISK INFO command to show disk information. Use DISK INFO 1 to switch to 1-line output, or use DISK INFO 2 to switch to 2-line output (default).

Also flushed out a bug with ConsolePrint() not correctly wrapping text with \n.

@tomcw
Copy link
Contributor

tomcw commented Apr 27, 2023

Personally I think just pick one, since this is a pretty obscure thing to want to configure - especially since there's no help for DISK from either the debugger (eg. HELP DISK) or the AppleWin.chm.

I'd suggest just going with the single line DISK INFO.

@Michaelangel007
Copy link
Contributor Author

Should be good to go now.

source/Windows/WinFrame.cpp Outdated Show resolved Hide resolved
@tomcw tomcw merged commit e1b0b20 into master Apr 28, 2023
@tomcw
Copy link
Contributor

tomcw commented Apr 28, 2023

Thanks Michael. I've merged it into the main line now.
(I meant to remove some of the minor commit comments, but hit the "Commit" button accidentally!)

@tomcw tomcw deleted the debugger_disk_info_qol branch April 28, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants