Update test help printing and BUILD
Added a work around for the TEST help printing code. Added a script to auto-generate a build number.
This commit is contained in:
parent
7a6f5d27d9
commit
3afee6d912
|
@ -6,10 +6,6 @@
|
|||
UNIT := a2560k
|
||||
MEMORY := ram
|
||||
|
||||
export VER_MAJOR = 0
|
||||
export VER_MINOR = 1
|
||||
export VER_BUILD = 11
|
||||
|
||||
# CPU_WDC65816 0x16 /* CPU code for the Western Design Center 65816 */
|
||||
# CPU_M68000 0x20 /* CPU code for the Motorola 68000 */
|
||||
# CPU_M68010 0x21 /* CPU code for the Motorola 68010 */
|
||||
|
@ -56,7 +52,7 @@ endif
|
|||
export AS = vasmm68k_mot
|
||||
export ASFLAGS = $(VASM_CPU) -quiet -Fvobj -nowarn=62
|
||||
export CC = vc
|
||||
export DEFINES = -DCPU=$(CPU_NUMBER) -DMODEL=$(MODEL_NUMBER) -DVER_MAJOR=$(VER_MAJOR) -DVER_MINOR=$(VER_MINOR) -DVER_BUILD=$(VER_BUILD) # -DKBD_POLLED
|
||||
export DEFINES = -DCPU=$(CPU_NUMBER) -DMODEL=$(MODEL_NUMBER) # -DKBD_POLLED
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
export CFLAGS = -cpu=$(VBCC_CPU) +$(CFG_FILE) -I. -I$(CURDIR)/include -I$(CURDIR)
|
||||
|
|
|
@ -57,7 +57,7 @@ typedef struct s_cli_test_feature {
|
|||
* Tests...
|
||||
*/
|
||||
|
||||
short cli_test_bitmap(short channel, int argc, char * argv[]) {
|
||||
int cli_test_bitmap(short channel, int argc, char * argv[]) {
|
||||
int i,m,p;
|
||||
unsigned char j;
|
||||
unsigned short k;
|
||||
|
@ -79,7 +79,7 @@ short cli_test_bitmap(short channel, int argc, char * argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
short cli_test_uart(short channel, int argc, char * argv[]) {
|
||||
int cli_test_uart(short channel, int argc, char * argv[]) {
|
||||
char c;
|
||||
char buffer[80];
|
||||
|
||||
|
@ -104,7 +104,7 @@ short cli_test_uart(short channel, int argc, char * argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
short cli_test_panic(short channel, int argc, char * argv[]) {
|
||||
int cli_test_panic(short channel, int argc, char * argv[]) {
|
||||
volatile int x = 0;
|
||||
return argc / x;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ short cli_test_panic(short channel, int argc, char * argv[]) {
|
|||
/*
|
||||
* Try using the RTC periodic interrupt in polled mode
|
||||
*/
|
||||
short cli_test_rtc(short channel, int argc, char * argv[]) {
|
||||
int cli_test_rtc(short channel, int argc, char * argv[]) {
|
||||
char buffer[80];
|
||||
char * spinner = "|/-\\";
|
||||
short count = 0;
|
||||
|
@ -142,7 +142,7 @@ short cli_test_rtc(short channel, int argc, char * argv[]) {
|
|||
/*
|
||||
* Test the memory
|
||||
*/
|
||||
short cli_mem_test(short channel, int argc, char * argv[]) {
|
||||
int cli_mem_test(short channel, int argc, char * argv[]) {
|
||||
volatile unsigned char * memory = 0x00000000;
|
||||
t_sys_info sys_info;
|
||||
const long mem_start = 0x00050000;
|
||||
|
@ -191,7 +191,7 @@ short cli_mem_test(short channel, int argc, char * argv[]) {
|
|||
}
|
||||
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
short cli_test_recalibrate(short screen, int argc, char * argv[]) {
|
||||
int cli_test_recalibrate(short screen, int argc, char * argv[]) {
|
||||
unsigned char buffer[512];
|
||||
short i;
|
||||
short result;
|
||||
|
@ -213,7 +213,7 @@ short cli_test_recalibrate(short screen, int argc, char * argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
short cli_test_seek(short screen, int argc, char * argv[]) {
|
||||
int cli_test_seek(short screen, int argc, char * argv[]) {
|
||||
unsigned char buffer[512];
|
||||
short i;
|
||||
unsigned char cylinder;
|
||||
|
@ -241,7 +241,7 @@ short cli_test_seek(short screen, int argc, char * argv[]) {
|
|||
/*
|
||||
* Test the FDC interface by reading the MBR
|
||||
*/
|
||||
short cli_test_fdc(short screen, int argc, char * argv[]) {
|
||||
int cli_test_fdc(short screen, int argc, char * argv[]) {
|
||||
unsigned char buffer[512];
|
||||
short i;
|
||||
short scancode;
|
||||
|
@ -289,7 +289,7 @@ short cli_test_fdc(short screen, int argc, char * argv[]) {
|
|||
/*
|
||||
* Test the IDE interface by reading the MBR
|
||||
*/
|
||||
short cli_test_ide(short screen, int argc, char * argv[]) {
|
||||
int cli_test_ide(short screen, int argc, char * argv[]) {
|
||||
unsigned char buffer[512];
|
||||
short i;
|
||||
short scancode;
|
||||
|
@ -318,7 +318,7 @@ short cli_test_ide(short screen, int argc, char * argv[]) {
|
|||
/*
|
||||
* Test file creation
|
||||
*/
|
||||
short cli_test_create(short screen, int argc, char * argv[]) {
|
||||
int cli_test_create(short screen, int argc, char * argv[]) {
|
||||
short n;
|
||||
|
||||
if (argc > 1) {
|
||||
|
@ -344,7 +344,7 @@ short cli_test_create(short screen, int argc, char * argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
short cli_test_lpt(short screen, int argc, char * argv[]) {
|
||||
int cli_test_lpt(short screen, int argc, char * argv[]) {
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
char message[80];
|
||||
unsigned char scancode;
|
||||
|
@ -400,7 +400,7 @@ short cli_test_lpt(short screen, int argc, char * argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
short cmd_test_print(short screen, int argc, char * argv[]) {
|
||||
int cmd_test_print(short screen, int argc, char * argv[]) {
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
const char * test_pattern = "0123456789ABCDEFGHIJKLMNOPQRTSUVWZXYZ\r\n";
|
||||
|
||||
|
@ -423,7 +423,7 @@ short cmd_test_print(short screen, int argc, char * argv[]) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static t_cli_test_feature cli_test_features[] = {
|
||||
const t_cli_test_feature cli_test_features[] = {
|
||||
{"BITMAP", "BITMAP: test the bitmap screen", cli_test_bitmap},
|
||||
{"CREATE", "CREATE <path>: test creating a file", cli_test_create},
|
||||
{"IDE", "IDE: test reading the MBR of the IDE drive", cli_test_ide},
|
||||
|
@ -444,25 +444,30 @@ static t_cli_test_feature cli_test_features[] = {
|
|||
{"RECALIBRATE", "RECALIBRATE: recalibrate the floppy drive", cli_test_recalibrate},
|
||||
{"SEEK", "SEEK <track>: move the floppy drive head to a track", cli_test_seek},
|
||||
#endif
|
||||
{"UART", "UART: test the serial port", cli_test_uart},
|
||||
{0, 0}
|
||||
{"UART","UART: test the serial port",cli_test_uart},
|
||||
{"END", "END", 0}
|
||||
};
|
||||
|
||||
void test_help(short screen) {
|
||||
p_cli_test_feature f;
|
||||
short i;
|
||||
short count;
|
||||
|
||||
print(screen, "USAGE: TEST <feature>\nFeatures supported...\n");
|
||||
|
||||
for (f = cli_test_features; f->name != 0; f++) {
|
||||
print(screen, f->help);
|
||||
print(screen, "\n");
|
||||
count = sizeof(cli_test_features) / sizeof(t_cli_test_feature);
|
||||
for (i = 0; i < count - 1; i++) {
|
||||
if (cli_test_features[i].help != 0) {
|
||||
print(screen, cli_test_features[i].help);
|
||||
print(screen, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Test command
|
||||
*/
|
||||
short cmd_test(short screen, int argc, char * argv[]) {
|
||||
int cmd_test(short screen, int argc, char * argv[]) {
|
||||
short i;
|
||||
p_cli_test_feature f;
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
/*
|
||||
* Test command
|
||||
*/
|
||||
extern short cmd_test(short channel, int argc, char * argv[]);
|
||||
extern int cmd_test(short channel, int argc, char * argv[]);
|
||||
|
||||
#endif
|
||||
|
|
8443
src/foenixmcp.s68
8443
src/foenixmcp.s68
File diff suppressed because it is too large
Load diff
|
@ -213,11 +213,6 @@ interrupt_x12:
|
|||
interrupt_x1F:
|
||||
move.w #$8000,(PENDING_GRP1) ; Clear the flag for INT 1F
|
||||
movem.l d0-d7/a0-a6,-(a7) ; Save affected registers
|
||||
|
||||
move.b ($FEC60000),d0
|
||||
addq.b #1,d0
|
||||
move.b d0,($FEC60000)
|
||||
|
||||
move.w #($1f<<2),d0 ; Get the offset to interrupt 0x1f
|
||||
bra int_dispatch ; And process the interrupt
|
||||
;
|
||||
|
|
15819
src/mapfile
15819
src/mapfile
File diff suppressed because it is too large
Load diff
16
src/newbuild.py
Normal file
16
src/newbuild.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
import re
|
||||
|
||||
# Update version.h with a new build number
|
||||
|
||||
with open("version.h") as ver:
|
||||
lines = ver.readlines();
|
||||
|
||||
with open("version.h", "w") as ver:
|
||||
for line in lines:
|
||||
match = re.match("\#define\s*VER_BUILD\s*(\d+)", line)
|
||||
if match:
|
||||
build = int(match.group(1)) + 1
|
||||
ver.write('#define VER_BUILD {}\n'.format(build))
|
||||
else:
|
||||
ver.write(line)
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef __SYS_GENERAL_H
|
||||
#define __SYS_GENERAL_H
|
||||
|
||||
#include "version.h"
|
||||
#include "types.h"
|
||||
|
||||
/* IDs for the various Foenix machines supported */
|
||||
|
|
12
src/version.h
Normal file
12
src/version.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* Version numbers for the kernel
|
||||
*/
|
||||
|
||||
#ifndef __VERSION_H
|
||||
#define __VERSION_H
|
||||
|
||||
#define VER_MAJOR 0
|
||||
#define VER_MINOR 1
|
||||
#define VER_BUILD 1
|
||||
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
RAMSTART = 0x00010000;
|
||||
RAMSTART = 0x00020000;
|
||||
RAMSIZE = 0x00030000;
|
||||
STACKLEN = 0x400;
|
||||
HEAPSTART = 0x00100000;
|
||||
|
|
Loading…
Reference in a new issue