Move screen init into crt0.s
This commit is contained in:
parent
74a904be54
commit
cdb8035cf0
3 changed files with 5 additions and 11 deletions
|
@ -19,7 +19,7 @@ SEGMENTS {
|
|||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $7FF0;
|
||||
FFF0: load = ROM, type = ro, offset = $7FEA;
|
||||
VECTOR: load = ROM, type = ro, offset = $7FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,10 @@ not_dma:
|
|||
; Removing this segment gives only a warning.
|
||||
.segment "FFF0"
|
||||
.proc reset32kcode
|
||||
lda #(6<<5)
|
||||
lda #$A0
|
||||
sta lcd_width
|
||||
sta lcd_height
|
||||
lda #$C9
|
||||
sta sv_bank
|
||||
; Now, the 32Kbyte image can reside in the top of 64Kbyte and 128Kbyte ROMs.
|
||||
jmp reset
|
||||
|
|
|
@ -34,19 +34,10 @@ unsigned char bit_reverse(unsigned char n)
|
|||
return (bit_reverse_lookup[n&0b1111] << 4) | bit_reverse_lookup[n>>4];
|
||||
}
|
||||
|
||||
void init_screen(void)
|
||||
{
|
||||
SV_LCD.height = 0xA0;
|
||||
SV_LCD.width = 0xA0;
|
||||
SV_BANK = 0xC9;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned char i;
|
||||
|
||||
init_screen();
|
||||
|
||||
clear_screen();
|
||||
|
||||
for(i=0;i<8;++i)
|
||||
|
|
Loading…
Add table
Reference in a new issue