From 895173911d8b1b14cba904751df70bf41f6d3a80 Mon Sep 17 00:00:00 2001 From: kwyxz Date: Thu, 9 Feb 2023 06:14:43 +0000 Subject: [PATCH 1/2] Restore build on POSIX systems like Haiku --- src/boards/468.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/boards/468.c b/src/boards/468.c index 9e89e0c..84acfa2 100644 --- a/src/boards/468.c +++ b/src/boards/468.c @@ -52,7 +52,7 @@ #include "state.h" static uint8 submapper; -static uint8 eeprom[16], clock, state, command, output; /* Some strange serial EEPROM */ +static uint8 eeprom[16], eep_clock, state, command, output; /* Some strange serial EEPROM */ static uint8 *WRAM; static uint32 WRAMSIZE; @@ -95,7 +95,7 @@ static SFORMAT stateRegs[] = { { &prgOR, 2, "SUP4" }, { &prgAND, 1, "SUP5" }, { eeprom, 16,"EEPR" }, - { &clock, 1, "EEP0" }, + { &eep_clock, 1, "EEP0" }, { &state, 1, "EEP1" }, { &command, 1, "EEP2" }, { &output, 1, "EEP3" }, @@ -124,7 +124,7 @@ void setPins(uint8 select, uint8 newClock, uint8 newData) { /* Serial EEPROM */ if (select) state =0; else - if (!clock && !!newClock) { + if (!eep_clock && !!newClock) { if (state <8) { command =command <<1 | !!(newData)*1; if (++state ==8 && (command &0xF0) !=0x50 && (command &0xF0) !=0xA0) state =0; @@ -142,7 +142,7 @@ void setPins(uint8 select, uint8 newClock, uint8 newData) { /* Serial EEPROM */ if (++state ==16) state =0; } } - clock =newClock; + eep_clock =newClock; } static DECLFR(readReg); @@ -235,7 +235,7 @@ static void reset(void) { misc =0; misc2 =0; prgOR =0x7FF0; - clock =command =output =1; + eep_clock =command =output =1; command =state =0; setMapper(1); } From 4c35c830d0670cf27342cfc23bcdcfdc795d89f5 Mon Sep 17 00:00:00 2001 From: kwyxz Date: Thu, 9 Feb 2023 06:18:06 +0000 Subject: [PATCH 2/2] Cosmetic --- src/boards/468.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boards/468.c b/src/boards/468.c index 84acfa2..a6ba217 100644 --- a/src/boards/468.c +++ b/src/boards/468.c @@ -95,7 +95,7 @@ static SFORMAT stateRegs[] = { { &prgOR, 2, "SUP4" }, { &prgAND, 1, "SUP5" }, { eeprom, 16,"EEPR" }, - { &eep_clock, 1, "EEP0" }, + { &eep_clock, 1, "EEP0" }, { &state, 1, "EEP1" }, { &command, 1, "EEP2" }, { &output, 1, "EEP3" },