This commit is contained in:
david 2009-06-08 16:55:59 +02:00
parent 309e1062b9
commit 8e1e5ea072

View File

@ -17,35 +17,27 @@
* o debug STA global o optimize internal transfer buffer o direct write to mempage o relocate main code o exec loaded file * o debug STA global o optimize internal transfer buffer o direct write to mempage o relocate main code o exec loaded file
*/ */
// #pragma section CODE=BANK2,offset $2:0000
#define ROM_NAME "MRDO.SMC" #define ROM_NAME "MRDO.SMC"
// #define ROM_NAME "TEST.TXT"
#define BLOCK_SIZE 512 #define BLOCK_SIZE 512
#define BASE_ADDR 0x008000 #define BASE_ADDR 0x008000
padStatus pad1; padStatus pad1;
DWORD acc_size; /* Work register for fs command */ DWORD acc_size; /* Work register for fs command */
WORD acc_files, WORD acc_files, acc_dirs;
acc_dirs;
FILINFO finfo; FILINFO finfo;
FATFS fatfs[2]; /* File system object for each logical * drive */ FATFS fatfs[2]; /* File system object for each logical * drive */
BYTE Buff[512]; /* Working buffer */ BYTE Buff[512]; /* Working buffer */
DWORD p1, DWORD p1, p2, p3;
p2,
p3;
DWORD addr; DWORD addr;
DWORD crc_addr; DWORD crc_addr;
UINT crc; UINT crc;
BYTE res, BYTE res, bank;
bank;
WORD w1; WORD w1;
UINT s1, UINT s1, s2, cnt;
s2,
cnt;
FATFS *fs; FATFS *fs;
DIR dir; /* Directory object */ DIR dir; /* Directory object */
FIL file1, FIL file1, file2;
file2;
void initInternalRegisters(void) void initInternalRegisters(void)
{ {
characterLocation[0] = 0x0000; characterLocation[0] = 0x0000;
@ -53,8 +45,7 @@ void initInternalRegisters(void)
characterLocation[2] = 0x0000; characterLocation[2] = 0x0000;
characterLocation[3] = 0x0000; characterLocation[3] = 0x0000;
debug_init(); debug_init();
} void } void preInit(void)
preInit(void)
{ {
// For testing purpose ... // For testing purpose ...
@ -141,11 +132,9 @@ void boot(void)
#asm #asm
jsl $008000 jsl $008000
#endasm #endasm
} void } void main(void)
main(void)
{ {
word i, word i, j;
j;
BYTE res; BYTE res;
initInternalRegisters(); initInternalRegisters();
*(byte *) 0x2105 = 0x01; // MODE 1 value *(byte *) 0x2105 = 0x01; // MODE 1 value
@ -292,8 +281,7 @@ void boot(void)
void IRQHandler(void) void IRQHandler(void)
{ {
} void } void NMIHandler(void)
NMIHandler(void)
{ {
// processEvents(); // processEvents();