Skip to content

Commit

Permalink
Ensure DHIRES mode is exited when exiting to BASIC
Browse files Browse the repository at this point in the history
Recent MAME with Video-7 seems to get into a weird state when exiting
to BASIC e.g. running a program, since AN3 is not fully reset. Do it!
  • Loading branch information
inexorabletash committed Jan 17, 2025
1 parent b349e99 commit a23507a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Project Page: https://github.com/a2stuff/a2d
* Ensure the modification date for copied folders matches the original.
* Prompt to re-insert system disk when launching Apple Menu items.
* Add Text-to-Speech file type ($D9) and icon.
* Ensure DHIRES mode is exited when exiting to BASIC.

### Selector

Expand Down
1 change: 1 addition & 0 deletions desktop/main.s
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,7 @@ ResetHandler := CmdQuitImpl::ResetHandler
sta ALTZPON
jsr SetColorMode ; depends on state in Aux LC
sta CLR80VID ; back off, after `SetColorMode` call
sta DHIRESOFF
sta ALTZPOFF
bit ROMIN2

Expand Down
2 changes: 2 additions & 0 deletions res/notes/testplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,8 @@ The following tests all require:

* On an RGB system (IIgs, etc), go to Control Panel, check RGB Color. Verify that the display shows in color. Preview an image, and verify that the image shows in color and the DeskTop remains in color after exiting.
* On an RGB system (IIgs, etc), go to Control Panel, uncheck RGB Color. Verify that the display shows in monochrome. Preview an image, and verify that the image shows in color and the DeskTop returns to monochrome after exiting.
* Using MAME (e.g. via Ample), configure a system with Machine Configuration > Monitor Type > Video-7 RGB. Start DeskTop. Open a window. Apple Menu > Run Basic Here. Type `HGR : HCOLOR=3 : HPLOT 0,0 TO 100,100`. Verify a diagonal line appears.


### Z80 Card

Expand Down
1 change: 1 addition & 0 deletions selector/app.s
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ noop: rts
;; Switch back to color DHR mode
jsr SetColorMode
sta CLR80VID ; back off, after `SetColorMode` call
sta DHIRESOFF

rts
.endproc ; RestoreTextMode
Expand Down

0 comments on commit a23507a

Please sign in to comment.