Work in progress, trying to merge Stefany's A2560X code in . At the moment it's crashing when calling ___main from startup_m68040.s.
This commit is contained in:
parent
a3846c799a
commit
8a99341723
2
src/CompileFlash.bat
Normal file
2
src/CompileFlash.bat
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
set VBCC=d:/FoenixMCP/vbcc
|
||||||
|
d:\make-3.81-bin\bin\make all UNIT=a2560k MEMORY=flash
|
3
src/CompileFlashGenX.bat
Normal file
3
src/CompileFlashGenX.bat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
d:\make-3.81-bin\bin\make clean all
|
||||||
|
set VBCC=d:/FoenixMCP/vbcc
|
||||||
|
d:\make-3.81-bin\bin\make all UNIT=genx MEMORY=flash
|
3
src/CompileFlash_A2560X.bat
Normal file
3
src/CompileFlash_A2560X.bat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
d:\make-3.81-bin\bin\make clean all
|
||||||
|
set VBCC=d:/FoenixMCP/vbcc
|
||||||
|
d:\make-3.81-bin\bin\make all UNIT=a2560x MEMORY=flash
|
3
src/CompileRAMGenX.bat
Normal file
3
src/CompileRAMGenX.bat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
d:\make-3.81-bin\bin\make clean all
|
||||||
|
set VBCC=d:/FoenixMCP/vbcc
|
||||||
|
d:\make-3.81-bin\bin\make all UNIT=genx MEMORY=ram
|
3
src/CompileRAM_A2560X.bat
Normal file
3
src/CompileRAM_A2560X.bat
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
d:\make-3.81-bin\bin\make clean all
|
||||||
|
set VBCC=d:/FoenixMCP/vbcc
|
||||||
|
d:\make-3.81-bin\bin\make all UNIT=a2560x MEMORY=ram
|
24
src/Makefile
24
src/Makefile
|
@ -3,7 +3,7 @@
|
||||||
# User may over-ride the UNIT and MEMORY parameters to specify target machine
|
# User may over-ride the UNIT and MEMORY parameters to specify target machine
|
||||||
# and where the MCP will run (ram or flash)
|
# and where the MCP will run (ram or flash)
|
||||||
#
|
#
|
||||||
UNIT := a2560u
|
UNIT := a2560x
|
||||||
MEMORY := ram
|
MEMORY := ram
|
||||||
|
|
||||||
# CPU_WDC65816 0x16 /* CPU code for the Western Design Center 65816 */
|
# CPU_WDC65816 0x16 /* CPU code for the Western Design Center 65816 */
|
||||||
|
@ -24,6 +24,7 @@ MEMORY := ram
|
||||||
# MODEL_FOENIX_A2560K 11
|
# MODEL_FOENIX_A2560K 11
|
||||||
|
|
||||||
# Determine target CPU and MODEL based on the UNIT
|
# Determine target CPU and MODEL based on the UNIT
|
||||||
|
# The comments are on a separate line to avoid inserting white space in the commande line where these variables are used
|
||||||
|
|
||||||
ifeq ($(UNIT),a2560k)
|
ifeq ($(UNIT),a2560k)
|
||||||
# M68040V
|
# M68040V
|
||||||
|
@ -47,16 +48,25 @@ export VBCC_CPU = 68040
|
||||||
export MODEL_NUMBER = 4
|
export MODEL_NUMBER = 4
|
||||||
export cpu = m68040
|
export cpu = m68040
|
||||||
|
|
||||||
|
else ifeq ($(UNIT),a2560x)
|
||||||
|
# M68040V
|
||||||
|
export CPU_NUMBER = 6
|
||||||
|
# VASM CPU flag
|
||||||
|
export VASM_CPU = -m68040
|
||||||
|
# VBCC CPU flag
|
||||||
|
export VBCC_CPU = 68040
|
||||||
|
# A2560X
|
||||||
|
export MODEL_NUMBER = 8
|
||||||
|
export cpu = m68040
|
||||||
|
|
||||||
else ifeq ($(UNIT),a2560u)
|
else ifeq ($(UNIT),a2560u)
|
||||||
# The comments are on a separate line to avoid inserting white space in the commande line where these variables are used
|
|
||||||
# M680SEC00
|
# M680SEC00
|
||||||
export CPU_NUMBER = 0
|
export CPU_NUMBER = 0
|
||||||
# VASM CPU flag
|
# VASM CPU flag
|
||||||
export VASM_CPU = -m68000
|
export VASM_CPU = -m68000
|
||||||
# VBCC CPU flag
|
# VBCC CPU flag
|
||||||
export VBCC_CPU = 68000
|
export VBCC_CPU = 68000
|
||||||
export MODEL_NUMBER = 9 # A2560U
|
export MODEL_NUMBER = 9
|
||||||
export CFG_FILE = $(VBCC)/config/a2560u_ram
|
|
||||||
export cpu = m68k
|
export cpu = m68k
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -89,8 +99,14 @@ cpu_c_obj := $(subst .c,.o,$(cpu_c_src))
|
||||||
dev_base_sources = dev/block.c dev/channel.c dev/console.c dev/fsys.c dev/pata.c dev/ps2.c dev/rtc.c dev/sdc.c dev/txt_screen.c dev/uart.c
|
dev_base_sources = dev/block.c dev/channel.c dev/console.c dev/fsys.c dev/pata.c dev/ps2.c dev/rtc.c dev/sdc.c dev/txt_screen.c dev/uart.c
|
||||||
ifeq ($(UNIT),a2560k)
|
ifeq ($(UNIT),a2560k)
|
||||||
dev_c_src := $(dev_base_sources) dev/fdc.c dev/kbd_mo.c dev/lpt.c dev/midi.c dev/txt_a2560k_a.o dev/txt_a2560k_b.o m68040/fdc_m68040.o
|
dev_c_src := $(dev_base_sources) dev/fdc.c dev/kbd_mo.c dev/lpt.c dev/midi.c dev/txt_a2560k_a.o dev/txt_a2560k_b.o m68040/fdc_m68040.o
|
||||||
|
else ifeq ($(UNIT),genx)
|
||||||
|
dev_c_src := $(dev_base_sources) dev/fdc.c dev/lpt.c dev/midi.c dev/txt_a2560k_a.o dev/txt_a2560k_b.o m68040/fdc_m68040.o
|
||||||
|
else ifeq ($(UNIT),a2560x)
|
||||||
|
dev_c_src := $(dev_base_sources) dev/fdc.c dev/lpt.c dev/midi.c dev/txt_a2560k_a.o dev/txt_a2560k_b.o m68040/fdc_m68040.o
|
||||||
else ifeq ($(UNIT),a2560u)
|
else ifeq ($(UNIT),a2560u)
|
||||||
dev_c_src := $(dev_base_sources) dev/txt_a2560u.o
|
dev_c_src := $(dev_base_sources) dev/txt_a2560u.o
|
||||||
|
else
|
||||||
|
dev_c_src := $(dev_base_sources)
|
||||||
endif
|
endif
|
||||||
dev_c_obj := $(subst .c,.o,$(dev_c_src))
|
dev_c_obj := $(subst .c,.o,$(dev_c_src))
|
||||||
|
|
||||||
|
|
32
src/boot.c
32
src/boot.c
|
@ -12,6 +12,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "features.h"
|
||||||
#include "boot.h"
|
#include "boot.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
|
@ -31,10 +32,15 @@
|
||||||
#include "dev/txt_a2560u.h"
|
#include "dev/txt_a2560u.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560K
|
#elif MODEL == MODEL_FOENIX_A2560K
|
||||||
#include "rsrc/bitmaps/splash_a2560k.h"
|
#include "rsrc/bitmaps/splash_a2560k.h"
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560X || MODEL == MODEL_FOENIX_GENX
|
||||||
|
#include "rsrc/bitmaps/splash_a2560x.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SPLASH_WAIT_SEC 10 /* How many seconds to wait on the splash screen */
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
|
#define SPLASH_WAIT_SEC 10 /* How many seconds to wait on the splash screen */
|
||||||
|
#else
|
||||||
|
#define SPLASH_WAIT_SEC 4 /* How many seconds to wait on the splash screen */
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Important scan codes
|
* Important scan codes
|
||||||
*/
|
*/
|
||||||
|
@ -231,16 +237,16 @@ short boot_screen() {
|
||||||
*BM0_Control_Reg = 1;
|
*BM0_Control_Reg = 1;
|
||||||
|
|
||||||
/* Set a background color for the bitmap mode */
|
/* Set a background color for the bitmap mode */
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
*BackGroundControlReg_B = 0x00202020;
|
*BackGroundControlReg_B = 0x00202020;
|
||||||
screen = 0;
|
screen = 0;
|
||||||
#else
|
#else
|
||||||
*BackGroundControlReg_A = 0x00202020;
|
*BackGroundControlReg_A = 0x00402040;
|
||||||
screen = 0;
|
screen = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Display the splashscreen at 640x480 without a border */
|
/* Display the splashscreen at 640x480 without a border */
|
||||||
txt_set_resolution(screen, 640, 680);
|
txt_set_resolution(screen, 640, 480);
|
||||||
txt_set_border(screen, 0, 0);
|
txt_set_border(screen, 0, 0);
|
||||||
txt_set_font(screen, 8, 8, quadrotextFONT);
|
txt_set_font(screen, 8, 8, quadrotextFONT);
|
||||||
|
|
||||||
|
@ -263,7 +269,7 @@ short boot_screen() {
|
||||||
make_key_name("SPACE", space);
|
make_key_name("SPACE", space);
|
||||||
make_key_name("RETURN", cr_text);
|
make_key_name("RETURN", cr_text);
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
sprintf(buffer, "BOOT: %s=SD CARD, %s=HARD DRIVE, s=FLOPPY, %s=DEFAULT, %s=SAFE", f1, f2, f3, space, cr_text);
|
sprintf(buffer, "BOOT: %s=SD CARD, %s=HARD DRIVE, s=FLOPPY, %s=DEFAULT, %s=SAFE", f1, f2, f3, space, cr_text);
|
||||||
#else
|
#else
|
||||||
sprintf(buffer, "BOOT: %s=SD CARD, %s=HARD DRIVE, %s=DEFAULT, %s=SAFE", f1, f2, space, cr_text);
|
sprintf(buffer, "BOOT: %s=SD CARD, %s=HARD DRIVE, %s=DEFAULT, %s=SAFE", f1, f2, space, cr_text);
|
||||||
|
@ -316,7 +322,7 @@ short boot_screen() {
|
||||||
strcpy(buffer, "Booting from hard drive.\n");
|
strcpy(buffer, "Booting from hard drive.\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
case SC_F3:
|
case SC_F3:
|
||||||
device = BDEV_FDC;
|
device = BDEV_FDC;
|
||||||
strcpy(buffer, "Booting from floppy drive.\n");
|
strcpy(buffer, "Booting from floppy drive.\n");
|
||||||
|
@ -338,11 +344,9 @@ short boot_screen() {
|
||||||
/* Initialise all screens */
|
/* Initialise all screens */
|
||||||
txt_init_screen(screen); /* This is the one used for the boot message */
|
txt_init_screen(screen); /* This is the one used for the boot message */
|
||||||
/* No need to txt_set_resolution(screen, 0, 0) because during screen_init, the defaults are applied */
|
/* No need to txt_set_resolution(screen, 0, 0) because during screen_init, the defaults are applied */
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_A2560X || MODEL == MODEL_FOENIX_GENX
|
||||||
txt_set_resolution(1, 0, 0); // Set the resolution based on the DIP switch
|
txt_set_resolution(1, 0, 0); // Set the resolution based on the DIP switch
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Display message saying what we're booting from */
|
|
||||||
print(screen, buffer);
|
print(screen, buffer);
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
|
@ -350,7 +354,6 @@ short boot_screen() {
|
||||||
kbdmo_set_led_matrix_fill(0);
|
kbdmo_set_led_matrix_fill(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TRACE1("boot_screen: returning %d", device);
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +364,11 @@ short boot_screen() {
|
||||||
*/
|
*/
|
||||||
void boot_from_bdev(short device) {
|
void boot_from_bdev(short device) {
|
||||||
char initial_path[10];
|
char initial_path[10];
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
|
unsigned int boot_dip = 0; // The setting on the user and boot mode DIP switches
|
||||||
|
#elif MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X || MODEL_FOENIX_A2560U_PLUS
|
||||||
unsigned short boot_dip = 0; // The setting on the user and boot mode DIP switches
|
unsigned short boot_dip = 0; // The setting on the user and boot mode DIP switches
|
||||||
|
#endif
|
||||||
short bootable = 0; // Is the boot sector of the selected device bootable?
|
short bootable = 0; // Is the boot sector of the selected device bootable?
|
||||||
|
|
||||||
TRACE1("boot_from_bdev(%d)", device);
|
TRACE1("boot_from_bdev(%d)", device);
|
||||||
|
@ -388,7 +395,7 @@ void boot_from_bdev(short device) {
|
||||||
strcpy(initial_path, "/sd");
|
strcpy(initial_path, "/sd");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
case 0x0002:
|
case 0x0002:
|
||||||
// Boot from Floppy
|
// Boot from Floppy
|
||||||
device = BDEV_FDC;
|
device = BDEV_FDC;
|
||||||
|
@ -396,7 +403,6 @@ void boot_from_bdev(short device) {
|
||||||
strcpy(initial_path, "/fd");
|
strcpy(initial_path, "/fd");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Boot straight to REPL
|
// Boot straight to REPL
|
||||||
log(LOG_INFO, "Boot DIP set for REPL");
|
log(LOG_INFO, "Boot DIP set for REPL");
|
||||||
|
|
|
@ -361,9 +361,6 @@ short cli_exec(short channel, char * command, int argc, const char * argv[]) {
|
||||||
* Make sure all the console settings are setup so that the console works correctly
|
* Make sure all the console settings are setup so that the console works correctly
|
||||||
*/
|
*/
|
||||||
void cli_ensure_console(short channel) {
|
void cli_ensure_console(short channel) {
|
||||||
|
|
||||||
TRACE1("cli_ensure_console(%d)", channel);
|
|
||||||
|
|
||||||
// Make sure the console is set up correctly for the CLI
|
// Make sure the console is set up correctly for the CLI
|
||||||
sys_chan_ioctrl(channel, CON_IOCTRL_ECHO_OFF, 0, 0);
|
sys_chan_ioctrl(channel, CON_IOCTRL_ECHO_OFF, 0, 0);
|
||||||
sys_chan_ioctrl(channel, CON_IOCTRL_ANSI_ON, 0, 0);
|
sys_chan_ioctrl(channel, CON_IOCTRL_ANSI_ON, 0, 0);
|
||||||
|
@ -371,8 +368,6 @@ void cli_ensure_console(short channel) {
|
||||||
|
|
||||||
// Make sure the screen has text enabled
|
// Make sure the screen has text enabled
|
||||||
txt_set_mode(sys_chan_device(channel), TXT_MODE_TEXT);
|
txt_set_mode(sys_chan_device(channel), TXT_MODE_TEXT);
|
||||||
|
|
||||||
TRACE1("cli_ensure_console returning", channel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -659,8 +654,6 @@ short cli_readline(short channel, char * command_line) {
|
||||||
print(channel, "\x1b[3G\x1b[K");
|
print(channel, "\x1b[3G\x1b[K");
|
||||||
|
|
||||||
} else if (c == CHAR_BS) {
|
} else if (c == CHAR_BS) {
|
||||||
TRACE("HANDLING BACKSPACE");
|
|
||||||
|
|
||||||
// Backspace
|
// Backspace
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
i--;
|
i--;
|
||||||
|
@ -670,7 +663,6 @@ short cli_readline(short channel, char * command_line) {
|
||||||
}
|
}
|
||||||
print(channel, "\x1b[1P");
|
print(channel, "\x1b[1P");
|
||||||
}
|
}
|
||||||
TRACE("HANDLING BACKSPACE");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -808,7 +800,6 @@ void cli_draw_window(short channel, const char * status, short is_active) {
|
||||||
|
|
||||||
// Save the current region and cursor location
|
// Save the current region and cursor location
|
||||||
sys_txt_get_xy(dev, &cursor);
|
sys_txt_get_xy(dev, &cursor);
|
||||||
DEBUG("Backup current region");
|
|
||||||
sys_txt_get_region(dev, &old_region);
|
sys_txt_get_region(dev, &old_region);
|
||||||
sys_txt_get_color(dev, &foreground, &background);
|
sys_txt_get_color(dev, &foreground, &background);
|
||||||
|
|
||||||
|
@ -817,7 +808,6 @@ void cli_draw_window(short channel, const char * status, short is_active) {
|
||||||
region.origin.y = 0;
|
region.origin.y = 0;
|
||||||
region.size.width = 0;
|
region.size.width = 0;
|
||||||
region.size.height = 0;
|
region.size.height = 0;
|
||||||
DEBUG("Get full screen dimensions");
|
|
||||||
sys_txt_set_region(dev, ®ion);
|
sys_txt_set_region(dev, ®ion);
|
||||||
sys_txt_get_region(dev, &full_region);
|
sys_txt_get_region(dev, &full_region);
|
||||||
|
|
||||||
|
@ -845,7 +835,6 @@ void cli_draw_window(short channel, const char * status, short is_active) {
|
||||||
|
|
||||||
// Restore the region and cursor location
|
// Restore the region and cursor location
|
||||||
sys_txt_set_color(dev, foreground, background);
|
sys_txt_set_color(dev, foreground, background);
|
||||||
DEBUG("Restore region and cursor location");
|
|
||||||
sys_txt_set_region(dev, &old_region);
|
sys_txt_set_region(dev, &old_region);
|
||||||
sys_txt_set_xy(dev, cursor.x, cursor.y);
|
sys_txt_set_xy(dev, cursor.x, cursor.y);
|
||||||
|
|
||||||
|
@ -862,8 +851,6 @@ void cli_setup_screen(short channel, const char * path, short is_active) {
|
||||||
t_rect full_region, command_region;
|
t_rect full_region, command_region;
|
||||||
char message[80];
|
char message[80];
|
||||||
|
|
||||||
DEBUG1("cli_setup_screen for channel %d", channel);
|
|
||||||
|
|
||||||
short dev = sys_chan_device(channel);
|
short dev = sys_chan_device(channel);
|
||||||
|
|
||||||
// Get the size of the screen
|
// Get the size of the screen
|
||||||
|
@ -871,9 +858,6 @@ void cli_setup_screen(short channel, const char * path, short is_active) {
|
||||||
full_region.origin.y = 0;
|
full_region.origin.y = 0;
|
||||||
full_region.size.width = 0;
|
full_region.size.width = 0;
|
||||||
full_region.size.height = 0;
|
full_region.size.height = 0;
|
||||||
|
|
||||||
DEBUG2("cli_setup_screen: get screen size, dev=%d, region=%p", dev, &full_region);
|
|
||||||
|
|
||||||
sys_txt_set_region(dev, &full_region);
|
sys_txt_set_region(dev, &full_region);
|
||||||
sys_txt_get_region(dev, &full_region);
|
sys_txt_get_region(dev, &full_region);
|
||||||
|
|
||||||
|
@ -887,7 +871,6 @@ void cli_setup_screen(short channel, const char * path, short is_active) {
|
||||||
command_region.size.height = full_region.size.height - 1;
|
command_region.size.height = full_region.size.height - 1;
|
||||||
|
|
||||||
// Restrict the region to the command panel
|
// Restrict the region to the command panel
|
||||||
DEBUG("Restrict the region to the command panel");
|
|
||||||
sys_txt_set_region(dev, &command_region);
|
sys_txt_set_region(dev, &command_region);
|
||||||
|
|
||||||
// Draw the window
|
// Draw the window
|
||||||
|
@ -929,7 +912,7 @@ short cli_repl(short channel) {
|
||||||
// char message[80];
|
// char message[80];
|
||||||
// sprintf(message, "%d", strlen(cwd_buffer));
|
// sprintf(message, "%d", strlen(cwd_buffer));
|
||||||
print(CDEV_CONSOLE, "");
|
print(CDEV_CONSOLE, "");
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
if (g_channels_swapped) {
|
if (g_channels_swapped) {
|
||||||
// If channel has changed, deactivate old channel
|
// If channel has changed, deactivate old channel
|
||||||
cli_draw_window(CDEV_EVID, cwd_buffer, 0);
|
cli_draw_window(CDEV_EVID, cwd_buffer, 0);
|
||||||
|
@ -993,8 +976,6 @@ short cli_start_repl(short channel, const char * init_cwd) {
|
||||||
short i = 0;
|
short i = 0;
|
||||||
t_point cursor;
|
t_point cursor;
|
||||||
|
|
||||||
TRACE2("cli_start_repl(%d,\"%s\")", channel, init_cwd);
|
|
||||||
|
|
||||||
g_current_channel = channel;
|
g_current_channel = channel;
|
||||||
|
|
||||||
// Make sure we can see text properly on the channel
|
// Make sure we can see text properly on the channel
|
||||||
|
|
|
@ -98,4 +98,7 @@ extern short cli_txt_screen_get();
|
||||||
*/
|
*/
|
||||||
extern void cli_flag_cwd();
|
extern void cli_flag_cwd();
|
||||||
|
|
||||||
|
// Dummy routine don't use
|
||||||
|
extern short cmd_Dummy (short screen, int argc, const char * argv[]);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "sound_cmds.h"
|
#include "sound_cmds.h"
|
||||||
#include "sound_reg.h"
|
#include "sound_reg.h"
|
||||||
|
@ -17,6 +18,9 @@
|
||||||
|
|
||||||
#include "include/A2560K/YM2151.h"
|
#include "include/A2560K/YM2151.h"
|
||||||
#include "include/A2560K/YM2612_Ext.h"
|
#include "include/A2560K/YM2612_Ext.h"
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_A2560X || MODEL == MODEL_FOENIX_GENX
|
||||||
|
#include "include/A2560K/sound_a2560k.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Play a sound on the PSG
|
* Play a sound on the PSG
|
||||||
|
@ -69,7 +73,7 @@ short psg_test(short channel, int argc, const char * argv[]) {
|
||||||
* Play a sound on the SID
|
* Play a sound on the SID
|
||||||
*/
|
*/
|
||||||
short sid_test(short channel, int argc, const char * argv[]) {
|
short sid_test(short channel, int argc, const char * argv[]) {
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_EXTERNAL_SIDS
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
/* Allow the user to select the external OPM */
|
/* Allow the user to select the external OPM */
|
||||||
if ((strcmp(argv[1], "ext") == 0) || (strcmp(argv[1], "EXT") == 0)) {
|
if ((strcmp(argv[1], "ext") == 0) || (strcmp(argv[1], "EXT") == 0)) {
|
||||||
|
@ -85,7 +89,8 @@ short sid_test(short channel, int argc, const char * argv[]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
|
||||||
|
#if HAS_OPM
|
||||||
void Test_EXT_FM2151( void ) {
|
void Test_EXT_FM2151( void ) {
|
||||||
|
|
||||||
unsigned char i;
|
unsigned char i;
|
||||||
|
@ -198,6 +203,7 @@ short sid_test(short channel, int argc, const char * argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_OPN
|
||||||
void Test_EXT_FM2612( void ) {
|
void Test_EXT_FM2612( void ) {
|
||||||
unsigned char i;
|
unsigned char i;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
@ -446,8 +452,9 @@ short sid_test(short channel, int argc, const char * argv[]) {
|
||||||
// 400ms Delay (prolly not quite the time it needs)
|
// 400ms Delay (prolly not quite the time it needs)
|
||||||
for (j=0 ; j<262144; j++);
|
for (j=0 ; j<262144; j++);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_OPM
|
||||||
/*
|
/*
|
||||||
* Test tone for OPM: register, value
|
* Test tone for OPM: register, value
|
||||||
*/
|
*/
|
||||||
|
@ -651,6 +658,7 @@ short opn_test(short channel, int argc, const char * argv[]) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_OPL3
|
||||||
const unsigned char opl3_tone_on[] = {
|
const unsigned char opl3_tone_on[] = {
|
||||||
0x01,0x00, /* initialise */
|
0x01,0x00, /* initialise */
|
||||||
0x05,0x01, /* OPL3 mode, necessary for stereo */
|
0x05,0x01, /* OPL3 mode, necessary for stereo */
|
||||||
|
@ -733,8 +741,9 @@ short opl3_test(short channel, int argc, const char * argv[]) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_MIDI_PORTS
|
||||||
/*
|
/*
|
||||||
* Perform a transmit test on the MIDI ports
|
* Perform a transmit test on the MIDI ports
|
||||||
*/
|
*/
|
||||||
|
@ -780,10 +789,10 @@ short midi_tx_test(short channel, int argc, const char * argv[]) {
|
||||||
print(channel, message);
|
print(channel, message);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform a receive test on the MIDI ports
|
* Perform a receive test on the MIDI ports
|
||||||
*/
|
*/
|
||||||
|
@ -829,6 +838,7 @@ short midi_rx_test(short channel, int argc, const char * argv[]) {
|
||||||
print(channel, message);
|
print(channel, message);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -886,4 +896,5 @@ short midi_loop_test(short channel, int argc, const char * argv[]) {
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif // Testing of MIDI for A2560K
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "cli.h"
|
#include "cli.h"
|
||||||
#include "cli/test_cmds.h"
|
#include "cli/test_cmds.h"
|
||||||
#include "cli/sound_cmds.h"
|
#include "cli/sound_cmds.h"
|
||||||
|
@ -34,6 +35,9 @@
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
#include "dev/kbd_mo.h"
|
#include "dev/kbd_mo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_DUAL_SCREEN
|
||||||
#include "dev/txt_a2560k_a.h"
|
#include "dev/txt_a2560k_a.h"
|
||||||
#include "dev/txt_a2560k_b.h"
|
#include "dev/txt_a2560k_b.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -378,7 +382,7 @@ short cli_mem_test(short channel, int argc, const char * argv[]) {
|
||||||
char message[80];
|
char message[80];
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
if ((strcmp(argv[1], "MERA") == 0) || (strcmp(argv[1], "mera") == 0)) {
|
if ((strcmp(argv[1], "MERA") == 0) || (strcmp(argv[1], "mera") == 0)) {
|
||||||
mem_start = 0x02000000;
|
mem_start = 0x02000000;
|
||||||
|
@ -425,7 +429,7 @@ short cli_mem_test(short channel, int argc, const char * argv[]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
short cli_test_recalibrate(short screen, int argc, const char * argv[]) {
|
short cli_test_recalibrate(short screen, int argc, const char * argv[]) {
|
||||||
unsigned char buffer[512];
|
unsigned char buffer[512];
|
||||||
short i;
|
short i;
|
||||||
|
@ -625,8 +629,8 @@ short cli_test_create(short screen, int argc, const char * argv[]) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if HAS_PARALLEL_PORT
|
||||||
short cli_test_lpt(short screen, int argc, const char * argv[]) {
|
short cli_test_lpt(short screen, int argc, const char * argv[]) {
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
|
||||||
char message[80];
|
char message[80];
|
||||||
unsigned char scancode;
|
unsigned char scancode;
|
||||||
|
|
||||||
|
@ -704,12 +708,11 @@ short cli_test_lpt(short screen, int argc, const char * argv[]) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
short cmd_test_print(short screen, int argc, const char * argv[]) {
|
short cmd_test_print(short screen, int argc, const char * argv[]) {
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
|
||||||
const char * test_pattern = "0123456789ABCDEFGHIJKLMNOPQRTSUVWZXYZ\r\n";
|
const char * test_pattern = "0123456789ABCDEFGHIJKLMNOPQRTSUVWZXYZ\r\n";
|
||||||
|
|
||||||
char message[80];
|
char message[80];
|
||||||
|
@ -742,9 +745,9 @@ short cmd_test_print(short screen, int argc, const char * argv[]) {
|
||||||
sprintf(message, "Could not open channel to printer: %s\n", err_message(lpt));
|
sprintf(message, "Could not open channel to printer: %s\n", err_message(lpt));
|
||||||
print(screen, message);
|
print(screen, message);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the ANSI escape codes
|
* Test the ANSI escape codes
|
||||||
|
@ -849,7 +852,7 @@ static short cli_test_textscroll (short screen, int argc, const char * argv[]) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_DUAL_SCREEN
|
||||||
switch (screen) {
|
switch (screen) {
|
||||||
case TXT_SCREEN_A2560K_A:
|
case TXT_SCREEN_A2560K_A:
|
||||||
scr = (char*)ScreenText_A;
|
scr = (char*)ScreenText_A;
|
||||||
|
@ -859,6 +862,7 @@ static short cli_test_textscroll (short screen, int argc, const char * argv[]) {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// How would we even get here ??
|
// How would we even get here ??
|
||||||
|
// TODO return error somehow
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
|
@ -921,34 +925,42 @@ 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},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
{"FDC", "FDC DSKCHG | [<lba> [WRITE <data>]]: test reading/writing the MBR from the floppy drive", cli_test_fdc},
|
{"FDC", "FDC DSKCHG | [<lba> [WRITE <data>]]: test reading/writing the MBR from the floppy drive", cli_test_fdc},
|
||||||
|
#endif
|
||||||
|
#if HAS_SNES_GAMEPAD
|
||||||
{"GAMEPAD", "GAMEPAD [0 | 1]: test SNES gamepads", cli_test_gamepad},
|
{"GAMEPAD", "GAMEPAD [0 | 1]: test SNES gamepads", cli_test_gamepad},
|
||||||
#endif
|
#endif
|
||||||
{"JOY", "JOY: test the joystick", cli_test_joystick},
|
{"JOY", "JOY: test the joystick", cli_test_joystick},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_PARALLEL_PORT
|
||||||
{"LPT", "LPT: test the parallel port", cli_test_lpt},
|
{"LPT", "LPT: test the parallel port", cli_test_lpt},
|
||||||
#endif
|
#endif
|
||||||
{"MEM", "MEM [SYS|MERA]: test reading and writing of system or MERA memory", cli_mem_test},
|
{"MEM", "MEM [SYS|MERA]: test reading and writing of system or MERA memory", cli_mem_test},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_SUPERIO
|
||||||
{"MIDILOOP", "MIDILOOP: perform a loopback test on the MIDI ports", midi_loop_test},
|
{"MIDILOOP", "MIDILOOP: perform a loopback test on the MIDI ports", midi_loop_test},
|
||||||
{"MIDIRX", "MIDIRX: perform a receive test on the MIDI ports", midi_rx_test},
|
{"MIDIRX", "MIDIRX: perform a receive test on the MIDI ports", midi_rx_test},
|
||||||
{"MIDITX", "MIDITX: send a note to a MIDI keyboard", midi_tx_test},
|
{"MIDITX", "MIDITX: send a note to a MIDI keyboard", midi_tx_test},
|
||||||
#endif
|
#endif
|
||||||
|
#if HAS_OPL3
|
||||||
{"OPL3", "OPL3: test the OPL3 sound chip", opl3_test},
|
{"OPL3", "OPL3: test the OPL3 sound chip", opl3_test},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#endif
|
||||||
|
#if HAS_OPN
|
||||||
{"OPN", "OPN [EXT|INT]: test the OPN sound chip", opn_test},
|
{"OPN", "OPN [EXT|INT]: test the OPN sound chip", opn_test},
|
||||||
|
#endif
|
||||||
|
#if HAS_OPM
|
||||||
{"OPM", "OPM [EXT|INT]: test the OPM sound chip", opm_test},
|
{"OPM", "OPM [EXT|INT]: test the OPM sound chip", opm_test},
|
||||||
#endif
|
#endif
|
||||||
{"PANIC", "PANIC: test the kernel panic mechanism", cli_test_panic},
|
{"PANIC", "PANIC: test the kernel panic mechanism", cli_test_panic},
|
||||||
{"PS2", "PS2: test the PS/2 keyboard", cli_test_ps2},
|
{"PS2", "PS2: test the PS/2 keyboard", cli_test_ps2},
|
||||||
{"PSG", "PSG [EXT|INTL|INTR|INTS]: test the PSG sound chip", psg_test},
|
{"PSG", "PSG [EXT|INTL|INTR|INTS]: test the PSG sound chip", psg_test},
|
||||||
|
#if HAS_PARALLEL_PORT
|
||||||
{"PRINT", "PRINT: sent text to the printer", cmd_test_print},
|
{"PRINT", "PRINT: sent text to the printer", cmd_test_print},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#endif
|
||||||
|
#if HAS_FLOPPY
|
||||||
{"RECALIBRATE", "RECALIBRATE: recalibrate the floppy drive", cli_test_recalibrate},
|
{"RECALIBRATE", "RECALIBRATE: recalibrate the floppy drive", cli_test_recalibrate},
|
||||||
#endif
|
#endif
|
||||||
{"RTC", "RTC: Test the RTC interrupts", cli_test_rtc},
|
{"RTC", "RTC: Test the RTC interrupts", cli_test_rtc},
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
{"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
|
||||||
{"SID", "SID [EXT|INT]: test the SID sound chips", sid_test},
|
{"SID", "SID [EXT|INT]: test the SID sound chips", sid_test},
|
||||||
|
@ -1005,3 +1017,11 @@ short cmd_test(short screen, int argc, const char * argv[]) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is meant as a buffer so because of one byte missing in the transfer might get the whole command Test to fail.
|
||||||
|
// Don't use this routine.
|
||||||
|
short cmd_Dummy (short screen, int argc, const char * argv[])
|
||||||
|
{
|
||||||
|
argc = argc + 1;
|
||||||
|
return (argc);
|
||||||
|
}
|
|
@ -5,14 +5,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "log_level.h"
|
|
||||||
#ifndef DEFAULT_LOG_LEVEL
|
|
||||||
#define DEFAULT_LOG_LEVEL LOG_INFO
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "errors.h"
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
|
@ -95,15 +89,15 @@ const t_ansi_seq ansi_sequence[] = {
|
||||||
* c = the character to test
|
* c = the character to test
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* false if the character is not an ANSI initial, true if it is
|
* 0 if the character is not an ANSI initial, 1 if it is
|
||||||
*/
|
*/
|
||||||
bool ansi_start_code(char c) {
|
short ansi_start_code(char c) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '\x1b':
|
case '\x1b':
|
||||||
return true;
|
return 1;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,17 +527,17 @@ short con_read_b(p_channel chan) {
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
#ifdef KBD_POLLED
|
#ifdef KBD_POLLED
|
||||||
//ps2_mouse_get_packet();
|
ps2_mouse_get_packet();
|
||||||
c = kbdmo_getc_poll();
|
c = kbdmo_getc_poll();
|
||||||
#else
|
#else
|
||||||
c = kbdmo_getc();
|
c = kbdmo_getc();
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef KBD_POLLED
|
#ifdef KBD_POLLED
|
||||||
c = kbd_getc_poll();
|
c = kbd_getc_poll();
|
||||||
#else
|
#else
|
||||||
c = kbd_getc();
|
c = kbd_getc();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -651,7 +645,7 @@ short con_write(p_channel chan, const uint8_t * buffer, short size) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool con_has_input(p_channel chan) {
|
short con_has_input(p_channel chan) {
|
||||||
p_console_data con_data;
|
p_console_data con_data;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
|
@ -660,7 +654,7 @@ bool con_has_input(p_channel chan) {
|
||||||
|
|
||||||
if (con_data->key_buffer != 0) {
|
if (con_data->key_buffer != 0) {
|
||||||
/* If we already peeked and have a character... return true */
|
/* If we already peeked and have a character... return true */
|
||||||
return true;
|
return 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Otherwise, peek at the keyboard to see if there is a valid key */
|
/* Otherwise, peek at the keyboard to see if there is a valid key */
|
||||||
|
@ -682,12 +676,12 @@ bool con_has_input(p_channel chan) {
|
||||||
|
|
||||||
if (c == 0) {
|
if (c == 0) {
|
||||||
/* No: return false */
|
/* No: return false */
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* Yes: save the key we got and return true */
|
/* Yes: save the key we got and return true */
|
||||||
con_data->key_buffer = c;
|
con_data->key_buffer = c;
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -796,15 +790,27 @@ short con_install() {
|
||||||
dev.ioctrl = con_ioctrl;
|
dev.ioctrl = con_ioctrl;
|
||||||
|
|
||||||
result = cdev_register(&dev);
|
result = cdev_register(&dev);
|
||||||
if (result != E_OK) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev.name = "EVID";
|
dev.name = "EVID";
|
||||||
dev.number = CDEV_EVID;
|
dev.number = CDEV_EVID;
|
||||||
|
dev.init = con_init;
|
||||||
|
dev.open = con_open;
|
||||||
|
dev.close = con_close;
|
||||||
|
dev.read = con_read;
|
||||||
|
dev.readline = con_readline;
|
||||||
|
dev.read_b = con_read_b;
|
||||||
|
dev.write = con_write;
|
||||||
|
dev.write_b = con_write_b;
|
||||||
|
dev.flush = con_flush;
|
||||||
|
dev.seek = con_seek;
|
||||||
|
dev.status = con_status;
|
||||||
|
dev.ioctrl = con_ioctrl;
|
||||||
|
|
||||||
result = cdev_register(&dev);
|
result = cdev_register(&dev);
|
||||||
if (result != E_OK) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,7 +818,7 @@ short con_install() {
|
||||||
|
|
||||||
chan_open(CDEV_CONSOLE, 0, 0);
|
chan_open(CDEV_CONSOLE, 0, 0);
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_DUAL_SCREEN
|
||||||
chan_open(CDEV_EVID, 0, 0);
|
chan_open(CDEV_EVID, 0, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
* Definitions support low level FDC device driver
|
* Definitions support low level FDC device driver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "features.h"
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Parallel port printer driver
|
* Parallel port printer driver
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "errors.h"
|
#include "errors.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "lpt_reg.h"
|
#include "lpt_reg.h"
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
#include "syscalls.h"
|
#include "syscalls.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_PARALLEL_PORT
|
||||||
|
|
||||||
#define MAX_LPT_JIFFIES 600
|
#define MAX_LPT_JIFFIES 600
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Definitions for the MIDI ports
|
* Definitions for the MIDI ports
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "midi_reg.h"
|
#include "midi_reg.h"
|
||||||
#include "dev/channel.h"
|
#include "dev/channel.h"
|
||||||
#include "dev/midi.h"
|
#include "dev/midi.h"
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_MIDI_PORTS
|
||||||
|
|
||||||
/** Timeout for waiting on the MIDI interface */
|
/** Timeout for waiting on the MIDI interface */
|
||||||
const long midi_timeout = 60;
|
const long midi_timeout = 60;
|
||||||
|
@ -18,37 +19,37 @@ const long midi_timeout = 60;
|
||||||
/**
|
/**
|
||||||
* Wait for data to be ready to read...
|
* Wait for data to be ready to read...
|
||||||
*
|
*
|
||||||
* @return true on success, false if there is a timeout
|
* @return 1 on success, 0 if there is a timeout
|
||||||
*/
|
*/
|
||||||
bool midi_can_read() {
|
short midi_can_read() {
|
||||||
long target = timers_jiffies() + midi_timeout;
|
long target = timers_jiffies() + midi_timeout;
|
||||||
do {
|
do {
|
||||||
if ((*MIDI_STAT & MIDI_STAT_RX_EMPTY) == 0) {
|
if ((*MIDI_STAT & MIDI_STAT_RX_EMPTY) == 0) {
|
||||||
// There is data waiting
|
// There is data waiting
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
} while (target > timers_jiffies());
|
} while (target > timers_jiffies());
|
||||||
|
|
||||||
// We have waited too long
|
// We have waited too long
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for the MIDI transmiter to be empty...
|
* Wait for the MIDI transmiter to be empty...
|
||||||
*
|
*
|
||||||
* @return true on success, false if there is a timeout
|
* @return 1 on success, 0 if there is a timeout
|
||||||
*/
|
*/
|
||||||
short midi_can_write() {
|
short midi_can_write() {
|
||||||
long target = timers_jiffies() + midi_timeout;
|
long target = timers_jiffies() + midi_timeout;
|
||||||
do {
|
do {
|
||||||
if ((*MIDI_STAT & MIDI_STAT_TX_BUSY) != 0) {
|
if ((*MIDI_STAT & MIDI_STAT_TX_BUSY) != 0) {
|
||||||
// The transmit buffer is empty
|
// The transmit buffer is empty
|
||||||
return true;
|
return 1;
|
||||||
}
|
}
|
||||||
} while (target > timers_jiffies());
|
} while (target > timers_jiffies());
|
||||||
|
|
||||||
// We have waited too long
|
// We have waited too long
|
||||||
return false;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -93,11 +93,15 @@ int text_init() {
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
border_color = 0x00004000; /* Dark blue border for the K */
|
border_color = 0x00004000; /* Dark blue border for the K */
|
||||||
|
#elif MODEL == MODEL_FOENIX_GENX
|
||||||
|
border_color = 0x00200020;
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560X
|
||||||
|
border_color = 0x00002020;
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
border_color = 0x00008080; /* Dark blue border for the K */
|
border_color = 0x00008080; /* Dark blue border for the K */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
p_text_channel chan_b = &text_channel[1];
|
p_text_channel chan_b = &text_channel[1];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -121,7 +125,7 @@ int text_init() {
|
||||||
text_channel[i].y = 0;
|
text_channel[i].y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
// Init CLUT for the Color Memory
|
// Init CLUT for the Color Memory
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
unsigned long fg_color = fg_color_lut[2*i + 1] << 16 | fg_color_lut[2*i];
|
unsigned long fg_color = fg_color_lut[2*i + 1] << 16 | fg_color_lut[2*i];
|
||||||
|
@ -150,7 +154,7 @@ int text_init() {
|
||||||
chan_a->cursor_position = CursorControlReg_H_A;
|
chan_a->cursor_position = CursorControlReg_H_A;
|
||||||
chan_a->border_control = BorderControlReg_L_A;
|
chan_a->border_control = BorderControlReg_L_A;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
/* A2560K has support for 8x16 characters and therefore font sizes */
|
/* A2560K has support for 8x16 characters and therefore font sizes */
|
||||||
chan_a->font_size_ctrl = FONT_Size_Ctrl_A;
|
chan_a->font_size_ctrl = FONT_Size_Ctrl_A;
|
||||||
chan_a->font_count_ctrl = FONT_Count_Ctrl_A;
|
chan_a->font_count_ctrl = FONT_Count_Ctrl_A;
|
||||||
|
@ -212,7 +216,7 @@ int text_init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
|
||||||
chan_b->master_control = MasterControlReg_B;
|
chan_b->master_control = MasterControlReg_B;
|
||||||
chan_b->text_cells = ScreenText_B;
|
chan_b->text_cells = ScreenText_B;
|
||||||
|
@ -606,7 +610,7 @@ void text_scroll(short screen) {
|
||||||
short row, column;
|
short row, column;
|
||||||
p_text_channel chan = &text_channel[screen];
|
p_text_channel chan = &text_channel[screen];
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
for (row = 0; row < chan->rows_visible - 1; row++) {
|
for (row = 0; row < chan->rows_visible - 1; row++) {
|
||||||
short offset1 = row * chan->columns_max;
|
short offset1 = row * chan->columns_max;
|
||||||
short offset2 = (row + 1) * chan->columns_max;
|
short offset2 = (row + 1) * chan->columns_max;
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
#include "sys_general.h"
|
||||||
#include "A2560K/vky_chan_a.h"
|
#include "A2560K/vky_chan_a.h"
|
||||||
#include "A2560K/vky_chan_b.h"
|
#include "A2560K/vky_chan_b.h"
|
||||||
#include "dev/txt_screen.h"
|
#include "dev/txt_screen.h"
|
||||||
|
@ -25,7 +26,11 @@ const unsigned long a2560k_a_lut[VKY3_A_LUT_SIZE] = {
|
||||||
0xFFAA5500, // Mid-Tone Orange
|
0xFFAA5500, // Mid-Tone Orange
|
||||||
0xFF008080, // Mid-Tone Cian
|
0xFF008080, // Mid-Tone Cian
|
||||||
0xFF808080, // 50% Grey
|
0xFF808080, // 50% Grey
|
||||||
|
#if MACHINE_FOENIX_A2560X
|
||||||
|
0xFF202020, // Dark Grey
|
||||||
|
#else
|
||||||
0xFF555555, // Dark Grey
|
0xFF555555, // Dark Grey
|
||||||
|
#endif
|
||||||
0xFFFF0000, // Bright Red
|
0xFFFF0000, // Bright Red
|
||||||
0xFF55FF55, // Bright Green
|
0xFF55FF55, // Bright Green
|
||||||
0xFFFFFF55, // Bright Yellow
|
0xFFFFFF55, // Bright Yellow
|
||||||
|
@ -601,7 +606,11 @@ void txt_a2560k_a_init() {
|
||||||
txt_a2560k_a_set_resolution(800, 600); /* Default resolution is 800x600 */
|
txt_a2560k_a_set_resolution(800, 600); /* Default resolution is 800x600 */
|
||||||
|
|
||||||
/* Set the default color: light grey on blue */
|
/* Set the default color: light grey on blue */
|
||||||
|
#if MACHINE_FOENIX_A2560X
|
||||||
|
txt_a2560k_a_set_color(0x0F, 0x08);
|
||||||
|
#else
|
||||||
txt_a2560k_a_set_color(0x07, 0x04);
|
txt_a2560k_a_set_color(0x07, 0x04);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set the font */
|
/* Set the font */
|
||||||
txt_a2560k_a_set_font(8, 8, MSX_CP437_8x8_bin); /* Use 8x8 font */
|
txt_a2560k_a_set_font(8, 8, MSX_CP437_8x8_bin); /* Use 8x8 font */
|
||||||
|
@ -610,8 +619,13 @@ void txt_a2560k_a_init() {
|
||||||
txt_a2560k_a_set_cursor(1, 0, 0xB1);
|
txt_a2560k_a_set_cursor(1, 0, 0xB1);
|
||||||
|
|
||||||
/* Set the border */
|
/* Set the border */
|
||||||
|
#if MACHINE_FOENIX_A2560X
|
||||||
|
txt_a2560k_a_set_border(8, 8); /* Set up the border */
|
||||||
|
txt_a2560k_a_set_border_color(0x10, 0x00, 0x10);
|
||||||
|
#else
|
||||||
txt_a2560k_a_set_border(16, 16); /* Set up the border */
|
txt_a2560k_a_set_border(16, 16); /* Set up the border */
|
||||||
txt_a2560k_a_set_border_color(0, 0, 0x3f);
|
txt_a2560k_a_set_border_color(0, 0, 0x3f);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enable set_sizes, now that everything is set up initially
|
* Enable set_sizes, now that everything is set up initially
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "sys_general.h"
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "A2560K/vky_chan_a.h"
|
#include "A2560K/vky_chan_a.h"
|
||||||
#include "A2560K/vky_chan_b.h"
|
#include "A2560K/vky_chan_b.h"
|
||||||
|
@ -16,22 +17,26 @@ extern const unsigned char MSX_CP437_8x8_bin[];
|
||||||
|
|
||||||
/* Default text color lookup table values (AARRGGBB) */
|
/* Default text color lookup table values (AARRGGBB) */
|
||||||
const unsigned long a2560k_b_lut[VKY3_B_LUT_SIZE] = {
|
const unsigned long a2560k_b_lut[VKY3_B_LUT_SIZE] = {
|
||||||
0xFF000000, // Black (transparent)
|
0xFF000000, // Black (transparent) - 0x00
|
||||||
0xFF800000, // Mid-Tone Red
|
0xFF800000, // Mid-Tone Red - 0x01
|
||||||
0xFF008000, // Mid-Tone Green
|
0xFF008000, // Mid-Tone Green - 0x02
|
||||||
0xFF808000, // Mid-Tone Yellow
|
0xFF808000, // Mid-Tone Yellow - 0x03
|
||||||
0xFF000080, // Mid-Tone Blue
|
0xFF000080, // Mid-Tone Blue - 0x04
|
||||||
0xFFAA5500, // Mid-Tone Orange
|
0xFFAA5500, // Mid-Tone Orange - 0x05
|
||||||
0xFF008080, // Mid-Tone Cian
|
0xFF008080, // Mid-Tone Cian - 0x06
|
||||||
0xFF808080, // 50% Grey
|
0xFF808080, // 50% Grey - 0x07
|
||||||
|
#if MACHINE_FOENIX_A2560X
|
||||||
|
0xFF202020, // Dark Grey
|
||||||
|
#else
|
||||||
0xFF555555, // Dark Grey
|
0xFF555555, // Dark Grey
|
||||||
0xFFFF0000, // Bright Red
|
#endif
|
||||||
0xFF55FF55, // Bright Green
|
0xFFFF0000, // Bright Red - 0x09
|
||||||
0xFFFFFF55, // Bright Yellow
|
0xFF55FF55, // Bright Green - 0x0A
|
||||||
0xFF5555FF, // Bright Blue
|
0xFFFFFF55, // Bright Yellow - 0x0B
|
||||||
0xFFFF7FFF, // Bright Orange
|
0xFF5555FF, // Bright Blue - 0x0C
|
||||||
0xFF55FFFF, // Bright Cyan
|
0xFFFF7FFF, // Bright Orange - 0x0D
|
||||||
0xFFFFFFFF // White
|
0xFF55FFFF, // Bright Cyan - 0x0E
|
||||||
|
0xFFFFFFFF // White - 0x0F
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -634,8 +639,12 @@ void txt_a2560k_b_init() {
|
||||||
/* Set the resolution */
|
/* Set the resolution */
|
||||||
txt_a2560k_b_set_resolution(640, 480); /* Default resolution is 640x480 */
|
txt_a2560k_b_set_resolution(640, 480); /* Default resolution is 640x480 */
|
||||||
|
|
||||||
/* Set the default color: light grey on blue */
|
/* Set default colour */
|
||||||
txt_a2560k_b_set_color(0x07, 0x04);
|
#if MACHINE_FOENIX_A2560X
|
||||||
|
txt_a2560k_a_set_color(0x0F, 0x08);
|
||||||
|
#else
|
||||||
|
txt_a2560k_a_set_color(0x07, 0x04);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set the font */
|
/* Set the font */
|
||||||
txt_a2560k_b_set_font(8, 8, MSX_CP437_8x8_bin); /* Use 8x8 font */
|
txt_a2560k_b_set_font(8, 8, MSX_CP437_8x8_bin); /* Use 8x8 font */
|
||||||
|
@ -644,9 +653,13 @@ void txt_a2560k_b_init() {
|
||||||
txt_a2560k_b_set_cursor(1, 0, 0xB1);
|
txt_a2560k_b_set_cursor(1, 0, 0xB1);
|
||||||
|
|
||||||
/* Set the border */
|
/* Set the border */
|
||||||
txt_a2560k_b_set_border(16, 16); /* Set up the border */
|
#if MACHINE_FOENIX_A2560X
|
||||||
txt_a2560k_b_set_border_color(0, 0, 0x3f);
|
txt_a2560k_a_set_border(8, 8); /* Set up the border */
|
||||||
|
txt_a2560k_a_set_border_color(0x10, 0x00, 0x10);
|
||||||
|
#else
|
||||||
|
txt_a2560k_a_set_border(16, 16); /* Set up the border */
|
||||||
|
txt_a2560k_a_set_border_color(0, 0, 0x3f);
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* Enable set_sizes, now that everything is set up initially
|
* Enable set_sizes, now that everything is set up initially
|
||||||
* And calculate the size of the screen
|
* And calculate the size of the screen
|
||||||
|
|
|
@ -79,21 +79,14 @@ void uart_init(short uart) {
|
||||||
volatile unsigned char * uart_base = uart_get_base(uart);
|
volatile unsigned char * uart_base = uart_get_base(uart);
|
||||||
|
|
||||||
if (uart_base) {
|
if (uart_base) {
|
||||||
/* Default default speed */
|
/* Default to 9600 bps */
|
||||||
uart_setbps(uart, UART_115200);
|
uart_setbps(uart, UART_9600);
|
||||||
|
|
||||||
/* Set: no parity, 1 stop bit, 8 data bits */
|
/* Set: no parity, 1 stop bit, 8 data bits */
|
||||||
uart_setlcr(uart, LCR_PARITY_NONE | LCR_STOPBIT_1 | LCR_DATABITS_8);
|
uart_setlcr(uart, LCR_PARITY_NONE | LCR_STOPBIT_1 | LCR_DATABITS_8);
|
||||||
|
|
||||||
#if 0 && (MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS) // TODO Fix ?
|
|
||||||
/* The A2560U has a 16750 rather than 16550
|
|
||||||
uart_base[UART_FCR] = 39;
|
|
||||||
uart_base[UART_IER] = 0;
|
|
||||||
uart_base[UART_MCR] = 3;
|
|
||||||
#else
|
|
||||||
/* Enable FIFO, set for 56 byte trigger level */
|
/* Enable FIFO, set for 56 byte trigger level */
|
||||||
uart_base[UART_FCR] = 0xC1;
|
uart_base[UART_FCR] = 0xC1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,12 +109,20 @@ bool uart_has_bytes(short uart) {
|
||||||
* Return true (non-zero) if the UART transmit FIFO is not full
|
* Return true (non-zero) if the UART transmit FIFO is not full
|
||||||
*
|
*
|
||||||
* @param uart the number of the UART: 0 for COM1, 1 for COM2
|
* @param uart the number of the UART: 0 for COM1, 1 for COM2
|
||||||
* @return non-zero if the FIFO can accept a byte, false if it is full
|
* @return non-zero if the FIFO can accept a byte, 0 if it is full
|
||||||
*/
|
*/
|
||||||
bool uart_can_send(short uart) {
|
short uart_can_send(short uart) {
|
||||||
volatile unsigned char * uart_base = uart_get_base(uart);
|
volatile unsigned char * uart_base = uart_get_base(uart);
|
||||||
|
|
||||||
return uart_base && (uart_base[UART_LSR] & LSR_XMIT_EMPTY) ? true : false;
|
if (uart_base) {
|
||||||
|
if (uart_base[UART_LSR] & LSR_XMIT_EMPTY) {
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -210,7 +211,7 @@ short uart_status(p_channel chan) {
|
||||||
* @param mode an unused parameter
|
* @param mode an unused parameter
|
||||||
* @return 0 on success, any other number is an error
|
* @return 0 on success, any other number is an error
|
||||||
*/
|
*/
|
||||||
short uart_open(p_channel chan, const unsigned char * spec, short mode) {
|
short uart_open(p_channel chan, const char * spec, short mode) {
|
||||||
unsigned short bps = 0, lcr = 0;
|
unsigned short bps = 0, lcr = 0;
|
||||||
char * saveptr;
|
char * saveptr;
|
||||||
char spec_copy[80];
|
char spec_copy[80];
|
||||||
|
@ -375,7 +376,7 @@ short uart_read_b(p_channel chan) {
|
||||||
* @param size the size of the buffer.
|
* @param size the size of the buffer.
|
||||||
* @return number of bytes read, any negative number is an error code
|
* @return number of bytes read, any negative number is an error code
|
||||||
*/
|
*/
|
||||||
short uart_read(p_channel chan, unsigned char * buffer, short size) {
|
short uart_read(p_channel chan, char * buffer, short size) {
|
||||||
short i = 0, count = 0;
|
short i = 0, count = 0;
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
buffer[i] = uart_get(cdev_to_uart(chan->dev));
|
buffer[i] = uart_get(cdev_to_uart(chan->dev));
|
||||||
|
@ -393,7 +394,7 @@ short uart_read(p_channel chan, unsigned char * buffer, short size) {
|
||||||
* @param size the size of the buffer.
|
* @param size the size of the buffer.
|
||||||
* @returns number of bytes read, any negative number is an error code
|
* @returns number of bytes read, any negative number is an error code
|
||||||
*/
|
*/
|
||||||
short uart_readline(p_channel chan, unsigned char * buffer, short size) {
|
short uart_readline(p_channel chan, char * buffer, short size) {
|
||||||
short i = 0, count = 0;
|
short i = 0, count = 0;
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
char c = uart_get(cdev_to_uart(chan->dev));
|
char c = uart_get(cdev_to_uart(chan->dev));
|
||||||
|
@ -427,7 +428,7 @@ short uart_write_b(p_channel chan, unsigned char c) {
|
||||||
* @param size the size of the buffer.
|
* @param size the size of the buffer.
|
||||||
* @return number of bytes written, any negative number is an error code
|
* @return number of bytes written, any negative number is an error code
|
||||||
*/
|
*/
|
||||||
short uart_write(p_channel chan, const unsigned char * buffer, short size) {
|
short uart_write(p_channel chan, const char * buffer, short size) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < size; i++) {
|
for (i = 0; i < size; i++) {
|
||||||
uart_put(cdev_to_uart(chan->dev), buffer[i]);
|
uart_put(cdev_to_uart(chan->dev), buffer[i]);
|
||||||
|
@ -463,7 +464,6 @@ short uart_install() {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
|
||||||
dev.name = "COM2";
|
dev.name = "COM2";
|
||||||
dev.number = CDEV_COM2;
|
dev.number = CDEV_COM2;
|
||||||
|
|
||||||
|
@ -472,5 +472,4 @@ short uart_install() {
|
||||||
if (result) {
|
if (result) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
#define DEFAULT_LOG_LEVEL LOG_TRACE
|
#define DEFAULT_LOG_LEVEL LOG_TRACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "features.h"
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
#include "simpleio.h"
|
#include "simpleio.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -17,9 +19,14 @@
|
||||||
#include "interrupt.h"
|
#include "interrupt.h"
|
||||||
#include "gabe_reg.h"
|
#include "gabe_reg.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_SUPERIO
|
||||||
#include "superio.h"
|
#include "superio.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
#include "dev/kbd_mo.h"
|
#include "dev/kbd_mo.h"
|
||||||
|
#endif
|
||||||
|
#if HAS_DUAL_SCREEN
|
||||||
#include "dev/txt_a2560k_a.h"
|
#include "dev/txt_a2560k_a.h"
|
||||||
#include "dev/txt_a2560k_b.h"
|
#include "dev/txt_a2560k_b.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
|
@ -57,7 +64,7 @@ const char* VolumeStr[FF_VOLUMES] = { "sd", "fd", "hd" };
|
||||||
|
|
||||||
extern unsigned long __memory_start;
|
extern unsigned long __memory_start;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_SUPERIO
|
||||||
/*
|
/*
|
||||||
* Initialize the SuperIO registers
|
* Initialize the SuperIO registers
|
||||||
*/
|
*/
|
||||||
|
@ -145,7 +152,7 @@ void initialize() {
|
||||||
|
|
||||||
/* Initialize the text channels */
|
/* Initialize the text channels */
|
||||||
txt_init();
|
txt_init();
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_DUAL_SCREEN
|
||||||
txt_a2560k_a_install();
|
txt_a2560k_a_install();
|
||||||
txt_a2560k_b_install();
|
txt_a2560k_b_install();
|
||||||
txt_init_screen(TXT_SCREEN_A2560K_A);
|
txt_init_screen(TXT_SCREEN_A2560K_A);
|
||||||
|
@ -153,6 +160,8 @@ void initialize() {
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
txt_a2560u_install();
|
txt_a2560u_install();
|
||||||
txt_init_screen(TXT_SCREEN_A2560U);
|
txt_init_screen(TXT_SCREEN_A2560U);
|
||||||
|
#else
|
||||||
|
#error Cannot identify screen setup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
log(LOG_INFO, "Text system initialized");
|
log(LOG_INFO, "Text system initialized");
|
||||||
|
@ -164,7 +173,7 @@ void initialize() {
|
||||||
/* Initialize the interrupt system */
|
/* Initialize the interrupt system */
|
||||||
int_init();
|
int_init();
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_SUPERIO
|
||||||
/* Initialize the SuperIO chip */
|
/* Initialize the SuperIO chip */
|
||||||
init_superio();
|
init_superio();
|
||||||
#endif
|
#endif
|
||||||
|
@ -243,7 +252,9 @@ void initialize() {
|
||||||
} else {
|
} else {
|
||||||
log(LOG_INFO, "A2560K built-in keyboard initialized.");
|
log(LOG_INFO, "A2560K built-in keyboard initialized.");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_SUPERIO
|
||||||
if (res = lpt_install()) {
|
if (res = lpt_install()) {
|
||||||
log_num(LOG_ERROR, "FAILED: LPT installation", res);
|
log_num(LOG_ERROR, "FAILED: LPT installation", res);
|
||||||
} else {
|
} else {
|
||||||
|
@ -263,8 +274,6 @@ void initialize() {
|
||||||
log(LOG_INFO, "Serial ports initialized.");
|
log(LOG_INFO, "Serial ports initialized.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (res = cli_init()) {
|
if (res = cli_init()) {
|
||||||
log_num(LOG_ERROR, "FAILED: CLI initialization", res);
|
log_num(LOG_ERROR, "FAILED: CLI initialization", res);
|
||||||
} else {
|
} else {
|
||||||
|
@ -283,9 +292,11 @@ void initialize() {
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
short result;
|
short result;
|
||||||
short i;
|
short i;
|
||||||
|
*((volatile uint32_t*const)0xfec80008) = 0xff00ff00L;
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
|
//*((volatile uint32_t*const)0xfec00000) = 0x16;
|
||||||
|
|
||||||
// Make sure the command path is set to the default before we get started
|
// Make sure the command path is set to the default before we get started
|
||||||
cli_command_set("");
|
cli_command_set("");
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#define PSG_PORT ((volatile uint8_t *)0x00B20130) /* Control register for the SN76489 */
|
#define PSG_PORT ((volatile uint8_t *)0x00B20130) /* Control register for the SN76489 */
|
||||||
#define OPL3_PORT ((volatile uint8_t *)0x00B20200) /* Access port for the OPL3 */
|
#define OPL3_PORT ((volatile uint8_t *)0x00B20200) /* Access port for the OPL3 */
|
||||||
#define CODEC ((volatile uint16_t *)0x00B20E00) /* Control register for the CODEC */
|
#define CODEC ((volatile uint16_t *)0x00B20E00) /* Control register for the CODEC */
|
||||||
#define N_SIDS 2 /* Number of SIDs supported by the system */
|
|
||||||
#define SID_INT_L ((volatile uint8_t *)0x00B21000) /* Left SID base */
|
#define SID_INT_L ((volatile uint8_t *)0x00B21000) /* Left SID base */
|
||||||
#define SID_INT_R ((volatile uint8_t *)0x00B21200) /* Right SID base */
|
#define SID_INT_R ((volatile uint8_t *)0x00B21200) /* Right SID base */
|
||||||
#define SID_INT_N ((volatile uint8_t *)0x00B21400) /* Both SIDs */
|
#define SID_INT_N ((volatile uint8_t *)0x00B21400) /* Both SIDs */
|
||||||
|
|
59
src/include/A2560X/gabe_a2560x.h
Normal file
59
src/include/A2560X/gabe_a2560x.h
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/**
|
||||||
|
* @file gabe_a2560k.h
|
||||||
|
*
|
||||||
|
* Define miscellaneous GABE registers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __GABE_A2560K_H
|
||||||
|
#define __GABE_A2560K_H
|
||||||
|
|
||||||
|
// These are 32bits Wide Registers since they are internal to the VICKY III
|
||||||
|
#define GABE_CTRL_REG ((volatile unsigned int *)0xFEC00000)
|
||||||
|
#define POWER_ON_LED 0x00000001
|
||||||
|
#define SDCARD_LED 0x00000002
|
||||||
|
#define BUZZER_CONTROL 0x00000010
|
||||||
|
#define MANUAL_RESET 0x00008000 // Make sure the word "DEAD" is written in GABE_RESET_ID
|
||||||
|
|
||||||
|
#define GABE_LFSR_REG0 ((volatile unsigned int *)0xFEC00004)
|
||||||
|
|
||||||
|
#define RGB_LED ((volatile unsigned int *)0xFEC00008) // Writing Only - A2560K Only - 0x__RRGGBB
|
||||||
|
#define GABE_LFSR_STATDATA ((volatile unsigned int *)0xFEC00008) // Read Only
|
||||||
|
|
||||||
|
#define GABE_SUBVER_ID ((volatile unsigned int *)0xFEC0000C) // Subversion[31:16], Machine ID[3:2] - Read Only
|
||||||
|
#define GABE_CPU_ID_MASK 0x0000FF00
|
||||||
|
#define GABE_CPU_SPD_MASK 0x000000E0
|
||||||
|
#define GABE_ID_MASK 0x0000000C
|
||||||
|
#define GABE_CHIP_SV_MASK 0xFFFF0000
|
||||||
|
|
||||||
|
#define GABE_CHIP_VERSION ((volatile unsigned int *)0xFEC00010) // Number[31:16], Version[15:0]
|
||||||
|
#define GABE_CHIP_V_MASK 0x0000FFFF
|
||||||
|
#define GABE_CHIP_N_MASK 0xFFFF0000
|
||||||
|
|
||||||
|
|
||||||
|
#define GABE_FIRMWARE_DATE ((volatile unsigned int *)0xFEC00014) // xxDDMMYY
|
||||||
|
#define GABE_FIRMWARE_DATE_YEAR_MASK 0x000000FF
|
||||||
|
#define GABE_FIRMWARE_DATE_MONTH_MASK 0x0000FF00
|
||||||
|
#define GABE_FIRMWARE_DATE_DAY_MASK 0x00FF0000
|
||||||
|
|
||||||
|
// Those registers in the GenX/A2560X are 16bits Wide.
|
||||||
|
#define GABE_DIP_REG ((volatile unsigned short *)0xFEC00518)
|
||||||
|
#define GABE_DIP_BOOT_MASK 0x0003 /* Mask for the boot mode: */
|
||||||
|
#define GABE_DIP_USER_MASK 0x0300 /* Mask for the user switches: */
|
||||||
|
|
||||||
|
// This applies to GenX and A2560X ONLY
|
||||||
|
#define GABE_SUB_MODEL_ID ((volatile unsigned short *)0xFEC00514)
|
||||||
|
#define GABE_SUB_MOD_MASK 0x0003 /* Mask for the sub-model: PB, LB, CU*/
|
||||||
|
|
||||||
|
#define GABE_GENX_STAT_LEDS ((volatile unsigned long *)0xFEC0000C)
|
||||||
|
#define GABE_GENX_STAT_LED_0_B 0x00000001 /* LED 0 (Close to DEL key) -- Blue ON */
|
||||||
|
#define GABE_GENX_STAT_LED_0_G 0x00000002 /* LED 0 (Close to DEL key) -- Green ON */
|
||||||
|
#define GABE_GENX_STAT_LED_0_R 0x00000004 /* LED 0 (Close to DEL key) -- Red ON */
|
||||||
|
#define GABE_GENX_STAT_LED_1_B 0x00000008 /* LED 1 (Below #0) -- Blue ON */
|
||||||
|
#define GABE_GENX_STAT_LED_1_G 0x00000010 /* LED 1 (Below #0) -- Green ON */
|
||||||
|
#define GABE_GENX_STAT_LED_1_R 0x00000020 /* LED 1 (Below #0) -- Red ON */
|
||||||
|
#define GABE_GENX_STAT_LED_2_B 0x00000040 /* LED 2 (above arrow) -- Blue ON */
|
||||||
|
#define GABE_GENX_STAT_LED_2_G 0x00000080 /* LED 2 (above arrow) -- Green ON */
|
||||||
|
#define GABE_GENX_STAT_LED_2_R 0x00000100 /* LED 2 (above arrow) -- Red ON */
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_FLOPPY
|
||||||
#include "A2560K/fdc_a2560k.h"
|
#include "A2560K/fdc_a2560k.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
71
src/include/features.h
Normal file
71
src/include/features.h
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
#ifndef _FEATURES_H
|
||||||
|
#define _FEATURES_H
|
||||||
|
|
||||||
|
#include "sys_general.h"
|
||||||
|
|
||||||
|
// This files, defines, for each Foenix model, the available features.
|
||||||
|
// This drives compilation switches to include or drivers, tests in the CLI, etc.
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X || MODEL == MODEL_FOENIX_A2560K
|
||||||
|
#define HAS_SUPERIO 1
|
||||||
|
|
||||||
|
// Actually, for the X this depends on the submodel. E.g. Pizza Box doesn't have floppy.
|
||||||
|
#define HAS_FLOPPY 1
|
||||||
|
|
||||||
|
// Actually, for the X this depends on the submodel. E.g. Pizza Box doesn't have floppy.
|
||||||
|
#define HAS_PARALLEL_PORT 1
|
||||||
|
|
||||||
|
#define HAS_DUAL_SCREEN 1
|
||||||
|
|
||||||
|
#define HAS_MIDI_PORTS 1
|
||||||
|
#define HAS_EXTERNAL_SIDS 1
|
||||||
|
|
||||||
|
// Sounchips
|
||||||
|
#define HAS_OPN 1
|
||||||
|
#define HAS_OPM 1
|
||||||
|
#define HAS_SNES_GAMEPAD 1
|
||||||
|
#define HAS_OPL3 1
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560U
|
||||||
|
#define HAS_OPL3 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Defaults -----------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef HAS_SUPERIO // The Super I/O controller chip for PS/2 serial/parallel/floppy etc.
|
||||||
|
#define HAS_SUPERIO 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_FLOPPY // Floppy disk drive presence
|
||||||
|
#define HAS_FLOPPY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_PARALLEL_PORT // Parallel/Centronics port presence
|
||||||
|
#define HAS_PARALLEL_PORT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_MIDI_PORTS // Midi IN/OUT
|
||||||
|
#define HAS_MIDI_PORTS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_DUAL_SCREEN // Computer has 2 screen ports
|
||||||
|
#define HAS_DUAL_SCREEN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_OPN // OPN soundchip presence
|
||||||
|
#define HAS_OPN 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_OPM // OPM soundchip presence
|
||||||
|
#define HAS_OPM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_OPL3 // YMF262 OPL3 soundchip presence
|
||||||
|
#define HAS_OPL3 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAS_SNES_GAMEPAD // Super Nintendo gamepad connectors (even if through adapter)
|
||||||
|
#define HAS_SNES_GAMEPAD 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -6,9 +6,12 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K // The Trinity Registers are 32bits in the A2560K
|
||||||
#include "A2560K/gabe_a2560k.h"
|
#include "A2560K/gabe_a2560k.h"
|
||||||
|
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560X || MODEL == MODEL_FOENIX_GENX // The Trinity Registers are 16bits wide in the GenX/A2560X
|
||||||
|
#include "A2560X/gabe_a2560x.h"
|
||||||
|
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/gabe_a2560u.h"
|
#include "A2560U/gabe_a2560u.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#define LPT_DATA_PORT ((volatile unsigned char *)0xFEC02378)
|
#define LPT_DATA_PORT ((volatile unsigned char *)0xFEC02378)
|
||||||
#define LPT_STAT_PORT ((volatile unsigned char *)0xFEC02379)
|
#define LPT_STAT_PORT ((volatile unsigned char *)0xFEC02379)
|
||||||
#define LPT_CTRL_PORT ((volatile unsigned char *)0xFEC0237A)
|
#define LPT_CTRL_PORT ((volatile unsigned char *)0xFEC0237A)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#define MIDI_DATA ((volatile unsigned char *)0xFEC02330)
|
#define MIDI_DATA ((volatile unsigned char *)0xFEC02330)
|
||||||
#define MIDI_STAT ((volatile unsigned char *)0xFEC02331)
|
#define MIDI_STAT ((volatile unsigned char *)0xFEC02331)
|
||||||
#define MIDI_CMD ((volatile unsigned char *)0xFEC02331)
|
#define MIDI_CMD ((volatile unsigned char *)0xFEC02331)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/pata_a2560k.h"
|
#include "A2560K/pata_a2560k.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/pata_a2560u.h"
|
#include "A2560U/pata_a2560u.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/ps2_a2560k.h"
|
#include "A2560K/ps2_a2560k.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/ps2_a2560u.h"
|
#include "A2560U/ps2_a2560u.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
|
||||||
#define RTC_BASE ((volatile unsigned char *)0xFEC00080)
|
#define RTC_BASE ((volatile unsigned char *)0xFEC00080)
|
||||||
#define RTC_SEC ((volatile unsigned char *)0xFEC00080)
|
#define RTC_SEC ((volatile unsigned char *)0xFEC00080)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/sdc_a2560k.h"
|
#include "A2560K/sdc_a2560k.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/sdc_a2560u.h"
|
#include "A2560U/sdc_a2560u.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/sound_a2560k.h"
|
#include "A2560K/sound_a2560k.h"
|
||||||
|
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL_FOENIX_A2560U_PLUS
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#ifndef __TIMERS_REG_H
|
#ifndef __TIMERS_REG_H
|
||||||
#define __TIMERS_REG_H
|
#define __TIMERS_REG_H
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/timers_a2560k.h"
|
#include "A2560K/timers_a2560k.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/timers_a2560u.h"
|
#include "A2560U/timers_a2560u.h"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#define UART1_BASE 0xFEC023F8 /* Base address for UART 1 (COM1) */
|
#define UART1_BASE 0xFEC023F8 /* Base address for UART 1 (COM1) */
|
||||||
#define UART2_BASE 0xFEC022F8 /* Base address for UART 2 (COM2) */
|
#define UART2_BASE 0xFEC022F8 /* Base address for UART 2 (COM2) */
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "sys_general.h"
|
#include "sys_general.h"
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
#include "A2560K/VICKYIII_a2560k.h"
|
#include "A2560K/VICKYIII_a2560k.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#elif MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/VICKYIII_a2560u.h"
|
#include "A2560U/VICKYIII_a2560u.h"
|
||||||
|
|
|
@ -15,13 +15,20 @@
|
||||||
#include "dev/kbd_mo.h"
|
#include "dev/kbd_mo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
short ind_state_color(short state) {
|
short ind_state_color(short state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case IND_ON:
|
case IND_ON:
|
||||||
/* Green for on */
|
/* Green for on */
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
return 0x02;
|
return 0x02;
|
||||||
|
#elif MODEL == MODEL_FOENIX_GENX
|
||||||
|
return 0x05;
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560X
|
||||||
|
return 0x06;
|
||||||
|
#else
|
||||||
|
return 0x03; // That is not possble because of the #if so why did Stefany mean ?
|
||||||
|
#endif
|
||||||
case IND_ERROR:
|
case IND_ERROR:
|
||||||
/* Red for error */
|
/* Red for error */
|
||||||
return 0x04;
|
return 0x04;
|
||||||
|
@ -36,7 +43,15 @@ void ind_set_power(short state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case IND_ON:
|
case IND_ON:
|
||||||
/* Dark green for on */
|
/* Dark green for on */
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
*RGB_LED = 0x00004000;
|
*RGB_LED = 0x00004000;
|
||||||
|
#elif MODEL == MODEL_FOENIX_GENX
|
||||||
|
*RGB_LED = 0x00200020;
|
||||||
|
#elif MODEL == MODEL_FOENIX_A2560X
|
||||||
|
*RGB_LED = 0x00202000;
|
||||||
|
#else
|
||||||
|
*RGB_LED = 0x00004020;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IND_ERROR:
|
case IND_ERROR:
|
||||||
|
@ -51,6 +66,9 @@ void ind_set_power(short state) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_A2560K
|
||||||
void ind_set_fdc(short state) {
|
void ind_set_fdc(short state) {
|
||||||
kbdmo_set_fdc_led(ind_state_color(state));
|
kbdmo_set_fdc_led(ind_state_color(state));
|
||||||
}
|
}
|
||||||
|
@ -62,22 +80,27 @@ void ind_set_sdc(short state) {
|
||||||
void ind_set_hdc(short state) {
|
void ind_set_hdc(short state) {
|
||||||
kbdmo_set_hdc_led(ind_state_color(state));
|
kbdmo_set_hdc_led(ind_state_color(state));
|
||||||
}
|
}
|
||||||
#else
|
#elif MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
// This is for GEN X Status LED
|
||||||
void ind_set_power(short state) {
|
void ind_set_fdc(short state) {
|
||||||
;
|
genx_set_fdc_led(ind_state_color(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ind_set_sdc(short state) {
|
||||||
|
genx_set_sdc_led(ind_state_color(state));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ind_set_hdc(short state) {
|
||||||
|
genx_set_hdc_led(ind_state_color(state));
|
||||||
|
}
|
||||||
|
#else
|
||||||
void ind_set_fdc(short state) {
|
void ind_set_fdc(short state) {
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ind_set_sdc(short state) {
|
void ind_set_sdc(short state) {
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ind_set_hdc(short state) {
|
void ind_set_hdc(short state) {
|
||||||
;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -90,10 +113,11 @@ void ind_set_hdc(short state) {
|
||||||
*/
|
*/
|
||||||
void ind_set(short ind_number, short state) {
|
void ind_set(short ind_number, short state) {
|
||||||
switch (ind_number) {
|
switch (ind_number) {
|
||||||
|
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
case IND_POWER:
|
case IND_POWER:
|
||||||
ind_set_power(state);
|
ind_set_power(state);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case IND_FDC:
|
case IND_FDC:
|
||||||
ind_set_fdc(state);
|
ind_set_fdc(state);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
* Definitions for the interrupt controls
|
* Definitions for the interrupt controls
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
#include "interrupt.h"
|
#include "interrupt.h"
|
||||||
|
|
||||||
#define MAX_HANDLERS 48
|
#define MAX_HANDLERS 48
|
||||||
|
@ -174,7 +175,7 @@ void int_vicky_channel_a() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_DUAL_SCREEN
|
||||||
/*
|
/*
|
||||||
* Interrupt dispatcher for Vicky Channel B interrupts (8 - 15)
|
* Interrupt dispatcher for Vicky Channel B interrupts (8 - 15)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -14,7 +14,7 @@ typedef void (*p_int_handler)();
|
||||||
* Interrupt control registers
|
* Interrupt control registers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
|
|
||||||
#define PENDING_GRP0 ((volatile unsigned short *)0xFEC00100)
|
#define PENDING_GRP0 ((volatile unsigned short *)0xFEC00100)
|
||||||
#define PENDING_GRP1 ((volatile unsigned short *)0xFEC00102)
|
#define PENDING_GRP1 ((volatile unsigned short *)0xFEC00102)
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
#if MODEL == MODEL_FOENIX_A2560U || MODEL == MODEL_FOENIX_A2560U_PLUS
|
||||||
#include "A2560U/gabe_a2560u.h"
|
#include "A2560U/gabe_a2560u.h"
|
||||||
#elif MODEL == MODEL_FOENIX_A2560K
|
#elif (MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X)
|
||||||
#include "A2560K/gabe_a2560k.h"
|
#include "A2560K/gabe_a2560k.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ static void (*do_log)(const char* message);
|
||||||
static void log_to_uart(const char* message);
|
static void log_to_uart(const char* message);
|
||||||
static void log_to_screen(const char* message);
|
static void log_to_screen(const char* message);
|
||||||
|
|
||||||
#define UART_COM1 0
|
#define UART_COM1 1
|
||||||
|
|
||||||
/* Can use the buzzer as sound clues */
|
/* Can use the buzzer as sound clues */
|
||||||
void buzzer_on(void) {
|
void buzzer_on(void) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* Settings
|
* Settings
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_LOG_LEVEL
|
#ifndef DEFAULT_LOG_LEVEL
|
||||||
#define DEFAULT_LOG_LEVEL LOG_ERROR
|
#define DEFAULT_LOG_LEVEL LOG_TRACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LOG_CHANNEL
|
#ifndef LOG_CHANNEL
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
;
|
;
|
||||||
; Interrupt registers for A2560U and U+
|
; Interrupt registers for A2560U and U+
|
||||||
;
|
;
|
||||||
; PENDING_GRP0 = $00B00100
|
|
||||||
; PENDING_GRP1 = $00B00102
|
|
||||||
; PENDING_GRP2 = $00B00104
|
|
||||||
|
|
||||||
PENDING_GRP0 = $FEC00100
|
PENDING_GRP0 = $FEC00100
|
||||||
PENDING_GRP1 = $FEC00102
|
PENDING_GRP1 = $FEC00102
|
||||||
|
@ -124,6 +121,7 @@ PENDING_GRP2 = $FEC00104
|
||||||
code
|
code
|
||||||
|
|
||||||
coldboot: move.w #$2700,SR ; Supervisor mode, Interrupt mode (68040), disable all interrupts
|
coldboot: move.w #$2700,SR ; Supervisor mode, Interrupt mode (68040), disable all interrupts
|
||||||
|
move.l #$0,$fec80008 ; black border
|
||||||
lea ___STACK,sp
|
lea ___STACK,sp
|
||||||
bsr _int_disable_all
|
bsr _int_disable_all
|
||||||
|
|
||||||
|
@ -134,8 +132,8 @@ coldboot: move.w #$2700,SR ; Supervisor mode, Interrupt mode (68040), d
|
||||||
clrloop: move.l #0,(a0)+
|
clrloop: move.l #0,(a0)+
|
||||||
subq.l #4,d0
|
subq.l #4,d0
|
||||||
bne clrloop
|
bne clrloop
|
||||||
|
move.l #$ffff00ff,$fec80008
|
||||||
callmain: jsr ___main ; call __main to transfer to the C code
|
callmain: jsr _main ; call __main to transfer to the C code
|
||||||
|
|
||||||
; endless loop; can be changed accordingly
|
; endless loop; can be changed accordingly
|
||||||
___exit:
|
___exit:
|
||||||
|
|
|
@ -314,30 +314,11 @@ unsigned long syscall_dispatch(int32_t function, int32_t param0, int32_t param1,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case KFN_TXT_SET_REGION:
|
case KFN_TXT_SET_REGION:
|
||||||
#ifdef KDEBUG
|
|
||||||
{
|
|
||||||
short ret;
|
|
||||||
sprintf(buf, "KFN_TXT_SET_REGION: %d %p", param0, (p_rect)param1);
|
|
||||||
DEBUG(buf);
|
|
||||||
|
|
||||||
ret = txt_set_region((short)param0, (p_rect)param1);
|
|
||||||
sprintf(buf, "KFN_TXT_SET_REGION returning");
|
|
||||||
DEBUG(buf);
|
|
||||||
/* Sets the clipping/scrolling region for further text operations */
|
/* Sets the clipping/scrolling region for further text operations */
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
return txt_set_region((short)param0, (p_rect)param1);
|
return txt_set_region((short)param0, (p_rect)param1);
|
||||||
#endif
|
|
||||||
|
|
||||||
case KFN_TXT_GET_REGION:
|
case KFN_TXT_GET_REGION:
|
||||||
#ifdef KDEBUG
|
|
||||||
/* Gets the current clipping/scrolling region */
|
/* Gets the current clipping/scrolling region */
|
||||||
{
|
|
||||||
sprintf(buf, "KFN_TXT_GET_REGION: %d %p", (short)param0, (p_rect)param1);
|
|
||||||
DEBUG(buf);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return txt_get_region((short)param0, (p_rect)param1);
|
return txt_get_region((short)param0, (p_rect)param1);
|
||||||
|
|
||||||
case KFN_TXT_SET_COLOR:
|
case KFN_TXT_SET_COLOR:
|
||||||
|
|
19231
src/mapfile
19231
src/mapfile
File diff suppressed because it is too large
Load diff
BIN
src/rsrc/bitmaps/splash_a2560x.bmp
Normal file
BIN
src/rsrc/bitmaps/splash_a2560x.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 KiB |
1241
src/rsrc/bitmaps/splash_a2560x.h
Normal file
1241
src/rsrc/bitmaps/splash_a2560x.h
Normal file
File diff suppressed because it is too large
Load diff
BIN
src/rsrc/bitmaps/splash_a2560x_a.bmp
Normal file
BIN
src/rsrc/bitmaps/splash_a2560x_a.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 KiB |
BIN
src/rsrc/bitmaps/splash_a2560x_b.bmp
Normal file
BIN
src/rsrc/bitmaps/splash_a2560x_b.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 KiB |
|
@ -351,11 +351,11 @@ const char * model_banner[] = {
|
||||||
"",
|
"",
|
||||||
|
|
||||||
// 4 = A2560 GENX
|
// 4 = A2560 GENX
|
||||||
" ___ ___ ___________ ____ _____________ ___ __",
|
" GGGGGG EEEEEEE NN NN XX XXX 3333333 2222222",
|
||||||
" / | |__ \\ / ____/ ___// __ \\ / ____/ ____/ | / / |/ /",
|
" GG EE NNN NN XX XXX 33 22 ",
|
||||||
" / /| | __/ //___ \\/ __ \\/ / / / / / __/ __/ / |/ /| / ",
|
" GG GGGG EEEEE NN NN NN XXX 33333 22222 ",
|
||||||
" / ___ |/ __/____/ / /_/ / /_/ / / /_/ / /___/ /| // | ",
|
" GG GG EE NN NNN XXX XX 33 22 ",
|
||||||
"/_/ |_/____/_____/\\____/\\____/ \\____/_____/_/ |_//_/|_| ",
|
" GGGGGG EEEEEEE NN NN XXX XX 3333333 2222222 ",
|
||||||
|
|
||||||
// 5 = C256 U+
|
// 5 = C256 U+
|
||||||
" _________ ___________ __ __ ",
|
" _________ ___________ __ __ ",
|
||||||
|
@ -379,11 +379,16 @@ const char * model_banner[] = {
|
||||||
"",
|
"",
|
||||||
|
|
||||||
// 8 = A2560 X
|
// 8 = A2560 X
|
||||||
" ___ ___ ___________ ____ _ __",
|
//" ___ ___ ___________ ____ _ __",
|
||||||
" / | |__ \\ / ____/ ___// __ \\ | |/ /",
|
//" / | |__ \\ / ____/ ___// __ \\ | |/ /",
|
||||||
" / /| | __/ //___ \\/ __ \\/ / / / | / ",
|
//" / /| | __/ //___ \\/ __ \\/ / / / | / ",
|
||||||
" / ___ |/ __/____/ / /_/ / /_/ / / | ",
|
//" / ___ |/ __/____/ / /_/ / /_/ / / | ",
|
||||||
"/_/ |_/____/_____/\\____/\\____/ /_/|_| ",
|
//"/_/ |_/____/_____/\\____/\\____/ /_/|_| ",
|
||||||
|
" AAA 22222 55555 6 00000 X X",
|
||||||
|
"A A 2 5 6 0 0 X X ",
|
||||||
|
"AAAAA 22222 55555 66666 0 0 X ",
|
||||||
|
"A A 2 5 6 6 0 0 X X ",
|
||||||
|
"A A 22222 55555 66666 00000 X X",
|
||||||
|
|
||||||
// 9 = A2560 U
|
// 9 = A2560 U
|
||||||
" ___ ___ ___________ ____ __ __",
|
" ___ ___ ___________ ____ __ __",
|
||||||
|
|
|
@ -32,7 +32,7 @@ void psg_tone(short chip, unsigned short voice, int frequency) {
|
||||||
volatile unsigned char * port = PSG_PORT; /* By default: external */
|
volatile unsigned char * port = PSG_PORT; /* By default: external */
|
||||||
|
|
||||||
if (voice < 3) {
|
if (voice < 3) {
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
switch (chip) {
|
switch (chip) {
|
||||||
case 1:
|
case 1:
|
||||||
port = PSG_INT_L_PORT;
|
port = PSG_INT_L_PORT;
|
||||||
|
@ -71,7 +71,7 @@ void psg_tone(short chip, unsigned short voice, int frequency) {
|
||||||
void psg_attenuation(short chip, unsigned short voice, short attenuation) {
|
void psg_attenuation(short chip, unsigned short voice, short attenuation) {
|
||||||
volatile unsigned char * port = PSG_PORT; /* By default: external */
|
volatile unsigned char * port = PSG_PORT; /* By default: external */
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if ( MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X )
|
||||||
switch (chip) {
|
switch (chip) {
|
||||||
case 1:
|
case 1:
|
||||||
port = PSG_INT_L_PORT;
|
port = PSG_INT_L_PORT;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#define DEFAULT_LOG_LEVEL LOG_TRACE
|
#define DEFAULT_LOG_LEVEL LOG_TRACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "features.h"
|
||||||
|
#include "sys_general.h"
|
||||||
#include "snd/sid.h"
|
#include "snd/sid.h"
|
||||||
#include "sound_reg.h"
|
#include "sound_reg.h"
|
||||||
#include "dev/rtc.h"
|
#include "dev/rtc.h"
|
||||||
|
@ -28,7 +30,7 @@ volatile unsigned char * sid_get_base(short sid) {
|
||||||
return SID_INT_L_V1_FREQ_LO;
|
return SID_INT_L_V1_FREQ_LO;
|
||||||
case 2:
|
case 2:
|
||||||
return SID_INT_R_V1_FREQ_LO;
|
return SID_INT_R_V1_FREQ_LO;
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
case 3:
|
case 3:
|
||||||
return SID_EXT_L_V1_FREQ_LO;
|
return SID_EXT_L_V1_FREQ_LO;
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -60,9 +62,15 @@ void sid_init(short sid) {
|
||||||
*/
|
*/
|
||||||
void sid_init_all() {
|
void sid_init_all() {
|
||||||
int sid;
|
int sid;
|
||||||
for (sid = 0; sid < N_SIDS; sid++) {
|
#if HAS_EXTERNAL_SIDS
|
||||||
|
#define N_EXT_SIDS 2
|
||||||
|
#else
|
||||||
|
#define N_EXT_SIDS 0
|
||||||
|
#endif
|
||||||
|
for (sid = 0; sid <= 2+N_EXT_SIDS; sid++) {
|
||||||
sid_init(sid);
|
sid_init(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -154,7 +162,7 @@ void sid_test_internal() {
|
||||||
*SID_INT_R_MODE_VOL = 0;
|
*SID_INT_R_MODE_VOL = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_EXTERNAL_SIDS
|
||||||
void sid_test_external() {
|
void sid_test_external() {
|
||||||
unsigned char i;
|
unsigned char i;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
@ -240,4 +248,4 @@ void sid_test_external() {
|
||||||
*SID_EXT_L_MODE_VOL = 0;
|
*SID_EXT_L_MODE_VOL = 0;
|
||||||
*SID_EXT_R_MODE_VOL = 0;
|
*SID_EXT_R_MODE_VOL = 0;
|
||||||
}
|
}
|
||||||
#endif /* MODEL == MODEL_FOENIX_A2560K */
|
#endif /* HAS_EXTERNAL_SIDS */
|
|
@ -23,7 +23,7 @@ extern void sid_init_all();
|
||||||
*/
|
*/
|
||||||
extern void sid_test_internal();
|
extern void sid_test_internal();
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if HAS_EXTERNAL_SIDS
|
||||||
/*
|
/*
|
||||||
* Test the external SID implementation
|
* Test the external SID implementation
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
*/
|
*/
|
||||||
void sys_get_information(p_sys_info info) {
|
void sys_get_information(p_sys_info info) {
|
||||||
unsigned long gabe_id = 0;
|
unsigned long gabe_id = 0;
|
||||||
|
unsigned short genx_model_id = 0;
|
||||||
unsigned short clock_speed = 0;
|
unsigned short clock_speed = 0;
|
||||||
unsigned short cpu = 0;
|
unsigned short cpu = 0;
|
||||||
unsigned short machine_id = 0;
|
unsigned short machine_id = 0;
|
||||||
|
@ -21,7 +22,7 @@ void sys_get_information(p_sys_info info) {
|
||||||
|
|
||||||
info->system_ram_size = 0x400000;
|
info->system_ram_size = 0x400000;
|
||||||
|
|
||||||
#if MODEL == MODEL_FOENIX_A2560K
|
#if MODEL == MODEL_FOENIX_A2560K || MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
gabe_id = *GABE_SUBVER_ID;
|
gabe_id = *GABE_SUBVER_ID;
|
||||||
clock_speed = (gabe_id & 0xE0) >> 5;
|
clock_speed = (gabe_id & 0xE0) >> 5;
|
||||||
cpu = (gabe_id & 0xF000) >> 12;
|
cpu = (gabe_id & 0xF000) >> 12;
|
||||||
|
@ -33,11 +34,27 @@ void sys_get_information(p_sys_info info) {
|
||||||
info->has_ethernet = 1;
|
info->has_ethernet = 1;
|
||||||
info->screens = 2;
|
info->screens = 2;
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
genx_model_id = *GABE_SUB_MODEL_ID; // This gets the MID on the board that tells us if it is a PB/LB/CU
|
||||||
|
// Now, that doesn't tell us if it is stuffed with audio chip or not
|
||||||
|
// However, those will tell us about if there is a Floppy or not
|
||||||
|
// This of course is good also for the A2560X
|
||||||
|
genx_model_id = genx_model_id & GABE_SUB_MOD_MASK; // This isolate 2 bits,
|
||||||
|
// 00 = PB
|
||||||
|
// 01 = LB
|
||||||
|
// 10 = CU
|
||||||
|
info->sub_model = genx_model_id;
|
||||||
|
#else
|
||||||
|
info->sub_model = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Get the FPGA information
|
// Get the FPGA information
|
||||||
info->fpga_date = /* YYYYMMDD */
|
info->fpga_date = /* YYYYMMDD */
|
||||||
((((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_YEAR_MASK) + 2000) << 16) |
|
((((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_YEAR_MASK) + 2000) << 16) |
|
||||||
((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_MONTH_MASK) |
|
((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_MONTH_MASK) |
|
||||||
(((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_DAY_MASK) >> 16 );
|
(((*GABE_FIRMWARE_DATE) & GABE_FIRMWARE_DATE_DAY_MASK) >> 16 );
|
||||||
|
|
||||||
|
// Get the FPGA number and version/sub-version
|
||||||
info->fpga_model = (*GABE_CHIP_VERSION & GABE_CHIP_N_MASK) >> 16;
|
info->fpga_model = (*GABE_CHIP_VERSION & GABE_CHIP_N_MASK) >> 16;
|
||||||
info->fpga_version = *GABE_CHIP_VERSION & GABE_CHIP_V_MASK;
|
info->fpga_version = *GABE_CHIP_VERSION & GABE_CHIP_V_MASK;
|
||||||
info->fpga_subver = (gabe_id & GABE_CHIP_SV_MASK) >> 16;
|
info->fpga_subver = (gabe_id & GABE_CHIP_SV_MASK) >> 16;
|
||||||
|
@ -182,7 +199,12 @@ void sys_get_information(p_sys_info info) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODEL_FOENIX_GENX:
|
case MODEL_FOENIX_GENX:
|
||||||
info->model_name = "A2560 GenX";
|
switch (genx_model_id) {
|
||||||
|
case 0: info->model_name = "GenX32 - PB"; break;
|
||||||
|
case 1: info->model_name = "GenX32 - LB"; break;
|
||||||
|
case 2: info->model_name = "GenX32 - CUBE"; break;
|
||||||
|
default: info->model_name = "GenX32"; break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODEL_FOENIX_C256U_PLUS:
|
case MODEL_FOENIX_C256U_PLUS:
|
||||||
|
@ -194,7 +216,12 @@ void sys_get_information(p_sys_info info) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODEL_FOENIX_A2560X:
|
case MODEL_FOENIX_A2560X:
|
||||||
info->model_name = "A2560 X";
|
switch (genx_model_id) {
|
||||||
|
case 0: info->model_name = "A2560X - PB"; break;
|
||||||
|
case 1: info->model_name = "A2560X - LB"; break;
|
||||||
|
case 2: info->model_name = "A2560X - CUBE"; break;
|
||||||
|
default: info->model_name = "A2560 X"; break;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MODEL_FOENIX_A2560U:
|
case MODEL_FOENIX_A2560U:
|
||||||
|
@ -210,3 +237,40 @@ void sys_get_information(p_sys_info info) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
static short genx_leds = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the floppy drive
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
void genx_set_fdc_led(short colors) {
|
||||||
|
genx_leds = (genx_leds & 0xFFF8) | (colors & 0x07);
|
||||||
|
*GABE_GENX_STAT_LEDS = genx_leds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the SD card slot
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
void genx_set_sdc_led(short colors) {
|
||||||
|
genx_leds = (genx_leds & 0xFFC7) | ((colors & 0x07) << 3);
|
||||||
|
*GABE_GENX_STAT_LEDS = genx_leds;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the IDE hard drive
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
void genx_set_hdc_led(short colors) {
|
||||||
|
genx_leds = (genx_leds & 0xFE3F) | ((colors & 0x07) << 6);
|
||||||
|
*GABE_GENX_STAT_LEDS = genx_leds;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define MODEL_FOENIX_A2560X 8
|
#define MODEL_FOENIX_A2560X 8
|
||||||
#define MODEL_FOENIX_A2560U 9
|
#define MODEL_FOENIX_A2560U 9
|
||||||
#define MODEL_FOENIX_A2560K 11
|
#define MODEL_FOENIX_A2560K 11
|
||||||
|
#define MODEL_FOENIX_A2560M 12
|
||||||
|
|
||||||
/* IDs for the CPUs supported */
|
/* IDs for the CPUs supported */
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
#define CPU_486DX2_50 0x08 /* Intel 486 chips... */
|
#define CPU_486DX2_50 0x08 /* Intel 486 chips... */
|
||||||
#define CPU_486DX2_60 0x09
|
#define CPU_486DX2_60 0x09
|
||||||
#define CPU_486DX4 0x0A
|
#define CPU_486DX4 0x0A
|
||||||
|
#define CPU_MC68EC060 0x0B /* New things Coming... */
|
||||||
|
|
||||||
/* Clock speeds */
|
/* Clock speeds */
|
||||||
|
|
||||||
|
@ -53,6 +55,7 @@ typedef struct s_sys_info {
|
||||||
unsigned short mcp_rev; /* Current revision, or sub-version of the MCP kernel */
|
unsigned short mcp_rev; /* Current revision, or sub-version of the MCP kernel */
|
||||||
unsigned short mcp_build; /* Current vuild # of the MCP kernel */
|
unsigned short mcp_build; /* Current vuild # of the MCP kernel */
|
||||||
unsigned short model; /* Code to say what model of machine this is */
|
unsigned short model; /* Code to say what model of machine this is */
|
||||||
|
unsigned short sub_model; /* 0x00 = PB, 0x01 = LB, 0x02 = CUBE */
|
||||||
const char * model_name; /* Human readable name of the model of the computer */
|
const char * model_name; /* Human readable name of the model of the computer */
|
||||||
unsigned short cpu; /* Code to say which CPU is running */
|
unsigned short cpu; /* Code to say which CPU is running */
|
||||||
const char * cpu_name; /* Human readable name for the CPU */
|
const char * cpu_name; /* Human readable name for the CPU */
|
||||||
|
@ -77,4 +80,30 @@ typedef struct s_sys_info {
|
||||||
*/
|
*/
|
||||||
extern void sys_get_information(p_sys_info info);
|
extern void sys_get_information(p_sys_info info);
|
||||||
|
|
||||||
|
#if MODEL == MODEL_FOENIX_GENX || MODEL == MODEL_FOENIX_A2560X
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the floppy drive
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
extern void genx_set_fdc_led(short colors);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the SD card slot
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
extern void genx_set_sdc_led(short colors);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the color of the LED for the IDE hard drive
|
||||||
|
*
|
||||||
|
* Inputs:
|
||||||
|
* colors = color specification, three bits: 0x_____RGB
|
||||||
|
*/
|
||||||
|
extern void genx_set_hdc_led(short colors);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#define __VERSION_H
|
#define __VERSION_H
|
||||||
|
|
||||||
#define VER_MAJOR 1
|
#define VER_MAJOR 1
|
||||||
#define VER_MINOR 0
|
#define VER_MINOR 2
|
||||||
#define VER_BUILD 2
|
#define VER_BUILD 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
13
vbcc/config/a2560x_flash
Normal file
13
vbcc/config/a2560x_flash
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-cc=vbccm68k -quiet %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-ccv=vbccm68k %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-as=vasmm68k_mot -quiet -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-asv=vasmm68k_mot -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-rm=del %s
|
||||||
|
-rmv=del %s
|
||||||
|
-ld=vlink -brawbin1 -x -Cvbcc m68040\startup_m68040.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2=vlink -brawbin1 -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -o %s -Mmapfile
|
||||||
|
-ldv=vlink -brawbin1 -t -x -Cvbcc m68040\startup.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2v=vlink -brawbin1 -t -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -o %s -Mmapfile
|
||||||
|
-ul=-l%s
|
||||||
|
-cf=-F%s
|
||||||
|
-ml=1000
|
13
vbcc/config/a2560x_ram
Normal file
13
vbcc/config/a2560x_ram
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-cc=vbccm68k -quiet %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-ccv=vbccm68k %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-as=vasmm68k_mot -quiet -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-asv=vasmm68k_mot -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-rm=del %s
|
||||||
|
-rmv=del %s
|
||||||
|
-ld=vlink -bsrec28 -x -Cvbcc m68040\startup_m68040.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2=vlink -bsrec28 -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -o %s -Mmapfile
|
||||||
|
-ldv=vlink -bsrec28 -t -x -Cvbcc m68040\startup.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2v=vlink -bsrec28 -t -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -o %s -Mmapfile
|
||||||
|
-ul=-l%s
|
||||||
|
-cf=-F%s
|
||||||
|
-ml=1000
|
13
vbcc/config/a2560x_ram_linux
Normal file
13
vbcc/config/a2560x_ram_linux
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-cc=vbccm68k -quiet %s -o= %s %s -O=%ld -I$VBCC/targets/m68k-foenix/include
|
||||||
|
-ccv=vbccm68k %s -o= %s %s -O=%ld -I$VBCC/targets/m68k-foenix/include
|
||||||
|
-as=vasmm68k_mot -quiet -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-asv=vasmm68k_mot -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-rm=rm %s
|
||||||
|
-rmv=rm %s
|
||||||
|
-ld=vlink -bsrec28 -x -Cvbcc m68040/startup_m68040.o %s %s -L$VBCC/targets/m68k-foenix/lib -T$VBCC/targets/m68k-foenix/vlink_ram_a2560x.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2=vlink -bsrec28 -x -Cvbcc %s %s -L$VBCC/targets/m68k-foenix/lib -T$VBCC/targets/m68k-foenix/vlink_ram_a2560x.cmd -o %s -Mmapfile
|
||||||
|
-ldv=vlink -bsrec28 -t -x -Cvbcc m68040/startup.o %s %s -L$VBCC/targets/m68k-foenix/lib -T$VBCC/targets/m68k-foenix/vlink_ram_a2560x.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2v=vlink -bsrec28 -t -x -Cvbcc %s %s -L$VBCC/targets/m68k-foenix/lib -T$VBCC/targets/m68k-foenix/vlink_ram_a2560x.cmd -o %s -Mmapfile
|
||||||
|
-ul=-l%s
|
||||||
|
-cf=-F%s
|
||||||
|
-ml=1000
|
13
vbcc/config/genx_flash
Normal file
13
vbcc/config/genx_flash
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-cc=vbccm68k -quiet %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-ccv=vbccm68k %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-as=vasmm68k_mot -quiet -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-asv=vasmm68k_mot -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-rm=del %s
|
||||||
|
-rmv=del %s
|
||||||
|
-ld=vlink -brawbin1 -x -Cvbcc m68040\startup_m68040.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2=vlink -brawbin1 -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -o %s -Mmapfile
|
||||||
|
-ldv=vlink -brawbin1 -t -x -Cvbcc m68040\startup.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2v=vlink -brawbin1 -t -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_flash_genx.cmd -o %s -Mmapfile
|
||||||
|
-ul=-l%s
|
||||||
|
-cf=-F%s
|
||||||
|
-ml=1000
|
13
vbcc/config/genx_ram
Normal file
13
vbcc/config/genx_ram
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
-cc=vbccm68k -quiet %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-ccv=vbccm68k %s -o= %s %s -O=%ld -I%%VBCC%%\targets\m68k-foenix\include
|
||||||
|
-as=vasmm68k_mot -quiet -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-asv=vasmm68k_mot -Fvobj -nowarn=62 %s -o %s
|
||||||
|
-rm=del %s
|
||||||
|
-rmv=del %s
|
||||||
|
-ld=vlink -bsrec28 -x -Cvbcc m68040\startup_m68040.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2=vlink -bsrec28 -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -o %s -Mmapfile
|
||||||
|
-ldv=vlink -bsrec28 -t -x -Cvbcc m68040\startup.o %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -lvc -o %s -Mmapfile
|
||||||
|
-l2v=vlink -bsrec28 -t -x -Cvbcc %s %s -L%%VBCC%%\targets\m68k-foenix\lib -T%%VBCC%%\targets\m68k-foenix\vlink_ram_a2560k.cmd -o %s -Mmapfile
|
||||||
|
-ul=-l%s
|
||||||
|
-cf=-F%s
|
||||||
|
-ml=1000
|
49
vbcc/targets/m68k-foenix/vlink_flash_genx.cmd
Normal file
49
vbcc/targets/m68k-foenix/vlink_flash_genx.cmd
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
BINFILE_START = 0x00000000;
|
||||||
|
FLASH_START = 0xFFC00000;
|
||||||
|
VECTOR_START = 0x00000000;
|
||||||
|
STORE_START = 0x003D0000;
|
||||||
|
KERNEL_START = 0xFFC10000;
|
||||||
|
|
||||||
|
STACK_LEN = 0x400;
|
||||||
|
VECTOR_LEN = 0x1000;
|
||||||
|
STORE_LEN = 0x00030000;
|
||||||
|
KERNEL_LEN = 0x00040000;
|
||||||
|
FLASH_LEN = 0x00200000;
|
||||||
|
PAGE_SIZE = 0x00010000;
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
binpage0: org = BINFILE_START, len = VECTOR_LEN
|
||||||
|
binpage1: org = BINFILE_START + VECTOR_LEN, len = PAGE_SIZE - VECTOR_LEN
|
||||||
|
binpages: org = BINFILE_START + PAGE_SIZE, len = FLASH_LEN - PAGE_SIZE
|
||||||
|
vectors : org = VECTOR_START, len = VECTOR_LEN
|
||||||
|
lowram : org = VECTOR_START + VECTOR_LEN, len = PAGE_SIZE - VECTOR_LEN
|
||||||
|
kernel: org = KERNEL_START, len = KERNEL_LEN
|
||||||
|
storage: org = STORE_START, len = STORE_LEN
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
vectors : { *(VECTORS) } >vectors AT>binpage0
|
||||||
|
data ALIGN(0x02) : { *(DATA) } >lowram AT>binpage1
|
||||||
|
bss (NOLOAD) : { *(BSS) } >storage
|
||||||
|
text ALIGN(0x02) : { *(CODE) } >kernel AT>binpages
|
||||||
|
.dtors ALIGN(0x02) : { *(.dtors) } >kernel AT>binpages
|
||||||
|
.ctors ALIGN(0x02) : { *(.ctors) } >kernel AT>binpages
|
||||||
|
|
||||||
|
|
||||||
|
___heap = ADDR(bss) + SIZEOF(bss);
|
||||||
|
___heapend = STORE_START + STORE_LEN - STACK_LEN;
|
||||||
|
|
||||||
|
___BSSSTART = ADDR(bss);
|
||||||
|
___BSSSIZE = SIZEOF(bss);
|
||||||
|
|
||||||
|
___USER_STACK = 0x00010000;
|
||||||
|
___STACK = STORE_START + STORE_LEN;
|
||||||
|
|
||||||
|
___kernel_vma_start = ADDR(text);
|
||||||
|
___kernel_lma_start = LOADADDR(text);
|
||||||
|
___kernel_lma_end = ___kernel_lma_start + SIZEOF(text);
|
||||||
|
|
||||||
|
___memory_start = STORE_START;
|
||||||
|
}
|
46
vbcc/targets/m68k-foenix/vlink_ram_a2560x.cmd
Normal file
46
vbcc/targets/m68k-foenix/vlink_ram_a2560x.cmd
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
BINFILE_START = 0x00000000;
|
||||||
|
FLASH_START = 0xFFC10000;
|
||||||
|
VECTOR_START = 0x00000000;
|
||||||
|
STORE_START = 0x00180000;
|
||||||
|
KERNEL_START = 0x001C0000;
|
||||||
|
|
||||||
|
STACK_LEN = 0x400;
|
||||||
|
VECTOR_LEN = 0x400;
|
||||||
|
STORE_LEN = 0x00030000;
|
||||||
|
KERNEL_LEN = 0x00040000;
|
||||||
|
FLASH_LEN = 0x00200000;
|
||||||
|
PAGE_SIZE = 0x00010000;
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
binpage0: org = BINFILE_START, len = PAGE_SIZE
|
||||||
|
binpages: org = BINFILE_START + PAGE_SIZE, len = FLASH_LEN - PAGE_SIZE
|
||||||
|
vectors : org = VECTOR_START, len = VECTOR_LEN
|
||||||
|
kernel: org = KERNEL_START, len = KERNEL_LEN
|
||||||
|
storeage: org = STORE_START, len = STORE_LEN
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
vectors : { *(VECTORS) } >vectors
|
||||||
|
bss (NOLOAD) : { *(BSS) } >storeage
|
||||||
|
text ALIGN(0x02) : { *(CODE) } >kernel
|
||||||
|
.dtors ALIGN(0x02) : { *(.dtors) } >kernel
|
||||||
|
.ctors ALIGN(0x02) : { *(.ctors) } >kernel
|
||||||
|
data ALIGN(0x02) : { *(DATA) } >kernel
|
||||||
|
|
||||||
|
___heap = ADDR(bss) + SIZEOF(bss);
|
||||||
|
___heapend = STORE_START + STORE_LEN - STACK_LEN;
|
||||||
|
|
||||||
|
___BSSSTART = ADDR(bss);
|
||||||
|
___BSSSIZE = SIZEOF(bss);
|
||||||
|
|
||||||
|
___USER_STACK = 0x00010000;
|
||||||
|
___STACK = STORE_START + STORE_LEN;
|
||||||
|
|
||||||
|
___kernel_vma_start = ADDR(text);
|
||||||
|
___kernel_lma_start = LOADADDR(text);
|
||||||
|
___kernel_lma_end = ___kernel_lma_start + SIZEOF(text);
|
||||||
|
|
||||||
|
___memory_start = STORE_START;
|
||||||
|
}
|
46
vbcc/targets/m68k-foenix/vlink_ram_genx.cmd
Normal file
46
vbcc/targets/m68k-foenix/vlink_ram_genx.cmd
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
BINFILE_START = 0x00000000;
|
||||||
|
FLASH_START = 0xFFC10000;
|
||||||
|
VECTOR_START = 0x00000000;
|
||||||
|
STORE_START = 0x00180000;
|
||||||
|
KERNEL_START = 0x001C0000;
|
||||||
|
|
||||||
|
STACK_LEN = 0x400;
|
||||||
|
VECTOR_LEN = 0x400;
|
||||||
|
STORE_LEN = 0x00030000;
|
||||||
|
KERNEL_LEN = 0x00040000;
|
||||||
|
FLASH_LEN = 0x00200000;
|
||||||
|
PAGE_SIZE = 0x00010000;
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
binpage0: org = BINFILE_START, len = PAGE_SIZE
|
||||||
|
binpages: org = BINFILE_START + PAGE_SIZE, len = FLASH_LEN - PAGE_SIZE
|
||||||
|
vectors : org = VECTOR_START, len = VECTOR_LEN
|
||||||
|
kernel: org = KERNEL_START, len = KERNEL_LEN
|
||||||
|
storeage: org = STORE_START, len = STORE_LEN
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
vectors : { *(VECTORS) } >vectors
|
||||||
|
bss (NOLOAD) : { *(BSS) } >storeage
|
||||||
|
text ALIGN(0x02) : { *(CODE) } >kernel
|
||||||
|
.dtors ALIGN(0x02) : { *(.dtors) } >kernel
|
||||||
|
.ctors ALIGN(0x02) : { *(.ctors) } >kernel
|
||||||
|
data ALIGN(0x02) : { *(DATA) } >kernel
|
||||||
|
|
||||||
|
___heap = ADDR(bss) + SIZEOF(bss);
|
||||||
|
___heapend = STORE_START + STORE_LEN - STACK_LEN;
|
||||||
|
|
||||||
|
___BSSSTART = ADDR(bss);
|
||||||
|
___BSSSIZE = SIZEOF(bss);
|
||||||
|
|
||||||
|
___USER_STACK = 0x00010000;
|
||||||
|
___STACK = STORE_START + STORE_LEN;
|
||||||
|
|
||||||
|
___kernel_vma_start = ADDR(text);
|
||||||
|
___kernel_lma_start = LOADADDR(text);
|
||||||
|
___kernel_lma_end = ___kernel_lma_start + SIZEOF(text);
|
||||||
|
|
||||||
|
___memory_start = STORE_START;
|
||||||
|
}
|
Loading…
Reference in a new issue