Permalink
Browse files

Trim unused features during exploration: Z80, Basic, Tetra, Snake

During exploration of badge functionality, the Z80 emulator,
BASIC interpretor, Tetrapuzz and Snake games are not involved.
Since they add time to PICkit uploads, remove them from the build
during exploration process for faster software iterations.
  • Loading branch information...
Roger-random committed Oct 14, 2018
1 parent 70e678e commit 1b4c2f384d6a1da4ea272d1dddfdc55d97c4f453
@@ -1,3 +1,4 @@
#ifdef Z80
static long op_rb0a() ;
static long op_rb0b() ;
static long op_rb0c() ;
@@ -721,3 +722,4 @@ static void user_int();
static do_step();
void reload_cpm_warm (void);
#endif
@@ -75,6 +75,7 @@ track = dat;
disk_temp_pointer = 0;
}
#ifdef Z80
uint8_t read_disk_byte (void)
{
uint8_t temp;
@@ -179,6 +180,7 @@ if (drive==6)
}
disk_temp_pointer++;
}
#endif //Z80
uint8_t fl_rdsr(void)
{
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -197,3 +198,4 @@ static BYTE io_trap()
return((BYTE) 0);
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -105,3 +106,4 @@ struct softbreak { /* structure of a breakpoint */
int sb_pass; /* no. of pass to break */
};
#endif
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -3782,3 +3783,4 @@ static long op_rst38() /* RST 38 */
return(11L);
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -2950,3 +2951,4 @@ static long op_tb7hl() /* BIT 7,(HL) */
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -785,3 +786,4 @@ static long op_ldxdn() /* LD (IX+d),n */
return(19L);
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -1262,3 +1263,4 @@ static long op_oprrd() /* RRD (HL) */
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -785,3 +786,4 @@ static long op_ldydn() /* LD (IY+d),n */
return(19L);
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -703,3 +704,4 @@ register int data;
return(23L);
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -703,3 +704,4 @@ static long op_srliyd(int data) /* SRL (IY+d) */
return(23L);
#endif
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -79,3 +80,4 @@ getkey()
return(c);
*/
}
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -175,3 +176,4 @@ const int parrity[256] = {
#if defined(COHERENT) && !defined(_I386)
char adr_err[] = "address out of range";
#endif
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -52,3 +53,4 @@ extern BYTE *t_start, *t_end;
#if defined(COHERENT) && !defined(_I386)
extern char adr_err[];
#endif
#endif
@@ -1,3 +1,4 @@
#ifdef Z80
/*
* Z80SIM - a Z80-CPU simulator
*
@@ -73,3 +74,4 @@ void quit_int()
cntl_bs++;
#endif
}
#endif
@@ -115,11 +115,13 @@ volatile int8_t brk_key,stdio_src;
extern volatile uint16_t bufsize;
volatile uint32_t ticks; // millisecond timer incremented in ISR
#ifdef Z80
extern const uint8_t ram_image[65536];
extern const uint8_t b2_rom[2048];
extern const uint8_t ram_init [30];
extern uint8_t ram_disk[RAMDISK_SIZE];
#endif
int8_t disp_buffer[DISP_BUFFER_HIGH+1][DISP_BUFFER_WIDE];
int8_t color_buffer[DISP_BUFFER_HIGH+1][DISP_BUFFER_WIDE];
@@ -320,12 +322,15 @@ void badge_menu(void)
menu_pointer = 0;
continue;
}
#ifdef UBASIC
if (strcmp(menu_buff,"1")==0)
{
video_clrscr();
init_basic();
while (1) loop_basic();
}
#endif
#ifdef Z80
else if (strcmp(menu_buff,"2")==0)
{
video_clrscr();
@@ -337,12 +342,16 @@ void badge_menu(void)
init_8080_basic();
while (1) loop_8080_basic();
}
#endif
#ifdef TETRAPUZZ
else if (strcmp(menu_buff,"4")==0)
{
enable_display_scanning(0); //Shut off auto-scanning of character buffer
tetrapuzz();
}
#endif
//B_BDG006
#ifdef Z80
else if (strcmp(menu_buff,"5")==0)
{
stdio_local_buffer_puts("c:\nzork1\n");
@@ -354,6 +363,7 @@ void badge_menu(void)
init_z80_cpm();
while (1) loop_z80_cpm();
}
#endif
else if (strcmp(menu_buff,"6")==0)
{
init_userprog();
@@ -373,10 +383,12 @@ void badge_menu(void)
case 8: clear_flag = wisecrack("I am afraid I can't do that Dave", TEXT_LEFT,CRACK_Y, 0); break;
case 9: show_wrencher(); break;
case 10: play_mario_tune(); break;
#ifdef SNAKE_GAME
case 11:
handle_display = 0;
play_snake();
break;
#endif
case 12: show_help(); while(1) { ;; };
default: clear_flag = random_crack(); break;
}
@@ -687,7 +699,7 @@ uint32_t millis(void)
{
return ticks;
}
#ifdef Z80
void init_8080_basic (void)
{
video_set_color(15,0);
@@ -721,7 +733,9 @@ void loop_z80_cpm (void)
cpu_error = NONE;
cpu();
}
#endif
#ifdef UBASIC
//B_BAS005
void init_basic (void)
{
@@ -764,6 +778,7 @@ void loop_basic (void)
}
}
}
#endif //UBASIC
//B_BDG007
void init_userprog (void)
@@ -800,6 +815,7 @@ uint16_t get_free_mem(uint8_t * prog, uint16_t max_mem)
return (max_mem-prog_len);
}
#ifdef UBASIC
//B_BAS008
uint8_t add_prog_line (int8_t * line, int8_t * prog, int16_t linenum)
{
@@ -1027,6 +1043,7 @@ uint8_t basic_load_program (uint8_t * data, uint8_t slot)
if (data[0] == 0xFF) data[0] = 0;
return 1;
}
#endif //UBASIC
void list_more (void)
{
@@ -35,23 +35,35 @@
*/
//Set SHOW_SPLASH to 0 to skip splash screen at boot
#define SHOW_SPLASH 1
#define SHOW_SPLASH 0
// Include snake game. Comment out to omit.
//#define SNAKE_GAME
// Include four block puzzle that's totally not Tetris. Comment out to omit.
//#define TETRAPUZZ
// Include Z80 emulator. Comment out to omit.
//#define Z80
// Include UBASIC. Comment out to omit.
//#define UBASIC
//B_BDG010
//this one enables 64k of RAM image for CP/M
//if off, disables all CP/M stuff and leaves "empty" Z80 machine
#define USE_RAM_IMAGE
//#define USE_RAM_IMAGE
//first ROM disk, full of utils, mapped as disk B. you can disable this one
#define USE_ROMDISK
//#define USE_ROMDISK
//second ROM disk, with games, mapped as disk C. you can disable this one
#define USE_ROMDISK2
//#define USE_ROMDISK2
//RAM disk, you can save 22kb of RAM by disabling it
#define USE_RAMDISK
//#define USE_RAMDISK
//FLASH buffering of CP/M disk drives.
//enabled - use RAM buffering, faster, less wear-out
//disabled - more stable and straight-forward
#define FLASH_BUFFERING
//#define FLASH_BUFFERING
#endif
@@ -1,3 +1,4 @@
#ifdef UBASIC
/*
* Copyright (c) 2006, Adam Dunkels
* All rights reserved.
@@ -389,3 +390,4 @@ tokenizer_variable_num(void)
else return *ptr - 'A';
}
/*---------------------------------------------------------------------------*/
#endif
@@ -1,3 +1,4 @@
#ifdef UBASIC
/*
* Copyright (c) 2006, Adam Dunkels
* All rights reserved.
@@ -106,3 +107,4 @@ int tokenizer_finished(void);
void tokenizer_error_print(void);
#endif /* __TOKENIZER_H__ */
#endif
@@ -1,3 +1,4 @@
#ifdef UBASIC
/*
* Copyright (c) 2006, Adam Dunkels
* All rights reserved.
@@ -981,3 +982,4 @@ int ubasic_get_variable(int varnum)
#endif
@@ -1,3 +1,4 @@
#ifdef UBASIC
/*
* Copyright (c) 2006, Adam Dunkels
* All rights reserved.
@@ -39,3 +40,4 @@ int ubasic_get_variable(int varnum);
void ubasic_set_variable(int varum, int value);
#endif /* __UBASIC_H__ */
#endif
@@ -1,3 +1,4 @@
#ifdef TETRAPUZZ
#include "box_game.h"
#include "hw.h"
#include <stdint.h>
@@ -871,3 +872,4 @@ void BOX_rt(void)
BOX_write_piece();
BOX_update_screen();
}
#endif
@@ -1,3 +1,4 @@
#ifdef TETRAPUZZ
#include <stdint.h>
//Prototypes
@@ -31,4 +32,5 @@ void BOX_line_check(void);
void BOX_up(void);
void BOX_dn(void);
void BOX_lt(void);
void BOX_rt(void);
void BOX_rt(void);
#endif
Oops, something went wrong.

0 comments on commit 1b4c2f3

Please sign in to comment.