From 4bff5c15b5d2de1be9de61ecfdaccabceee3b853 Mon Sep 17 00:00:00 2001 From: David Kuder Date: Thu, 4 May 2023 22:48:39 -0400 Subject: [PATCH] Misc tweaks --- common/build.h | 6 +++--- common/config.c | 16 ++++++++++++---- vga/businterface.c | 13 +++++++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/common/build.h b/common/build.h index 9e19a26..8ea86d5 100644 --- a/common/build.h +++ b/common/build.h @@ -1,6 +1,6 @@ -#define BUILDDATE 0x20230502 -#define BUILDID 0x0182 -#define BUILDSTR " 2 May 2023 Build 0182" +#define BUILDDATE 0x20230504 +#define BUILDID 0x0187 +#define BUILDSTR " 4 May 2023 Build 0187" #ifdef ANALOG_GS #define HWSTRING " V2 Analog GS Rev1" diff --git a/common/config.c b/common/config.c index 4ec8d8f..53d3f97 100644 --- a/common/config.c +++ b/common/config.c @@ -761,10 +761,18 @@ void DELAYED_COPY_CODE(config_handler)() { break; case 'R': - // Reboot and bypass auto-detection of machine type. - cfg_machine = current_machine; - write_config(true); - flash_reboot(); + switch(config_cmdbuf[1]) { + default: + retval = REPLY_ECMD; + break; + case 'b': + // Reboot and bypass auto-detection of machine type. + cfg_machine = current_machine; + read_config(); + write_config(true); + flash_reboot(); + break; + } break; case 'I': diff --git a/vga/businterface.c b/vga/businterface.c index 854793e..08f2599 100644 --- a/vga/businterface.c +++ b/vga/businterface.c @@ -55,9 +55,12 @@ void __time_critical_func(vga_businterface)(uint32_t address, uint32_t value) { return; } } + + // Nothing left to do for RAM accesses. + if(address < 0xc000) return; // Shadow the soft-switches by observing all read & write bus cycles - if((address & 0xff80) == 0xc000) { + if(address < 0xc080) { switch(address & 0x7f) { case 0x00: if((internal_flags & (IFLAGS_IIGS_REGS | IFLAGS_IIE_REGS)) && ACCESS_WRITE) { @@ -210,7 +213,7 @@ void __time_critical_func(vga_businterface)(uint32_t address, uint32_t value) { break; } } else if(romx_unlocked == 3) { - if((address & 0xFFF0) == 0xF810) { + if((address >> 4) == 0xF81) { romx_textbank = address & 0xF; } if(address == 0xF851) { @@ -237,10 +240,10 @@ void __time_critical_func(vga_businterface)(uint32_t address, uint32_t value) { break; } } else if(romx_unlocked == 3) { - if((address & 0xFFF0) == 0xCFD0) { + if((address >> 4) == 0xCFD) { romx_textbank = address & 0xF; } - if((address & 0xFFF0) == 0xCFE0) { + if((address >> 4) == 0xCFE) { romx_changed = 1; romx_unlocked = 0; } @@ -299,10 +302,12 @@ void __time_critical_func(vga_businterface)(uint32_t address, uint32_t value) { apple_memory[address] = (terminal_fifo_rdptr - terminal_fifo_wrptr); break; case 0x0B: +#if 0 if((value & 0xFF) <= 0x27) { romx_textbank = (value & 0xFF); romx_changed = 1; } +#endif break; case 0x0C: apple_memory[address] = value;