mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-11 14:30:08 +00:00
test language card C081 switch
This commit is contained in:
parent
30b80c1722
commit
05e1d88c37
@ -218,6 +218,43 @@ TEST test_read_random() {
|
||||
#define ASM_IIE_C080() \
|
||||
test_type_input(" STA $C080\r")
|
||||
|
||||
#define ASM_IIE_C081() \
|
||||
test_type_input(" STA $C081\r")
|
||||
|
||||
#define ASM_LC_C082() \
|
||||
test_type_input(" STA $C082\r")
|
||||
|
||||
#define ASM_IIE_C083() \
|
||||
test_type_input(" STA $C083\r")
|
||||
|
||||
#define ASM_IIE_C084() ASM_IIE_C080()
|
||||
|
||||
#define ASM_IIE_C085() ASM_IIE_C081()
|
||||
|
||||
#define ASM_LC_C086() ASM_LC_C082()
|
||||
|
||||
#define ASM_IIE_C087() ASM_IIE_C083()
|
||||
|
||||
#define ASM_IIE_C088() \
|
||||
test_type_input(" STA $C088\r")
|
||||
|
||||
#define ASM_IIE_C089() \
|
||||
test_type_input(" STA $C089\r")
|
||||
|
||||
#define ASM_LC_C08A() \
|
||||
test_type_input(" STA $C08A\r")
|
||||
|
||||
#define ASM_IIE_C08B() \
|
||||
test_type_input(" STA $C08B\r")
|
||||
|
||||
#define ASM_IIE_C08C() ASM_IIE_C088()
|
||||
|
||||
#define ASM_IIE_C08D() ASM_IIE_C089()
|
||||
|
||||
#define ASM_IIE_C08E() ASM_LC_C08A()
|
||||
|
||||
#define ASM_IIE_C08F() ASM_IIE_C08B()
|
||||
|
||||
#define TYPE_TRIGGER_WATCHPT() \
|
||||
test_type_input("POKE7987,255:REM TRIGGER DEBUGGER\r")
|
||||
|
||||
@ -799,6 +836,81 @@ TEST test_iie_c080(bool flag_altzp) {
|
||||
PASS();
|
||||
}
|
||||
|
||||
TEST test_iie_c081(bool flag_altzp, bool flag_lcsec) {
|
||||
BOOT_TO_DOS();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] != TEST_FINISHED);
|
||||
|
||||
ASM_INIT();
|
||||
if (flag_altzp) {
|
||||
ASM_ALTZP_ON();
|
||||
} else {
|
||||
ASM_ALTZP_OFF();
|
||||
}
|
||||
|
||||
if (!flag_lcsec) {
|
||||
ASM_IIE_C080(); // HACK NOTE : turns off SS_LCSEC
|
||||
} else {
|
||||
ASSERT((softswitches & SS_LCSEC));
|
||||
}
|
||||
|
||||
ASM_TRIGGER_WATCHPT();
|
||||
ASM_IIE_C081();
|
||||
ASM_TRIGGER_WATCHPT();
|
||||
ASM_DONE();
|
||||
|
||||
ASM_GO();
|
||||
c_debugger_go();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
||||
ASSERT(flag_altzp ? (softswitches & SS_ALTZP) : !(softswitches & SS_ALTZP) );
|
||||
ASSERT(flag_lcsec ? (softswitches & SS_LCSEC) : !(softswitches & SS_LCSEC) );
|
||||
|
||||
uint32_t switch_save = softswitches;
|
||||
uint8_t *save_base_textrd = base_textrd;
|
||||
uint8_t *save_base_textwrt = base_textwrt;
|
||||
uint8_t *save_base_hgrrd = base_hgrrd;
|
||||
uint8_t *save_base_hgrwrt = base_hgrwrt;
|
||||
uint8_t *save_base_d000_wrt = base_d000_wrt;
|
||||
uint8_t *save_base_e000_wrt = base_e000_wrt;
|
||||
int save_current_page = video__current_page;
|
||||
|
||||
apple_ii_64k[0][WATCHPOINT_ADDR] = 0x00;
|
||||
c_debugger_go();
|
||||
|
||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
||||
|
||||
switch_save = switch_save | (SS_LCSEC|SS_BANK2);
|
||||
switch_save = switch_save & ~SS_LCRAM;
|
||||
|
||||
ASSERT(video__current_page == save_current_page);
|
||||
ASSERT(base_textrd == save_base_textrd);
|
||||
ASSERT(base_textwrt == save_base_textwrt);
|
||||
ASSERT(base_hgrrd == save_base_hgrrd);
|
||||
ASSERT(base_hgrwrt == save_base_hgrwrt);
|
||||
|
||||
if (flag_lcsec) {
|
||||
switch_save = switch_save | SS_LCWRT;
|
||||
if (flag_altzp) {
|
||||
ASSERT((base_d000_wrt == language_banks[0]-0xB000));
|
||||
ASSERT((base_e000_wrt == language_card[0]-0xC000));
|
||||
} else {
|
||||
ASSERT((base_d000_wrt == language_banks[0]-0xD000));
|
||||
ASSERT((base_e000_wrt == language_card[0]-0xE000));
|
||||
}
|
||||
} else {
|
||||
ASSERT((base_d000_wrt == save_base_d000_wrt));
|
||||
ASSERT((base_e000_wrt == save_base_e000_wrt));
|
||||
}
|
||||
|
||||
ASSERT((base_d000_rd == apple_ii_64k[0]));
|
||||
ASSERT((base_e000_rd == apple_ii_64k[0]));
|
||||
|
||||
ASSERT((softswitches ^ switch_save) == 0);
|
||||
|
||||
PASS();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Test Suite
|
||||
|
||||
@ -855,6 +967,11 @@ GREATEST_SUITE(test_suite_vm) {
|
||||
RUN_TESTp(test_iie_c080, /*ALTZP*/0);
|
||||
RUN_TESTp(test_iie_c080, /*ALTZP*/1);
|
||||
|
||||
RUN_TESTp(test_iie_c081, /*ALTZP*/0, /*LCSEC*/0);
|
||||
RUN_TESTp(test_iie_c081, /*ALTZP*/0, /*LCSEC*/1);
|
||||
RUN_TESTp(test_iie_c081, /*ALTZP*/1, /*LCSEC*/0);
|
||||
RUN_TESTp(test_iie_c081, /*ALTZP*/1, /*LCSEC*/1);
|
||||
|
||||
// ...
|
||||
c_eject_6(0);
|
||||
pthread_mutex_unlock(&interface_mutex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user