mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
refactor TEXT and MIXED switches to C
This commit is contained in:
parent
8b00636f66
commit
2600c13723
@ -149,34 +149,6 @@
|
||||
enabled.
|
||||
----------------------------------------------------------------- */
|
||||
|
||||
E(read_switch_graphics)
|
||||
testl $SS_TEXT, SN(softswitches)
|
||||
jz ram_nop
|
||||
andl $~SS_TEXT, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(read_switch_text)
|
||||
testl $SS_TEXT, SN(softswitches)
|
||||
jnz ram_nop
|
||||
orl $SS_TEXT, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(read_switch_no_mixed)
|
||||
testl $SS_MIXED, SN(softswitches)
|
||||
jz ram_nop
|
||||
andl $~SS_MIXED, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(read_switch_mixed)
|
||||
testl $SS_MIXED, SN(softswitches)
|
||||
jnz ram_nop
|
||||
orl $SS_MIXED, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
/* HIRES off. use RAMRD/RAMWRT offsets for hires page 1. */
|
||||
E(iie_hires_off)
|
||||
testl $SS_HIRES, SN(softswitches) # already off?
|
||||
|
36
src/vm.c
36
src/vm.c
@ -113,3 +113,39 @@ GLUE_C_READ(iie_page2_on)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_graphics)
|
||||
{
|
||||
if (softswitches & SS_TEXT) {
|
||||
softswitches &= ~SS_TEXT;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_text)
|
||||
{
|
||||
if (!(softswitches & SS_TEXT)) {
|
||||
softswitches |= SS_TEXT;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_no_mixed)
|
||||
{
|
||||
if (softswitches & SS_MIXED) {
|
||||
softswitches &= ~SS_MIXED;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_mixed)
|
||||
{
|
||||
if (!(softswitches & SS_MIXED)) {
|
||||
softswitches |= SS_MIXED;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user