mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-28 15:31:15 +00:00
Do not return sync bytes if no image inserted
- This really should be backed by more testing or research =P
This commit is contained in:
parent
053a4c8c93
commit
39c09a042f
@ -527,9 +527,10 @@ static bool save_track_data(void) {
|
|||||||
|
|
||||||
GLUE_C_READ(disk_read_write_byte)
|
GLUE_C_READ(disk_read_write_byte)
|
||||||
{
|
{
|
||||||
uint8_t value = 0xFF;
|
uint8_t value = 0x00;
|
||||||
do {
|
do {
|
||||||
if (disk6.disk[disk6.drive].fp == NULL) {
|
if (disk6.disk[disk6.drive].fp == NULL) {
|
||||||
|
////ERRLOG_THROTTLE("OOPS, attempt to read byte from NULL image in drive (%d)", disk6.drive+1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ TEST test_read_null_bytes() {
|
|||||||
BOOT_TO_DOS();
|
BOOT_TO_DOS();
|
||||||
|
|
||||||
apple_ii_64k[0][WATCHPOINT_ADDR] = 0x00;
|
apple_ii_64k[0][WATCHPOINT_ADDR] = 0x00;
|
||||||
apple_ii_64k[0][TESTOUT_ADDR] = 0x00;
|
apple_ii_64k[0][TESTOUT_ADDR] = 0xAA;
|
||||||
|
|
||||||
ASM_INIT();
|
ASM_INIT();
|
||||||
ASM_TEST_DISK_READ_NULL();
|
ASM_TEST_DISK_READ_NULL();
|
||||||
@ -237,7 +237,7 @@ TEST test_read_null_bytes() {
|
|||||||
c_debugger_go();
|
c_debugger_go();
|
||||||
|
|
||||||
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
ASSERT(apple_ii_64k[0][WATCHPOINT_ADDR] == TEST_FINISHED);
|
||||||
ASSERT(apple_ii_64k[0][TESTOUT_ADDR] == 0xFF);
|
ASSERT(apple_ii_64k[0][TESTOUT_ADDR] == 0x00);
|
||||||
|
|
||||||
PASS();
|
PASS();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user