mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
refactor some softswitch query routines to C
This commit is contained in:
parent
cb387f21dc
commit
400364b739
@ -152,42 +152,6 @@
|
||||
return80: movb $0x80,%al
|
||||
ret
|
||||
|
||||
E(iie_check_text)
|
||||
testl $SS_TEXT, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_check_mixed)
|
||||
testl $SS_MIXED, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_check_page2)
|
||||
testl $SS_PAGE2, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_check_hires)
|
||||
testl $SS_HIRES, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_check_bank)
|
||||
testl $SS_BANK2, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
E(iie_check_lcram)
|
||||
testl $SS_LCRAM, SN(softswitches)
|
||||
jnz return80
|
||||
xorb %al, %al
|
||||
ret
|
||||
|
||||
/* HACK not doing anything... */
|
||||
E(iie_check_vbl)
|
||||
ret
|
||||
|
33
src/vm.c
33
src/vm.c
@ -113,6 +113,11 @@ GLUE_C_READ(iie_page2_on)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_page2)
|
||||
{
|
||||
return (softswitches & SS_PAGE2) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_graphics)
|
||||
{
|
||||
if (softswitches & SS_TEXT) {
|
||||
@ -131,6 +136,11 @@ GLUE_C_READ(read_switch_text)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_text)
|
||||
{
|
||||
return (softswitches & SS_TEXT) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(read_switch_no_mixed)
|
||||
{
|
||||
if (softswitches & SS_MIXED) {
|
||||
@ -149,6 +159,11 @@ GLUE_C_READ(read_switch_mixed)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_mixed)
|
||||
{
|
||||
return (softswitches & SS_MIXED) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_hires_off)
|
||||
{
|
||||
if (!(softswitches & SS_HIRES)) {
|
||||
@ -197,6 +212,11 @@ GLUE_C_READ(iie_hires_on)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_hires)
|
||||
{
|
||||
return (softswitches & SS_HIRES) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// GC softswitches : Game Controller (joystick/paddles)
|
||||
#define JOY_STEP_USEC (3300.0 / 256.0)
|
||||
@ -268,6 +288,9 @@ GLUE_C_READ(iie_read_gc3)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// LC : language card routines
|
||||
|
||||
static inline void _lc_to_auxmem() {
|
||||
if (softswitches & SS_LCRAM) {
|
||||
base_d000_rd += 0x2000;
|
||||
@ -419,6 +442,16 @@ GLUE_C_READ(iie_c08b)
|
||||
return 0x0;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_bank)
|
||||
{
|
||||
return (softswitches & SS_BANK2) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
GLUE_C_READ(iie_check_lcram)
|
||||
{
|
||||
return (softswitches & SS_LCRAM) ? 0x80 : 0x00;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Misc //e softswitches and vm routines
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user