o start to do the mmio debug in asm
This commit is contained in:
@@ -27,7 +27,7 @@ void int2hex(unsigned long number, char *buf,word size)
|
||||
|
||||
}
|
||||
|
||||
void writeln(char *buffer,word y){
|
||||
void printDebugScreen(char *buffer,word y){
|
||||
char i;
|
||||
waitForVBlank();
|
||||
for(i=0; i<32; i++) {
|
||||
@@ -36,6 +36,11 @@ void writeln(char *buffer,word y){
|
||||
}
|
||||
}
|
||||
|
||||
void printf(char *buffer){
|
||||
while(*buffer)
|
||||
*(byte*) 0x3000=*buffer++;
|
||||
}
|
||||
|
||||
void enableDebugScreen(void){
|
||||
VRAMLoad((word) debugFont_pic, 0x5000, 2048);
|
||||
CGRAMLoad((word) debugFont_pal, (byte) 0x00, (word) 16);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
void initDebugMap(void);
|
||||
void debug(void);
|
||||
void int2hex(unsigned long i, char *buf,word size);
|
||||
void writeln(char* line,word y);
|
||||
void enableDebugScreen(void);
|
||||
void printDebugScreen(char* line,word y);
|
||||
void enableDebugScreen(void);
|
||||
void printf(char* line);
|
||||
|
||||
@@ -29,7 +29,7 @@ void main(void) {
|
||||
word crc01;
|
||||
word crc02;
|
||||
padStatus pad1;
|
||||
char line_header[32] = "OK";
|
||||
char line_header[32] = "OK2";
|
||||
char packet[4] = "TEST";
|
||||
initInternalRegisters();
|
||||
|
||||
@@ -39,13 +39,10 @@ void main(void) {
|
||||
*(byte*) 0x2100 = 0x0f; // enable background
|
||||
|
||||
enableDebugScreen();
|
||||
writeln(line_header,0);
|
||||
|
||||
for (i=0;i<4;i++){
|
||||
*(byte*) 0x3000=packet[i];
|
||||
*(byte*) 0x700010=packet[i];
|
||||
}
|
||||
//writeln(line_header,1);
|
||||
printDebugScreen(line_header,0);
|
||||
printf("Debugging console test\n");
|
||||
printf("test me\n");
|
||||
printDebugScreen(line_header,1);
|
||||
|
||||
while(1){
|
||||
while(!pad1.start) {
|
||||
|
||||
Reference in New Issue
Block a user