48 lines
977 B
C
Raw Normal View History

#include "../lib/tms9918.h"
2021-12-03 11:15:25 +01:00
#include "demo_screen1.h"
#include "demo_screen2.h"
#include "demo_amiga_hand.h"
#include "demo_interrupt.h"
#include "demo_extvid.h"
#include "demo_blank.h"
2021-12-08 12:53:13 +01:00
void help() {
woz_puts(
"\rTMS9918 DEMOS\r"
"=============\r"
"1 SCREEN1\r"
"2 SCREEN2\r"
"A AMIGA HAND\r"
"I INTERRUPT\r"
"E FLIP EXT VIDEO\r"
"B BLANK ON/OFF\r"
"H HELP\r"
"0 EXITS\r\r"
);
2021-12-05 16:22:27 +01:00
}
2021-11-28 15:05:41 +01:00
void main() {
2021-12-15 18:16:31 +01:00
#ifdef APPLE1
apple1_eprom_init();
#endif
2021-12-08 12:53:13 +01:00
byte key = 'H';
2021-11-28 15:05:41 +01:00
for(;;) {
2021-12-16 18:33:56 +01:00
if(key == '1') demo_screen1();
else if(key == '2') demo_screen2();
2021-12-08 12:53:13 +01:00
else if(key == 'A') demo_amiga_hand();
else if(key == 'I') demo_interrupt();
else if(key == 'E') flip_external_input();
else if(key == 'B') flip_blank();
else if(key == 'H') help();
2021-11-28 16:43:33 +01:00
else if(key == '0') break;
2021-11-28 15:05:41 +01:00
else woz_putc(key);
2021-11-26 23:41:51 +01:00
key = apple1_getkey();
2021-11-28 15:05:41 +01:00
}
2021-12-08 12:53:13 +01:00
woz_puts("BYE\r");
2021-11-26 23:41:51 +01:00
woz_mon();
}