mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-06-26 00:29:27 +00:00
refactor DHIRES,IOUDIS switches to C
This commit is contained in:
parent
2932c6b832
commit
cb387f21dc
|
@ -152,45 +152,6 @@
|
|||
return80: movb $0x80,%al
|
||||
ret
|
||||
|
||||
/* unset ioudis flag and read_gc_strobe */
|
||||
E(iie_ioudis_off)
|
||||
andl $~SS_IOUDIS, SN(softswitches)
|
||||
jmp SN(read_gc_strobe)
|
||||
|
||||
/* set ioudis flag and read_gc_strobe */
|
||||
E(iie_ioudis_on)
|
||||
orl $SS_IOUDIS, SN(softswitches)
|
||||
jmp SN(read_gc_strobe)
|
||||
|
||||
/* check ioudis flag and read_gc_strobe */
|
||||
E(iie_check_ioudis)
|
||||
call SN(read_gc_strobe)
|
||||
testl $SS_IOUDIS, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_dhires_on)
|
||||
testl $SS_DHIRES, SN(softswitches)
|
||||
jnz ram_nop
|
||||
orl $SS_DHIRES, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
E(iie_dhires_off)
|
||||
testl $SS_DHIRES, SN(softswitches)
|
||||
jz ram_nop
|
||||
andl $~SS_DHIRES, SN(softswitches)
|
||||
call SN(video_redraw)
|
||||
ret
|
||||
|
||||
/* check dhires flag and read_gc_strobe */
|
||||
E(iie_check_dhires)
|
||||
call SN(read_gc_strobe)
|
||||
testl $SS_DHIRES, SN(softswitches)
|
||||
jnz return80
|
||||
ret
|
||||
|
||||
E(iie_check_text)
|
||||
testl $SS_TEXT, SN(softswitches)
|
||||
jnz return80
|
||||
|
|
44
src/vm.c
44
src/vm.c
|
@ -696,3 +696,47 @@ GLUE_C_READ(iie_check_altchar)
|
|||
return (softswitches & SS_ALTCHAR) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_ioudis_off)
|
||||
{
|
||||
softswitches &= ~SS_IOUDIS;
|
||||
return c_read_gc_strobe(ea);
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_ioudis_on)
|
||||
{
|
||||
softswitches |= SS_IOUDIS;
|
||||
return c_read_gc_strobe(ea);
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_ioudis)
|
||||
{
|
||||
c_read_gc_strobe(ea);
|
||||
return (softswitches & SS_IOUDIS) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_dhires_on)
|
||||
{
|
||||
// FIXME : does this depend on IOUDIS?
|
||||
if (!(softswitches & SS_DHIRES)) {
|
||||
softswitches |= SS_DHIRES;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_dhires_off)
|
||||
{
|
||||
// FIXME : does this depend on IOUDIS?
|
||||
if (softswitches & SS_DHIRES) {
|
||||
softswitches &= ~SS_DHIRES;
|
||||
video_redraw();
|
||||
}
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_dhires)
|
||||
{
|
||||
c_read_gc_strobe(ea); // HACK FIXME : is this correct?
|
||||
return (softswitches & SS_DHIRES) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user