Jumper reading for Analog GS

This commit is contained in:
David Kuder 2023-05-02 15:04:36 -04:00
parent 0185620ff5
commit d8ef103650
4 changed files with 13 additions and 0 deletions

View File

@ -11,6 +11,8 @@ volatile uint32_t busactive = 0;
volatile uint8_t __attribute__((section (".appledata."))) apple_memory[64*1024];
volatile uint8_t __attribute__((section (".appledata."))) private_memory[64*1024];
volatile uint8_t jumpers = 0;
#ifdef FUNCTION_VGA
volatile uint8_t *text_p1 = apple_memory + 0x0400;
volatile uint8_t *text_p2 = apple_memory + 0x0800;

View File

@ -16,6 +16,8 @@ extern volatile uint8_t cfbuf[4096];
#define config_cmdbuf ((uint8_t*)(apple_memory+0xC0F0+(cardslot<<8)))
#define config_rpybuf ((uint8_t*)(apple_memory+0xC0F8+(cardslot<<8)))
extern volatile uint8_t jumpers;
#ifdef FUNCTION_VGA
extern volatile uint8_t *text_p1;
extern volatile uint8_t *text_p2;

View File

@ -808,6 +808,12 @@ void DELAYED_COPY_CODE(config_handler)() {
config_rpybuf[rs++] = HWREV; // '1'
break;
case 'j':
// Read jumpers
retval = REPLY_OK;
config_rpybuf[rs++] = jumpers;
break;
case 'd':
// Identify Date Request
retval = REPLY_OK;

View File

@ -35,6 +35,9 @@ static void __noinline __time_critical_func(core1_loop)() {
}
}
#ifdef ANALOG_GS
jumpers = (value >> 26) & 0x3f;
#endif
busactive = 1;
if(CARD_SELECT) {