From 98f0ecf59ea5df33f2c73fc311324f32f704c676 Mon Sep 17 00:00:00 2001 From: Ian C Date: Wed, 21 Feb 2007 01:14:21 +0000 Subject: Added config for RAM at 0x2000. Also interface in ZX81 to notice config changes. --- include/config.h | 1 + include/zx81.h | 4 ++++ source/config.c | 7 ++++++- source/main.c | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/config.h b/include/config.h index 82c0c4f..e2d96de 100644 --- a/include/config.h +++ b/include/config.h @@ -26,6 +26,7 @@ typedef enum { DS81_STICKY_SHIFT, DS81_AVERAGE_TOUCHSCREEN, + DS81_STATIC_RAM_AT_0x2000, DS81_NUM_CONFIG_ITEMS } DS81_ConfigItem; diff --git a/include/zx81.h b/include/zx81.h index 4050918..c50c1a4 100644 --- a/include/zx81.h +++ b/include/zx81.h @@ -51,6 +51,10 @@ void ZX81SetTape(const Z80Byte *image, int len); */ void ZX81Reset(Z80 *z80); +/* Tell the 81 that config may have changed. +*/ +void ZX81Reconfigure(void); + /* Displays a string on the ZX81's dislpay. The screen is cleared and the string displayed with \n characters breaking the line. diff --git a/source/config.c b/source/config.c index b2abec8..433b5d6 100644 --- a/source/config.c +++ b/source/config.c @@ -33,7 +33,8 @@ const char *conf_filename = "DS81.CFG"; const char *conf_entry[DS81_NUM_CONFIG_ITEMS]= { "sticky_shift", - "average_touchscreen" + "average_touchscreen", + "static_ram_at_0x2000", }; @@ -42,6 +43,7 @@ const char *conf_entry[DS81_NUM_CONFIG_ITEMS]= int DS81_Config[DS81_NUM_CONFIG_ITEMS]= { TRUE, + FALSE, FALSE }; @@ -123,6 +125,9 @@ const char *ConfigDesc(DS81_ConfigItem item) case DS81_AVERAGE_TOUCHSCREEN: return "AVERAGE TOUCHSCREEN"; + case DS81_STATIC_RAM_AT_0x2000: + return "RAM AT 8192"; + default: return "UNKNOWN"; } diff --git a/source/main.c b/source/main.c index f2b0e70..cfdf231 100644 --- a/source/main.c +++ b/source/main.c @@ -301,6 +301,7 @@ int main(int argc, char *argv[]) Splash(); LoadConfig(); + ZX81Reconfigure(); SK_DisplayKeyboard(BG_GFX_SUB); @@ -334,6 +335,7 @@ int main(int argc, char *argv[]) GUI_Config(); SK_SetSticky(SK_SHIFT, DS81_Config[DS81_STICKY_SHIFT]); + ZX81Reconfigure(); break; case MenuMapJoypad: -- cgit v1.2.3