2024-12-02 14:05:49 +01:00
|
|
|
#define NOP 0xEA /* CPU NoOp */
|
|
|
|
#define PAGESIZE 0x1F /* Pagesize of extra addressing of devices */
|
|
|
|
#define VIDADDRS 0xBE00 /* Video Address */
|
|
|
|
#define VIAADDRS 0xBF80 /* VIA Address */
|
|
|
|
#define KBDADDRS 0xBD00 /* Keyboard Register */
|
|
|
|
|
|
|
|
#define RAMSIZE 0x7FFF /* RAM Page Size */
|
|
|
|
#define RAMLOC 0x0000 /* ROM Page Location */
|
|
|
|
#define ROMSIZE 0x3FFF /* ROM Page Size */
|
|
|
|
#define ROMLOC 0xC000 /* ROM Page Location */
|
|
|
|
|
|
|
|
#define BACKCOLOR sfBlack
|
2024-12-17 13:10:12 +01:00
|
|
|
#define FPS 60
|
2024-12-02 14:05:49 +01:00
|
|
|
|
2024-12-17 13:10:12 +01:00
|
|
|
#define PREAMBLE "LS7 Emulator by Gabriel Weingardt.\nLicense: GPL v.3+\n\n"
|
2024-12-02 14:31:43 +01:00
|
|
|
|
2024-12-17 13:10:12 +01:00
|
|
|
#define HELP "Usage: LS7Emulator [options] file\n\n\
|
|
|
|
Options: Type Default Desc\n\
|
|
|
|
--help Show this menu\n\
|
|
|
|
--help-keys Show emulator key functions\n\
|
|
|
|
--cpuspeed [int] 100000 CPU Speed given in Herz. KHz and MHz annotations like 1KHz are supported\n\
|
|
|
|
--scale [float] 2.0 Set the starting scale of the video output\n\
|
|
|
|
--singlestep Enable singlestepping with the 'F8' key\n\
|
|
|
|
--clocksteps [int] 1 Set the clock cycles cycled by a singlestep\n\
|
|
|
|
--snapshot [string] Import a CPU snapshot\n\
|
|
|
|
\n"
|
2024-12-05 11:44:22 +01:00
|
|
|
|
2024-12-17 13:10:12 +01:00
|
|
|
#define HELPKEYS "\
|
|
|
|
F1 Exit emulator\n\
|
|
|
|
F2 Show Key Help\n\
|
|
|
|
F3 Show Debug Menu\n\
|
|
|
|
F4 Halt CPU\n\
|
|
|
|
F5 Reset CPU\n\
|
|
|
|
F6 Scale--\n\
|
|
|
|
F7 Scale++\n\
|
|
|
|
F8 Single step CPU\n\
|
|
|
|
F9 Save CPU snapshot\n\
|
|
|
|
F10 Load previous snapshot\n\
|
|
|
|
F11 CPU NMI\n\
|
|
|
|
F12 CPU IRQ\n\n"
|
|
|
|
|
|
|
|
static float displayscale = 2;
|
|
|
|
static int cpuspeed = 100000; // 100 kHz
|
|
|
|
static int singlestep = 0;
|
|
|
|
static int clocksteps = 1;
|