From 43ccdf7699a5415a37c4426db1bcc0f3c68fc00f Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 12 Sep 2023 17:31:18 +0200 Subject: [PATCH] hp48_device.c was mostly GUI code --- Makefile | 2 +- src/hp48.h | 11 ----------- src/hp48_emulate.c | 6 ++++++ src/x48.h | 13 +++++++++++++ src/{hp48_device.c => x48_lcd.c} | 6 ------ 5 files changed, 20 insertions(+), 18 deletions(-) rename src/{hp48_device.c => x48_lcd.c} (99%) diff --git a/Makefile b/Makefile index 7a20e7a..abc5fef 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ ifeq ($(FULL_WARNINGS), yes) endif DOTOS = src/main.o \ - src/hp48_device.o \ + src/x48_lcd.o \ src/hp48_emulate.o \ src/hp48_init.o \ src/hp48_serial.o \ diff --git a/src/hp48.h b/src/hp48.h index 5b597c4..2c3a142 100644 --- a/src/hp48.h +++ b/src/hp48.h @@ -303,15 +303,4 @@ extern int read_files( void ); /* hp48_init.c */ extern int write_files( void ); /* hp48_init.c */ extern void load_addr( word_20* dat, long addr, int n ); /* hp48_emulate.c */ - -/* #ifndef _DEVICE_H */ -/* #define _DEVICE_H 1 */ -extern void init_display( void ); /* hp48_device.c */ -extern void update_display( void ); /* hp48_device.c */ -extern void redraw_display( void ); /* hp48_device.c */ -extern void disp_draw_nibble( word_20 addr, word_4 val ); /* hp48_device.c */ -extern void menu_draw_nibble( word_20 addr, word_4 val ); /* hp48_device.c */ -extern void draw_annunc( void ); /* hp48_device.c */ -extern void redraw_annunc( void ); /* hp48_device.c */ -/* #endif /\* !_DEVICE_H *\/ */ #endif /* !_HP48_H */ diff --git a/src/hp48_emulate.c b/src/hp48_emulate.c index 44860d2..b3ce523 100644 --- a/src/hp48_emulate.c +++ b/src/hp48_emulate.c @@ -57,6 +57,12 @@ word_64 run; static word_20 jumpmasks[] = { 0xffffffff, 0xfffffff0, 0xffffff00, 0xfffff000, 0xffff0000, 0xfff00000, 0xff000000, 0xf0000000 }; +saturn_t saturn; + +extern int device_check; + +device_t device; + int decode_group_80( void ) { int t, op3, op4, op5, op6; unsigned char* REG; diff --git a/src/x48.h b/src/x48.h index 85b9c9b..5dcd199 100644 --- a/src/x48.h +++ b/src/x48.h @@ -1,6 +1,8 @@ #ifndef _X48_GUI_H #define _X48_GUI_H 1 +#include "hp48.h" /* word_20, word_4 */ + #if defined( GUI_IS_X11 ) #include #include @@ -1290,6 +1292,17 @@ extern void ShowConnections( char* w, char* i ); extern void exit_x48( int tell_x11 ); +/* #ifndef _DEVICE_H */ +/* #define _DEVICE_H 1 */ +extern void init_display( void ); /* x48_lcd.c */ +extern void update_display( void ); /* x48_lcd.c */ +extern void redraw_display( void ); /* x48_lcd.c */ +extern void disp_draw_nibble( word_20 addr, word_4 val ); /* x48_lcd.c */ +extern void menu_draw_nibble( word_20 addr, word_4 val ); /* x48_lcd.c */ +extern void draw_annunc( void ); /* x48_lcd.c */ +extern void redraw_annunc( void ); /* x48_lcd.c */ +/* #endif /\* !_DEVICE_H *\/ */ + #if defined( GUI_IS_X11 ) extern int InitDisplay( int argc, char** argv ); diff --git a/src/hp48_device.c b/src/x48_lcd.c similarity index 99% rename from src/hp48_device.c rename to src/x48_lcd.c index 9068e3e..2d69e93 100644 --- a/src/hp48_device.c +++ b/src/x48_lcd.c @@ -13,12 +13,6 @@ #include "timer.h" #include "x48.h" /* adjust_contrast(); ann_struct_t; DISP_ROWS; NIBS_PER_BUFFER_ROW */ -saturn_t saturn; - -extern int device_check; - -device_t device; - /*******/ /* LCD */ /*******/