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
|
UNIT := a2560k
|
||||||
MEMORY := ram
|
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_WDC65816 0x16 /* CPU code for the Western Design Center 65816 */
|
||||||
# CPU_M68000 0x20 /* CPU code for the Motorola 68000 */
|
# CPU_M68000 0x20 /* CPU code for the Motorola 68000 */
|
||||||
# CPU_M68010 0x21 /* CPU code for the Motorola 68010 */
|
# CPU_M68010 0x21 /* CPU code for the Motorola 68010 */
|
||||||
|
@ -56,7 +52,7 @@ endif
|
||||||
export AS = vasmm68k_mot
|
export AS = vasmm68k_mot
|
||||||
export ASFLAGS = $(VASM_CPU) -quiet -Fvobj -nowarn=62
|
export ASFLAGS = $(VASM_CPU) -quiet -Fvobj -nowarn=62
|
||||||
export CC = vc
|
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)
|
ifeq ($(OS),Windows_NT)
|
||||||
export CFLAGS = -cpu=$(VBCC_CPU) +$(CFG_FILE) -I. -I$(CURDIR)/include -I$(CURDIR)
|
export CFLAGS = -cpu=$(VBCC_CPU) +$(CFG_FILE) -I. -I$(CURDIR)/include -I$(CURDIR)
|
||||||
|
|
|
@ -57,7 +57,7 @@ typedef struct s_cli_test_feature {
|
||||||
* Tests...
|
* 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;
|
int i,m,p;
|
||||||
unsigned char j;
|
unsigned char j;
|
||||||
unsigned short k;
|
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 c;
|
||||||
char buffer[80];
|
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;
|
volatile int x = 0;
|
||||||
return argc / x;
|
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
|
* 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 buffer[80];
|
||||||
char * spinner = "|/-\\";
|
char * spinner = "|/-\\";
|
||||||
short count = 0;
|
short count = 0;
|
||||||
|
@ -142,7 +142,7 @@ short cli_test_rtc(short channel, int argc, char * argv[]) {
|
||||||
/*
|
/*
|
||||||
* Test the memory
|
* 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;
|
volatile unsigned char * memory = 0x00000000;
|
||||||
t_sys_info sys_info;
|
t_sys_info sys_info;
|
||||||
const long mem_start = 0x00050000;
|
const long mem_start = 0x00050000;
|
||||||
|
@ -191,7 +191,7 @@ short cli_mem_test(short channel, int argc, char * argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#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];
|
unsigned char buffer[512];
|
||||||
short i;
|
short i;
|
||||||
short result;
|
short result;
|
||||||
|
@ -213,7 +213,7 @@ short cli_test_recalibrate(short screen, int argc, char * argv[]) {
|
||||||
return 0;
|
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];
|
unsigned char buffer[512];
|
||||||
short i;
|
short i;
|
||||||
unsigned char cylinder;
|
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
|
* 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];
|
unsigned char buffer[512];
|
||||||
short i;
|
short i;
|
||||||
short scancode;
|
short scancode;
|
||||||
|
@ -289,7 +289,7 @@ short cli_test_fdc(short screen, int argc, char * argv[]) {
|
||||||
/*
|
/*
|
||||||
* Test the IDE interface by reading the MBR
|
* 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];
|
unsigned char buffer[512];
|
||||||
short i;
|
short i;
|
||||||
short scancode;
|
short scancode;
|
||||||
|
@ -318,7 +318,7 @@ short cli_test_ide(short screen, int argc, char * argv[]) {
|
||||||
/*
|
/*
|
||||||
* Test file creation
|
* 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;
|
short n;
|
||||||
|
|
||||||
if (argc > 1) {
|
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
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
char message[80];
|
char message[80];
|
||||||
unsigned char scancode;
|
unsigned char scancode;
|
||||||
|
@ -400,7 +400,7 @@ short cli_test_lpt(short screen, int argc, char * argv[]) {
|
||||||
return 0;
|
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
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
const char * test_pattern = "0123456789ABCDEFGHIJKLMNOPQRTSUVWZXYZ\r\n";
|
const char * test_pattern = "0123456789ABCDEFGHIJKLMNOPQRTSUVWZXYZ\r\n";
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ short cmd_test_print(short screen, int argc, char * argv[]) {
|
||||||
return 0;
|
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},
|
{"BITMAP", "BITMAP: test the bitmap screen", cli_test_bitmap},
|
||||||
{"CREATE", "CREATE <path>: test creating a file", cli_test_create},
|
{"CREATE", "CREATE <path>: test creating a file", cli_test_create},
|
||||||
{"IDE", "IDE: test reading the MBR of the IDE drive", cli_test_ide},
|
{"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},
|
{"RECALIBRATE", "RECALIBRATE: recalibrate the floppy drive", cli_test_recalibrate},
|
||||||
{"SEEK", "SEEK <track>: move the floppy drive head to a track", cli_test_seek},
|
{"SEEK", "SEEK <track>: move the floppy drive head to a track", cli_test_seek},
|
||||||
#endif
|
#endif
|
||||||
{"UART", "UART: test the serial port", cli_test_uart},
|
{"UART","UART: test the serial port",cli_test_uart},
|
||||||
{0, 0}
|
{"END", "END", 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
void test_help(short screen) {
|
void test_help(short screen) {
|
||||||
p_cli_test_feature f;
|
p_cli_test_feature f;
|
||||||
|
short i;
|
||||||
|
short count;
|
||||||
|
|
||||||
print(screen, "USAGE: TEST <feature>\nFeatures supported...\n");
|
print(screen, "USAGE: TEST <feature>\nFeatures supported...\n");
|
||||||
|
|
||||||
for (f = cli_test_features; f->name != 0; f++) {
|
count = sizeof(cli_test_features) / sizeof(t_cli_test_feature);
|
||||||
print(screen, f->help);
|
for (i = 0; i < count - 1; i++) {
|
||||||
print(screen, "\n");
|
if (cli_test_features[i].help != 0) {
|
||||||
|
print(screen, cli_test_features[i].help);
|
||||||
|
print(screen, "\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test command
|
* Test command
|
||||||
*/
|
*/
|
||||||
short cmd_test(short screen, int argc, char * argv[]) {
|
int cmd_test(short screen, int argc, char * argv[]) {
|
||||||
short i;
|
short i;
|
||||||
p_cli_test_feature f;
|
p_cli_test_feature f;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
/*
|
/*
|
||||||
* Test command
|
* Test command
|
||||||
*/
|
*/
|
||||||
extern short cmd_test(short channel, int argc, char * argv[]);
|
extern int cmd_test(short channel, int argc, char * argv[]);
|
||||||
|
|
||||||
#endif
|
#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:
|
interrupt_x1F:
|
||||||
move.w #$8000,(PENDING_GRP1) ; Clear the flag for INT 1F
|
move.w #$8000,(PENDING_GRP1) ; Clear the flag for INT 1F
|
||||||
movem.l d0-d7/a0-a6,-(a7) ; Save affected registers
|
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
|
move.w #($1f<<2),d0 ; Get the offset to interrupt 0x1f
|
||||||
bra int_dispatch ; And process the interrupt
|
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
|
#ifndef __SYS_GENERAL_H
|
||||||
#define __SYS_GENERAL_H
|
#define __SYS_GENERAL_H
|
||||||
|
|
||||||
|
#include "version.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
/* IDs for the various Foenix machines supported */
|
/* 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;
|
RAMSIZE = 0x00030000;
|
||||||
STACKLEN = 0x400;
|
STACKLEN = 0x400;
|
||||||
HEAPSTART = 0x00100000;
|
HEAPSTART = 0x00100000;
|
||||||
|
|
Loading…
Reference in a new issue