mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-15 16:07:09 +00:00
refactor 80COL switch to C
This commit is contained in:
parent
a206fc06b8
commit
e6c582bab6
@ -152,28 +152,6 @@
|
||||
return80: movb $0x80,%al
|
||||
ret
|
||||
|
||||
E(iie_80col_off)
|
||||
testl $SS_80COL, SN(softswitches)
|
||||
jz ram_nop
|
||||
andl $~SS_80COL, SN(softswitches)
|
||||
testl $(SS_TEXT|SS_MIXED|SS_DHIRES), SN(softswitches)
|
||||
jnz SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(iie_80col_on)
|
||||
testl $SS_80COL, SN(softswitches)
|
||||
jnz ram_nop
|
||||
orl $SS_80COL, SN(softswitches)
|
||||
testl $(SS_TEXT|SS_MIXED|SS_DHIRES), SN(softswitches)
|
||||
jnz SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(iie_check_80col)
|
||||
testl $SS_80COL, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_altchar_off)
|
||||
testl $SS_ALTCHAR, SN(softswitches)
|
||||
jz ram_nop
|
||||
|
35
src/vm.c
35
src/vm.c
@ -638,3 +638,38 @@ GLUE_C_READ(iie_check_altzp)
|
||||
return (softswitches & SS_ALTZP) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_80col_off)
|
||||
{
|
||||
if (!(softswitches & SS_80COL)) {
|
||||
return 0x0; // TODO: no early return?
|
||||
}
|
||||
|
||||
softswitches &= ~SS_80COL;
|
||||
|
||||
if (softswitches & (SS_TEXT|SS_MIXED|SS_DHIRES)) {
|
||||
video_redraw();
|
||||
}
|
||||
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_80col_on)
|
||||
{
|
||||
if (softswitches & SS_80COL) {
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
softswitches |= SS_80COL;
|
||||
|
||||
if (softswitches & (SS_TEXT|SS_MIXED|SS_DHIRES)) {
|
||||
video_redraw();
|
||||
}
|
||||
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_80col)
|
||||
{
|
||||
return (softswitches & SS_80COL) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user