merge device.h into hp48.h, rename device.c ⇒ hp48_device.c
This commit is contained in:
parent
1cb17dd969
commit
f935b26d27
11 changed files with 90 additions and 93 deletions
2
Makefile
2
Makefile
|
@ -41,7 +41,7 @@ dump2rom: src/tools/dump2rom.o
|
|||
checkrom: src/tools/checkrom.o src/romio.o
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
x48ng: src/main.o src/hp48emu_actions.o src/debugger.o src/device.o src/disasm.o src/hp48_emulate.o src/errors.o src/hp48_init.o src/hp48emu_memory.o src/hp48emu_register.o src/resources.o src/romio.o src/rpl.o src/hp48_serial.o src/timer.o src/x48.o src/resources.o
|
||||
x48ng: src/main.o src/hp48emu_actions.o src/debugger.o src/hp48_device.o src/disasm.o src/hp48_emulate.o src/errors.o src/hp48_init.o src/hp48emu_memory.o src/hp48emu_register.o src/resources.o src/romio.o src/rpl.o src/hp48_serial.o src/timer.o src/x48.o src/resources.o
|
||||
$(CC) $(CFLAGS) $(LIBS) $^ -o $@
|
||||
|
||||
# Cleaning
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <X11/Xlib.h>
|
||||
|
||||
#include "debugger.h"
|
||||
#include "device.h"
|
||||
#include "disasm.h"
|
||||
#include "hp48.h"
|
||||
#include "resources.h"
|
||||
|
|
81
src/device.h
81
src/device.h
|
@ -1,81 +0,0 @@
|
|||
#ifndef _DEVICE_H
|
||||
#define _DEVICE_H 1
|
||||
|
||||
#include "hp48.h"
|
||||
|
||||
#define DISP_INSTR_OFF 0x10
|
||||
|
||||
#define ANN_LEFT 0x81
|
||||
#define ANN_RIGHT 0x82
|
||||
#define ANN_ALPHA 0x84
|
||||
#define ANN_BATTERY 0x88
|
||||
#define ANN_BUSY 0x90
|
||||
#define ANN_IO 0xa0
|
||||
|
||||
typedef struct device_t {
|
||||
|
||||
int display_touched;
|
||||
|
||||
char contrast_touched;
|
||||
|
||||
char disp_test_touched;
|
||||
|
||||
char crc_touched;
|
||||
|
||||
char power_status_touched;
|
||||
char power_ctrl_touched;
|
||||
|
||||
char mode_touched;
|
||||
|
||||
char ann_touched;
|
||||
|
||||
char baud_touched;
|
||||
|
||||
char card_ctrl_touched;
|
||||
char card_status_touched;
|
||||
|
||||
char ioc_touched;
|
||||
|
||||
char tcs_touched;
|
||||
char rcs_touched;
|
||||
|
||||
char rbr_touched;
|
||||
char tbr_touched;
|
||||
|
||||
char sreq_touched;
|
||||
|
||||
char ir_ctrl_touched;
|
||||
|
||||
char base_off_touched;
|
||||
|
||||
char lcr_touched;
|
||||
char lbr_touched;
|
||||
|
||||
char scratch_touched;
|
||||
char base_nibble_touched;
|
||||
|
||||
char unknown_touched;
|
||||
|
||||
char t1_ctrl_touched;
|
||||
char t2_ctrl_touched;
|
||||
|
||||
char unknown2_touched;
|
||||
|
||||
char t1_touched;
|
||||
char t2_touched;
|
||||
|
||||
} device_t;
|
||||
|
||||
extern device_t device;
|
||||
extern void check_devices( void ); /* device.c */
|
||||
|
||||
/* extern void check_out_register( void ); */
|
||||
|
||||
extern void update_display( void ); /* device.c */
|
||||
extern void redraw_display( void ); /* device.c */
|
||||
extern void disp_draw_nibble( word_20 addr, word_4 val ); /* device.c */
|
||||
extern void menu_draw_nibble( word_20 addr, word_4 val ); /* device.c */
|
||||
extern void draw_annunc( void ); /* device.c */
|
||||
extern void redraw_annunc( void ); /* device.c */
|
||||
|
||||
#endif /* !_DEVICE_H */
|
92
src/hp48.h
92
src/hp48.h
|
@ -47,6 +47,74 @@
|
|||
#define NR_RSTK 8
|
||||
#define NR_PSTAT 16
|
||||
|
||||
/* #ifndef _DEVICE_H */
|
||||
/* #define _DEVICE_H 1 */
|
||||
|
||||
#define DISP_INSTR_OFF 0x10
|
||||
|
||||
#define ANN_LEFT 0x81
|
||||
#define ANN_RIGHT 0x82
|
||||
#define ANN_ALPHA 0x84
|
||||
#define ANN_BATTERY 0x88
|
||||
#define ANN_BUSY 0x90
|
||||
#define ANN_IO 0xa0
|
||||
|
||||
typedef struct device_t {
|
||||
|
||||
int display_touched;
|
||||
|
||||
char contrast_touched;
|
||||
|
||||
char disp_test_touched;
|
||||
|
||||
char crc_touched;
|
||||
|
||||
char power_status_touched;
|
||||
char power_ctrl_touched;
|
||||
|
||||
char mode_touched;
|
||||
|
||||
char ann_touched;
|
||||
|
||||
char baud_touched;
|
||||
|
||||
char card_ctrl_touched;
|
||||
char card_status_touched;
|
||||
|
||||
char ioc_touched;
|
||||
|
||||
char tcs_touched;
|
||||
char rcs_touched;
|
||||
|
||||
char rbr_touched;
|
||||
char tbr_touched;
|
||||
|
||||
char sreq_touched;
|
||||
|
||||
char ir_ctrl_touched;
|
||||
|
||||
char base_off_touched;
|
||||
|
||||
char lcr_touched;
|
||||
char lbr_touched;
|
||||
|
||||
char scratch_touched;
|
||||
char base_nibble_touched;
|
||||
|
||||
char unknown_touched;
|
||||
|
||||
char t1_ctrl_touched;
|
||||
char t2_ctrl_touched;
|
||||
|
||||
char unknown2_touched;
|
||||
|
||||
char t1_touched;
|
||||
char t2_touched;
|
||||
|
||||
} device_t;
|
||||
|
||||
/* #endif /\* !_DEVICE_H *\/ */
|
||||
|
||||
typedef unsigned char word_1;
|
||||
typedef unsigned char word_4;
|
||||
typedef unsigned char word_8;
|
||||
|
@ -63,7 +131,6 @@ typedef struct keystate_t {
|
|||
} keystate_t;
|
||||
|
||||
typedef struct display_t {
|
||||
|
||||
int on;
|
||||
|
||||
long disp_start;
|
||||
|
@ -79,7 +146,6 @@ typedef struct display_t {
|
|||
long menu_end;
|
||||
|
||||
int annunc;
|
||||
|
||||
} display_t;
|
||||
|
||||
typedef struct mem_cntl_t {
|
||||
|
@ -206,8 +272,13 @@ extern int adj_time_pending;
|
|||
extern long sched_adjtime;
|
||||
extern long schedule_event;
|
||||
|
||||
/* #ifndef _DEVICE_H */
|
||||
/* #define _DEVICE_H 1 */
|
||||
|
||||
extern device_t device;
|
||||
extern display_t display;
|
||||
extern void init_display( void ); /* device_lcd.c */
|
||||
|
||||
/* #endif /\* !_DEVICE_H *\/ */
|
||||
|
||||
extern saturn_t saturn;
|
||||
extern void init_saturn( void ); /* hp48_init.c */
|
||||
|
@ -236,4 +307,19 @@ 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 check_devices( void ); /* device.c */
|
||||
|
||||
extern void init_display( void ); /* device.c */
|
||||
extern void update_display( void ); /* device.c */
|
||||
extern void redraw_display( void ); /* device.c */
|
||||
extern void disp_draw_nibble( word_20 addr, word_4 val ); /* device.c */
|
||||
extern void menu_draw_nibble( word_20 addr, word_4 val ); /* device.c */
|
||||
extern void draw_annunc( void ); /* device.c */
|
||||
extern void redraw_annunc( void ); /* device.c */
|
||||
|
||||
/* extern void check_out_register( void ); */
|
||||
/* #endif /\* !_DEVICE_H *\/ */
|
||||
#endif /* !_HP48_H */
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <X11/Xutil.h>
|
||||
#endif
|
||||
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "timer.h"
|
|
@ -2,7 +2,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "debugger.h"
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "timer.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "resources.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "resources.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "debugger.h"
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "romio.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "device.h"
|
||||
#include "hp48.h"
|
||||
#include "hp48emu.h"
|
||||
#include "resources.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <sys/utsname.h>
|
||||
|
||||
#include "x48.h"
|
||||
#include "device.h"
|
||||
#include "errors.h"
|
||||
#include "hp48.h"
|
||||
#include "resources.h"
|
||||
|
|
Loading…
Reference in a new issue