PS2 Keyboard Test
Added PS2 keyboard test, fixed some definitions, and tweaked splash screen to work on the K
This commit is contained in:
parent
e0f8d03baa
commit
0ab19057c7
|
@ -61,6 +61,27 @@ typedef struct s_cli_test_feature {
|
|||
* Tests...
|
||||
*/
|
||||
|
||||
/*
|
||||
* Test the PS/2 keyboard
|
||||
*/
|
||||
int cli_test_ps2(short channel, int argc, char * argv[]) {
|
||||
char message[80];
|
||||
unsigned short scancode = 0;
|
||||
|
||||
sprintf(message, "Press keys on a PS/2 keyboard... ESC to quit.\n");
|
||||
sys_chan_write(channel, message, strlen(message));
|
||||
|
||||
while (scancode != 0x01) {
|
||||
scancode = kbd_get_scancode();
|
||||
if (scancode != 0) {
|
||||
sprintf(message, "Scan code: %04x\n", scancode);
|
||||
sys_chan_write(channel, message, strlen(message));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Test the joystick ports
|
||||
*/
|
||||
|
@ -552,6 +573,7 @@ const t_cli_test_feature cli_test_features[] = {
|
|||
{"OPN", "OPN [EXT|INT]: test the OPN sound chip", opm_test},
|
||||
{"OPM", "OPM [EXT|INT]: test the OPM sound chip", opm_test},
|
||||
{"PANIC", "PANIC: test the kernel panic mechanism", cli_test_panic},
|
||||
{"PS2", "PS2: test the PS/2 keyboard", cli_test_ps2},
|
||||
{"PSG", "PSG: test the PSG sound chip", psg_test},
|
||||
{"PRINT", "PRINT: sent text to the printer", cmd_test_print},
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
|
|
|
@ -714,7 +714,7 @@ void kbd_handle_irq() {
|
|||
default:
|
||||
// TODO: kernel panic?
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,11 @@ void load_splashscreen() {
|
|||
volatile unsigned char * vram = VRAM_Bank0;
|
||||
|
||||
/* Turn off the screen */
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
*MasterControlReg_B = VKY3_MCR_BLANK_EN;
|
||||
#else
|
||||
*MasterControlReg_A = VKY3_MCR_BLANK_EN;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
LUT_0[4*i] = splashscreen_lut[4*i];
|
||||
|
@ -132,13 +136,25 @@ void load_splashscreen() {
|
|||
*BM0_Control_Reg = 1;
|
||||
|
||||
/* Turn off the border */
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
*BorderControlReg_L_B = 0;
|
||||
#else
|
||||
*BorderControlReg_L_A = 0;
|
||||
#endif
|
||||
|
||||
/* Set a background color for the bitmap mode */
|
||||
*BackGroundControlReg_A = 0x00800000;
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
*BackGroundControlReg_B = 0x00202020;
|
||||
#else
|
||||
*BackGroundControlReg_A = 0x00202020;
|
||||
#endif
|
||||
|
||||
/* Display the splashscreen: 640x480 */
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
*MasterControlReg_B = VKY3_MCR_GRAPH_EN | VKY3_MCR_BITMAP_EN;
|
||||
#else
|
||||
*MasterControlReg_A = VKY3_MCR_GRAPH_EN | VKY3_MCR_BITMAP_EN;
|
||||
#endif
|
||||
}
|
||||
|
||||
void print_error(short channel, char * message, short code) {
|
||||
|
@ -212,7 +228,7 @@ void initialize() {
|
|||
log(LOG_TRACE, "Interrupts enabled");
|
||||
|
||||
// /* Display the splash screen */
|
||||
// load_splashscreen();
|
||||
load_splashscreen();
|
||||
|
||||
/* Play the SID test bong on the Gideon SID implementation */
|
||||
sid_test_internal();
|
||||
|
@ -242,7 +258,7 @@ void initialize() {
|
|||
if (res = ps2_init()) {
|
||||
print_error(0, "FAILED: PS/2 keyboard initialization", res);
|
||||
} else {
|
||||
DEBUG("PS/2 keyboard initialized.");
|
||||
log(LOG_INFO, "PS/2 keyboard initialized.");
|
||||
}
|
||||
|
||||
#if MODEL == MODEL_FOENIX_A2560K
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,7 @@
|
|||
* Screen Channel A
|
||||
*/
|
||||
|
||||
#define MasterControlReg_A ((volatile int *)0xFEC40000)
|
||||
#define MasterControlReg_A ((volatile unsigned long *)0xFEC40000)
|
||||
#define VKY3_MCR_TEXT_EN 0x00000001 /* Text Mode Enable */
|
||||
#define VKY3_MCR_TEXT_OVRLY 0x00000002 /* Text Mode overlay */
|
||||
#define VKY3_MCR_GRAPH_EN 0x00000004 /* Graphic Mode Enable */
|
||||
|
@ -32,34 +32,34 @@
|
|||
#define VKY3_DIP_HIRES 0x4000 /* DIP switch for high resolution mode */
|
||||
#define VKY3_PLL_ACTIVE_CLK 0x8000 /* Active Clock --- 0: 25.175Mhz, 1: 40Mhz */
|
||||
|
||||
#define BorderControlReg_L_A ((volatile int *)0xFEC40004)
|
||||
#define BorderControlReg_L_A ((volatile unsigned long *)0xFEC40004)
|
||||
#define VKY3_BRDR_EN 0x00000001 /* Border Enable */
|
||||
#define VKY3_X_SCROLL_MASK 0x00000070 /* X Scroll */
|
||||
#define VKY3_X_SIZE_MASK 0x00003f00 /* X Size */
|
||||
#define VKY3_Y_SIZE_MASK 0x003f0000 /* Y Size */
|
||||
|
||||
#define BorderControlReg_H_A ((volatile int *)0xFEC40008)
|
||||
#define BackGroundControlReg_A ((volatile int *)0xFEC4000C)
|
||||
#define CursorControlReg_L_A ((volatile int *)0xFEC40010)
|
||||
#define CursorControlReg_H_A ((volatile int *)0xFEC40014)
|
||||
#define BorderControlReg_H_A ((volatile unsigned long *)0xFEC40008)
|
||||
#define BackGroundControlReg_A ((volatile unsigned long *)0xFEC4000C)
|
||||
#define CursorControlReg_L_A ((volatile unsigned long *)0xFEC40010)
|
||||
#define CursorControlReg_H_A ((volatile unsigned long *)0xFEC40014)
|
||||
|
||||
#define LineInterrupt0_A ((volatile uint16_t *)0xFEC40018)
|
||||
#define LineInterrupt1_A ((volatile uint16_t *)0xFEC4001A)
|
||||
#define LineInterrupt2_A ((volatile uint16_t *)0xFEC4001C)
|
||||
#define LineInterrupt3_A ((volatile uint16_t *)0xFEC4001E)
|
||||
#define LineInterrupt0_A ((volatile unsigned long *)0xFEC40018)
|
||||
#define LineInterrupt1_A ((volatile unsigned long *)0xFEC4001A)
|
||||
#define LineInterrupt2_A ((volatile unsigned long *)0xFEC4001C)
|
||||
#define LineInterrupt3_A ((volatile unsigned long *)0xFEC4001E)
|
||||
|
||||
#define FONT_Size_Ctrl_A ((volatile int *)0xFEC40020)
|
||||
#define FONT_Count_Ctrl_A ((volatile int *)0xFEC40024)
|
||||
#define FONT_Size_Ctrl_A ((volatile unsigned long *)0xFEC40020)
|
||||
#define FONT_Count_Ctrl_A ((volatile unsigned long *)0xFEC40024)
|
||||
|
||||
#define MousePointer_Mem_A ((volatile uint16_t *)0xFEC40400)
|
||||
#define MousePtr_A_CTRL_Reg ((volatile uint16_t *)0xFEC40C00)
|
||||
#define MousePointer_Mem_A ((volatile unsigned long *)0xFEC40400)
|
||||
#define MousePtr_A_CTRL_Reg ((volatile unsigned long *)0xFEC40C00)
|
||||
#define MousePtr_En 0x0001
|
||||
|
||||
#define MousePtr_A_X_Pos ((volatile uint16_t *)0xFEC40C02)
|
||||
#define MousePtr_A_Y_Pos ((volatile uint16_t *)0xFEC40C04)
|
||||
#define MousePtr_A_Mouse0 ((volatile uint16_t *)0xFEC40C0A)
|
||||
#define MousePtr_A_Mouse1 ((volatile uint16_t *)0xFEC40C0C)
|
||||
#define MousePtr_A_Mouse2 ((volatile uint16_t *)0xFEC40C0E)
|
||||
#define MousePtr_A_X_Pos ((volatile unsigned long *)0xFEC40C02)
|
||||
#define MousePtr_A_Y_Pos ((volatile unsigned long *)0xFEC40C04)
|
||||
#define MousePtr_A_Mouse0 ((volatile unsigned long *)0xFEC40C0A)
|
||||
#define MousePtr_A_Mouse1 ((volatile unsigned long *)0xFEC40C0C)
|
||||
#define MousePtr_A_Mouse2 ((volatile unsigned long *)0xFEC40C0E)
|
||||
|
||||
#define ScreenText_A ((volatile char *)0xFEC60000) /* Text matrix */
|
||||
#define ColorText_A ((volatile uint8_t *)0xFEC68000) /* Color matrix */
|
||||
|
@ -70,39 +70,39 @@
|
|||
* Screen Channel B
|
||||
*/
|
||||
|
||||
#define MasterControlReg_B ((volatile int *)0xFEC80000)
|
||||
#define BorderControlReg_L_B ((volatile int *)0xFEC80004)
|
||||
#define BorderControlReg_H_B ((volatile int *)0xFEC80008)
|
||||
#define BackGroundControlReg_B ((volatile int *)0xFEC8000C)
|
||||
#define CursorControlReg_L_B ((volatile int *)0xFEC80010)
|
||||
#define CursorControlReg_H_B ((volatile int *)0xFEC80014)
|
||||
#define MasterControlReg_B ((volatile unsigned long *)0xFEC80000)
|
||||
#define BorderControlReg_L_B ((volatile unsigned long *)0xFEC80004)
|
||||
#define BorderControlReg_H_B ((volatile unsigned long *)0xFEC80008)
|
||||
#define BackGroundControlReg_B ((volatile unsigned long *)0xFEC8000C)
|
||||
#define CursorControlReg_L_B ((volatile unsigned long *)0xFEC80010)
|
||||
#define CursorControlReg_H_B ((volatile unsigned long *)0xFEC80014)
|
||||
|
||||
#define LineInterrupt0_B ((volatile uint16_t *)0xFEC80018)
|
||||
#define LineInterrupt1_B ((volatile uint16_t *)0xFEC8001A)
|
||||
#define LineInterrupt2_B ((volatile uint16_t *)0xFEC8001C)
|
||||
#define LineInterrupt3_B ((volatile uint16_t *)0xFEC8001E)
|
||||
#define LineInterrupt0_B ((volatile unsigned long *)0xFEC80018)
|
||||
#define LineInterrupt1_B ((volatile unsigned long *)0xFEC8001A)
|
||||
#define LineInterrupt2_B ((volatile unsigned long *)0xFEC8001C)
|
||||
#define LineInterrupt3_B ((volatile unsigned long *)0xFEC8001E)
|
||||
|
||||
#define MousePointer_Mem_B ((volatile uint16_t *)0xFEC80400)
|
||||
#define MousePtr_B_CTRL_Reg ((volatile uint16_t *)0xFEC80C00)
|
||||
#define MousePointer_Mem_B ((volatile unsigned long *)0xFEC80400)
|
||||
#define MousePtr_B_CTRL_Reg ((volatile unsigned long *)0xFEC80C00)
|
||||
|
||||
#define MousePtr_B_X_Pos ((volatile uint16_t *)0xFEC80C02)
|
||||
#define MousePtr_B_Y_Pos ((volatile uint16_t *)0xFEC80C04)
|
||||
#define MousePtr_B_Mouse0 ((volatile uint16_t *)0xFEC80C0A)
|
||||
#define MousePtr_B_Mouse1 ((volatile uint16_t *)0xFEC80C0C)
|
||||
#define MousePtr_B_Mouse2 ((volatile uint16_t *)0xFEC80C0E)
|
||||
#define MousePtr_B_X_Pos ((volatile unsigned long *)0xFEC80C02)
|
||||
#define MousePtr_B_Y_Pos ((volatile unsigned long *)0xFEC80C04)
|
||||
#define MousePtr_B_Mouse0 ((volatile unsigned long *)0xFEC80C0A)
|
||||
#define MousePtr_B_Mouse1 ((volatile unsigned long *)0xFEC80C0C)
|
||||
#define MousePtr_B_Mouse2 ((volatile unsigned long *)0xFEC80C0E)
|
||||
|
||||
#define ScreenText_B ((volatile char *)0xFECA0000) /* Text matrix */
|
||||
#define ColorText_B ((volatile uint8_t *)0xFECA8000) /* Color matrix */
|
||||
#define FG_CLUT_B ((volatile unsigned long *)0xFECAC400) /* Foreground LUT */
|
||||
#define BG_CLUT_B ((volatile unsigned long *)0xFECAC440) /* Background LUT */
|
||||
|
||||
#define BM0_Control_Reg ((volatile uint16_t *)0xFEC80100)
|
||||
#define BM0_Addy_Pointer_Reg ((volatile uint16_t *)0xFEC80104)
|
||||
#define BM0_Control_Reg ((volatile unsigned long *)0xFEC80100)
|
||||
#define BM0_Addy_Pointer_Reg ((volatile unsigned long *)0xFEC80104)
|
||||
|
||||
#define Sprite_0_CTRL ((volatile uint16_t *)0xFEC81000)
|
||||
#define Sprite_0_ADDY_HI ((volatile uint16_t *)0xFEC81002)
|
||||
#define Sprite_0_POS_X ((volatile uint16_t *)0xFEC81004)
|
||||
#define Sprite_0_POS_Y ((volatile uint16_t *)0xFEC81006)
|
||||
#define Sprite_0_CTRL ((volatile unsigned long *)0xFEC81000)
|
||||
#define Sprite_0_ADDY_HI ((volatile unsigned long *)0xFEC81002)
|
||||
#define Sprite_0_POS_X ((volatile unsigned long *)0xFEC81004)
|
||||
#define Sprite_0_POS_Y ((volatile unsigned long *)0xFEC81006)
|
||||
|
||||
/*
|
||||
* Color lookup tables
|
||||
|
|
15230
src/mapfile
15230
src/mapfile
File diff suppressed because it is too large
Load diff
|
@ -255,7 +255,7 @@ const unsigned char splashscreen_lut[] = {
|
|||
0xFD, 0xFD, 0xFD, 0x00,
|
||||
0xFE, 0xFE, 0xFE, 0x00,
|
||||
0xFF, 0xFF, 0xFF, 0x00,
|
||||
}
|
||||
};
|
||||
|
||||
const unsigned char splashscreen_pix[] = {
|
||||
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00,
|
||||
|
@ -675,4 +675,4 @@ const unsigned char splashscreen_pix[] = {
|
|||
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00,
|
||||
0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x69, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
|
|
@ -681,4 +681,4 @@ const unsigned char splashscreen_pix[] = {
|
|||
0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10,
|
||||
0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10,
|
||||
0xFF, 0x10, 0xFF, 0x10, 0xFF, 0x10, 0x69, 0x10, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
#define VER_MAJOR 0
|
||||
#define VER_MINOR 1
|
||||
#define VER_BUILD 1
|
||||
#define VER_BUILD 3
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue