o switch to compact mem layout

o 16 bit code
0 24 bit data
This commit is contained in:
optixx 2009-04-26 11:39:23 +02:00
parent 369667e154
commit dc83f998c7
4 changed files with 32 additions and 29 deletions

View File

@ -23,9 +23,12 @@ LD=$(WINE) $(SDK)/bin/WDCLN.exe
PADBIN=$(WINE) tools/padbin.exe PADBIN=$(WINE) tools/padbin.exe
PCX2SNES=$(WINE) tools/Pcx2Snes.exe PCX2SNES=$(WINE) tools/Pcx2Snes.exe
# Project # Project
INC=$(SDK)/include INC=$(SDK)/include
LIBS=$(SDK)/lib/cs LIBS=$(SDK)/lib/cc
#OBJS=StartupSnes.obj main.obj pad.obj event.obj myEvents.obj PPU.obj debug.obj ressource.obj #OBJS=StartupSnes.obj main.obj pad.obj event.obj myEvents.obj PPU.obj debug.obj ressource.obj
OBJS=StartupSnes.obj main.obj pad.obj PPU.obj debug.obj ressource.obj crc.obj OBJS=StartupSnes.obj main.obj pad.obj PPU.obj debug.obj ressource.obj crc.obj
APP=crc.smc APP=crc.smc
@ -54,11 +57,14 @@ kungfu:
debugfont: debugfont:
$(PCX2SNES) ressource/debugFont -n -c16 -s8 -o1 $(PCX2SNES) ressource/debugFont -n -c16 -s8 -o1
%.obj: %.asm StartupSnes.obj: StartupSnes.asm
$(AS) -V $?
ressource.obj: ressource.asm
$(AS) -V $? $(AS) -V $?
%.obj: %.c %.obj: %.c
$(CC) -wl -wp -sop -MS -I $(INC) $? $(CC) -wl -wp -sop -MC -I $(INC) $?
$(APP): $(OBJS) $(APP): $(OBJS)
$(LD) -HB -M21 -V -T -Pff \ $(LD) -HB -M21 -V -T -Pff \

View File

@ -12,7 +12,7 @@ CODE
XDEF START XDEF START
START: START:
XREF __main XREF _~main
sei ; Disabled interrupts sei ; Disabled interrupts
clc ; clear carry to switch to native mode clc ; clear carry to switch to native mode
@ -28,13 +28,13 @@ START:
; Init data used for heap ; Init data used for heap
; see heap definition below ; see heap definition below
XREF ___heap_top XREF _~_heap_top
XREF ___mem_start XREF _~_mem_start
stz ___heap_top stz _~_heap_top
stz ___mem_start stz _~_mem_start
XREF __preInit XREF _~preInit
jsr >__preInit jsr >_~preInit
sep #$30 ; X,Y,A are 8 bit numbers sep #$30 ; X,Y,A are 8 bit numbers
LONGA OFF LONGA OFF
@ -127,19 +127,19 @@ START:
longa on longa on
longi on longi on
jsr >__main jsr >_~main
brk brk
XDEF IRQ XDEF IRQ
IRQ: IRQ:
XREF __IRQHandler XREF _~IRQHandler
LONGA ON LONGA ON
LONGI ON LONGI ON
rep #$30 rep #$30
pha pha
phx phx
phy phy
jsr __IRQHandler jsr _~IRQHandler
ply ply
plx plx
pla pla
@ -147,7 +147,7 @@ IRQ:
XDEF NMI XDEF NMI
NMI: NMI:
XREF __NMIHandler XREF _~NMIHandler
LONGA ON LONGA ON
LONGI ON LONGI ON
rep #$30 rep #$30
@ -164,7 +164,7 @@ NMI:
LONGA ON LONGA ON
LONGI ON LONGI ON
rep #$30 rep #$30
jsr __NMIHandler jsr _~NMIHandler
plb plb
pld pld
ply ply
@ -183,12 +183,12 @@ ENDS
DATA DATA
XDEF __heap_start XDEF _~heap_start
XDEF __heap_end XDEF _~heap_end
__heap_start: _~heap_start:
WORD $1000 WORD $1000
__heap_end: _~heap_end:
WORD $1200 WORD $1200
;****************************************************************************** ;******************************************************************************

View File

@ -8,16 +8,16 @@ ressource .section
;__title_pic: ;__title_pic:
; INSERT ressource/kungfu.pic ; INSERT ressource/kungfu.pic
; ;
XDEF __title_pal ; XDEF __title_pal
__title_pal: ;__title_pal:
INSERT ressource/kungfu.clr ;make INSERT ressource/kungfu.clr
XDEF __debugFont_pic XDEF _~debugFont_pic
__debugFont_pic _~debugFont_pic
INSERT ressource/debugFont.pic INSERT ressource/debugFont.pic
XDEF __debugFont_pal XDEF _~debugFont_pal
__debugFont_pal _~debugFont_pal
INSERT ressource/debugFont.clr INSERT ressource/debugFont.clr
.ends .ends

View File

@ -1,6 +1,3 @@
//extern word title_map[];
//extern word title_pic[];
extern word title_pal[];
extern word debugFont_pic[]; extern word debugFont_pic[];
extern word debugFont_pal[]; extern word debugFont_pal[];