diff --git a/out/res/resources.d b/out/res/resources.d index 8041cf3..e935d6f 100644 --- a/out/res/resources.d +++ b/out/res/resources.d @@ -1,3 +1,5 @@ out/res/resources.o: res/resources.res \ C:/Users/ttibb/Dev/SGDK-Game/res/background1.png \ +C:/Users/ttibb/Dev/SGDK-Game/res/btwade_bg1_1.png \ +C:/Users/ttibb/Dev/SGDK-Game/res/btwade_bg2_1.png \ C:/Users/ttibb/Dev/SGDK-Game/res/Sprites/BTW-1.png \ No newline at end of file diff --git a/out/res/resources.o b/out/res/resources.o index 1310c9f..57ef5ba 100644 Binary files a/out/res/resources.o and b/out/res/resources.o differ diff --git a/out/rom.bin b/out/rom.bin index fde8486..8c49682 100644 Binary files a/out/rom.bin and b/out/rom.bin differ diff --git a/out/rom.out b/out/rom.out index a9771ac..af6b65e 100644 Binary files a/out/rom.out and b/out/rom.out differ diff --git a/out/src/Main.o b/out/src/Main.o index 333ed79..bdfa3a8 100644 Binary files a/out/src/Main.o and b/out/src/Main.o differ diff --git a/out/symbol.txt b/out/symbol.txt index 3b2c18b..dc54a45 100644 --- a/out/symbol.txt +++ b/out/symbol.txt @@ -6,8 +6,11 @@ 00000020 a sgdk_logo_palette_data_size 00000044 A _sdata 00000080 a bg1_palette_data_size +00000080 a bgtest_palette_data_size 000000ac A stop_xgm_size 00000100 T rom_header +00000144 a bg1_tilemap_data_size +0000014c a fg1_tilemap_data_size 00000200 t _Entry_Point 0000023c t NoTMSS 00000242 t SkipInit @@ -15,7 +18,7 @@ 0000025a t _EXTINT 00000262 a font_default_data_size 0000026c t _VINT -00000270 a bg1_tilemap_data_size +00000270 a bgtest_tilemap_data_size 00000282 a bigTex1_animation0_frame0_tileset_data_size 0000028e t unlock 000002b0 t no_user_task @@ -43,6 +46,7 @@ 000003e6 t norm 000003f6 t not1 00000410 t slow +00000424 a bg1_tileset_data_size 0000043a a sgdk_logo_data_size 0000043c t slower 00000440 t moreadj @@ -51,6 +55,7 @@ 00000468 T TSK_init 0000048e t .loop 00000496 T TSK_superPost +000004a8 a fg1_tileset_data_size 000004ac t no_task 000004ae T TSK_userYield 000004b6 t userYield @@ -89,7 +94,7 @@ 00000798 T lz4w_unpack 0000079e t lz4w_unpack_a 000007b8 t .jump_table -000009b6 a bg1_tileset_data_size +000009b6 a bgtest_tileset_data_size 00000cb6 t .lmr_len_01 00000dca t .lmr_len_00 00000fdc t .lm_len_00 @@ -357,217 +362,231 @@ 00001b18 t .lit5_matF 00001b1a t .lit3_matF 00001b1c t .lit1_matF -00001b58 t myJoyHandler -00001d0a t DMA_queueDmaFast -00001e58 t DMA_doDmaFast -00001fe8 t DMA_doCPUCopyDirect -0000212c t DMA_doCPUCopy -000021e6 t Z80_getAndRequestBus.constprop.0 -00002214 t externalIntCB -00002354 t _extint_dummy_callback -00002356 t read6Btn -0000249e t readMouse -000028a6 t readTeamPlayer -00003078 t readLightgun -000035f8 t readTrackball -0000382c t MEM_alloc -00003902 t MEM_free -00003914 t DMA_setBufferSize -0000396e t MEM_pack -000039d6 t _int_callback -000039d8 t _vblank_dummy_callback -000039da t _vint_dummy_callback -000039dc t _hint_dummy_callback -000039de t VDP_setHVLatching -00003a1e t updateUserTileMaxIndex -00003a20 t VDP_resetSprites -00003a48 t VDP_getPlaneAddress -00003afa t XGM_unloadDriver -00003b12 t XGM2_unloadDriver -00003b1a t SND_DPCM2_unloadDriver -00003b1a t SND_PCM_unloadDriver -00003b1a t SND_PCM4_unloadDriver -00003b1c t YM2612_reset -00003f28 t setNextXFrame.constprop.0 -00003f76 t DMA_initEx.constprop.0 -00003fee t VRAM_createRegion.constprop.0 -0000404c t VRAM_alloc.constprop.0 -0000411a t SPR_defragVRAM -000041c4 t VDP_setTileMapDataEx.constprop.0 -00004298 t releaseSprite.part.0.isra.0 -00004300 t SPR_addSpriteEx.constprop.0 -0000446a t JOY_update -00004932 t Z80_clear -000049f4 t Z80_upload -00004b0e t Z80_upload.constprop.0 -00004bea t Z80_upload.constprop.1 -00004cc6 t PAL_doFadeStep -00004ce0 t VDP_drawTextEx.constprop.0 -00004e50 t SND_NULL_loadDriver -00004f48 t Z80_loadDriverInternal -00005058 t getAccess -000051a8 t setFMVolume -00005240 t setPSGVolume -000052d8 t setMusicTempo.constprop.0 -0000536e t setLoopNumber.constprop.0 -000053bc t setTileMapDataColumnEx.constprop.0 -00005526 t VDP_setTileMapDataRectEx.constprop.0 -000057f0 t SPR_update -00005ff8 t VDP_waitVBlank -000061a2 T BMP_doVBlankProcess -000061ac T VDP_setAutoInc -000061c6 T memset -000061e0 t XGM2_loadDriver -00006360 t Z80_loadDriver -00006442 t Z80_init -000064a8 t XGM2_stop -0000652e t XGM2_pause -000065a0 t SYS_doVBlankProcessEx.constprop.0.isra.0 -00006ade t waitSubTick.part.0 -00006c9c t XGM_loadDriver -00006f4a t SND_DPCM2_loadDriver -000070f2 t SND_PCM_loadDriver -0000729a t SND_PCM4_loadDriver -0000744a t POOL_reset.constprop.0 -000074c0 T memcpy -000074d0 t DMA_transfer.isra.0 -000076a8 t PAL_setPalette -000076d0 t SPR_end -0000776e t SPR_initEx.constprop.0 -000078d2 t updateMapsAddress -00007a80 t VDP_setReg.constprop.0 -00007a9a t JOY_setSupport -00007abe t JOY_reset -0000818a t VDP_resetScreen -000086d6 t VDP_init -000087d8 t internal_reset -0000891e t VDP_drawImageEx.constprop.0.isra.0 -00008bb2 t main.isra.0 -00008cf6 T _start_entry -00008dbc T _reset_entry -00008dc4 T XGM_doVBlankProcess -00008e2c T MDDBG__SymbolDataPtr -00008e30 t __ErrorHandler -00008e30 t MDDBG__ErrorHandler -00008f58 t MDDBG__Error_IdleLoop -00008f72 t MDDBG__Error_InitConsole -00008f7e t MDDBG__Error_MaskStackBoundaries -00008fe8 t MDDBG__Error_DrawOffsetLocation -00008fec t MDDBG__Error_DrawOffsetLocation2 -00008ff2 t MDDBG__Error_DrawOffsetLocation__inj -00009080 t MDDBG__ErrorHandler_SetupVDP -000090b6 t MDDBG__ErrorHandler_VDPConfig -000090cc t MDDBG__ErrorHandler_VDPConfig_Nametables -00009108 t MDDBG__ErrorHandler_ConsoleConfig_Initial -0000910c t MDDBG__ErrorHandler_ConsoleConfig_Shared -0000913c t MDDBG__Str_OffsetLocation_24bit -00009145 t MDDBG__Str_OffsetLocation_32bit -00009180 t MDDBG__Art1bpp_Font -0000947a t MDDBG__GetSymbolByOffset -00009794 t MDDBG__FormatString -0000986e t MDDBG__Console_Init -000098ac t MDDBG__Console_Reset -000098ae t MDDBG__Console_InitShared -000098f8 t MDDBG__Console_SetPosAsXY_Stack -000098fe t MDDBG__Console_SetPosAsXY -00009932 t MDDBG__Console_GetPosAsXY -00009958 t MDDBG__Console_StartNewLine -00009986 t MDDBG__Console_SetBasePattern -000099a2 t MDDBG__Console_SetWidth -000099c0 t MDDBG__Console_WriteLine_WithPattern -000099c2 t MDDBG__Console_WriteLine -000099c6 t MDDBG__Console_Write -00009a8c t MDDBG__Console_WriteLine_Formatted -00009a90 t MDDBG__Console_Write_Formatted -00009ac0 t MDDBG__Decomp1bpp -00009adc t MDDBG__KDebug_WriteLine_Formatted -00009ae0 t MDDBG__KDebug_Write_Formatted -00009b34 t MDDBG__KDebug_FlushLine -00009b3e t MDDBG__KDebug_WriteLine -00009b42 t MDDBG__KDebug_Write -00009b70 t MDDBG__ErrorHandler_ConsoleOnly -00009b96 t MDDBG__ErrorHandler_ClearConsole -00009bc0 t MDDBG__ErrorHandler_PauseConsole -00009bfa t MDDBG__ErrorHandler_PagesController -00009c5a t MDDBG__VSync -00009c94 t MDDBG__ErrorHandler_ExtraDebuggerList -00009ca0 t MDDBG__Debugger_AddressRegisters -00009cec t MDDBG__Debugger_Backtrace -00009d8a T _Bus_Error -00009d8a t MDDBG__BusError -00009d9e T _Address_Error -00009d9e t MDDBG__AddressError -00009db6 T _Illegal_Instruction -00009db6 t MDDBG__IllegalInstr -00009dd4 T _Zero_Divide -00009dd4 t MDDBG__ZeroDivide -00009dea T _Chk_Instruction -00009dea t MDDBG__ChkInstr -00009e04 T _Trapv_Instruction -00009e04 t MDDBG__TrapvInstr -00009e20 T _Privilege_Violation -00009e20 t MDDBG__PrivilegeViol -00009e3e T _Trace -00009e3e t MDDBG__Trace -00009e4e T _Line_1010_Emulation -00009e4e t MDDBG__Line1010Emu -00009e6a T _Line_1111_Emulation -00009e6a t MDDBG__Line1111Emu -00009e86 T _Error_Exception -00009e86 t MDDBG__ErrorExcept -00009f00 T smp_null -0000a000 T smp_null_dpcm -0000a080 T __mulsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442 -0000a080 T __mulsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442 -0000a0a4 T __CTOR_LIST__ -0000a0ac T __CTOR_END__ -0000a0ac T __DTOR_LIST__ -0000a0b4 T __DTOR_END__ -0000a0b4 t bg1_tileset -0000a0bc t bg1_tilemap -0000a0c6 t bg1_palette -0000a0cc T bg1 -0000a0d8 t bigTex1_palette -0000a0de t bigTex1_animation0_frame0_tileset -0000a0e6 t bigTex1_animation0_frame0 -0000a102 t bigTex1_animation0_frames -0000a106 t bigTex1_animation0 -0000a10c t bigTex1_animations -0000a110 T bigTex1 -0000a21e t tab_vol -0000b21e t psgVolTable -0000b282 t fmVolTable -0000b2e6 t palette_blue -0000b306 t palette_green -0000b326 t palette_red -0000b346 t palette_grey -0000b366 t visibilityMask.0 -0000b388 t xlt.1 -0000b390 t xlt_all.0 -0000b3a0 t sgdk_logo_palette -0000b3a6 T sgdk_logo -0000b3b4 T font_default -0000b3bc T font_pal_default -0000b3c2 T drv_null -0000b3fc T drv_xgm -0000cafc T drv_dpcm2 -0000d8fc T drv_pcm -0000e42c T drv_pcm4 -0000ee9a T drv_xgm2 -00010e9c T __INIT_SECTION__ -00010e9e T __FINI_SECTION__ -00010ea0 T _etext -00010ea0 t bg1_palette_data -00010f20 t bigTex1_palette_data -00010f40 t sgdk_logo_palette_data -00010f60 t font_pal_default_data -00010f80 T stop_xgm -0001102c t font_default_data -0001128e t sgdk_logo_data -000116c8 t bg1_tilemap_data -00011938 t bg1_tileset_data -000122ee t bigTex1_animation0_frame0_tileset_data -00012570 A _stext +00001b58 t DMA_queueDmaFast +00001ca6 t Z80_getAndRequestBus.constprop.0 +00001cd4 t externalIntCB +00001e14 t _extint_dummy_callback +00001e16 t read6Btn +00001f5e t readMouse +00002366 t readTeamPlayer +00002b38 t readLightgun +000030b8 t readTrackball +000032ec t MEM_alloc +000033e4 t MEM_free +000033f6 t DMA_setBufferSize +00003450 t MEM_pack +000034b8 t DMA_queueDma.isra.0 +00003544 t _int_callback +00003546 t _vblank_dummy_callback +00003548 t _vint_dummy_callback +0000354a t _hint_dummy_callback +0000354c t VDP_setHVLatching +0000358c t updateUserTileMaxIndex +0000358e t VDP_resetSprites +000035b6 t VDP_getPlaneAddress +00003668 t XGM_unloadDriver +00003680 t XGM2_unloadDriver +00003688 t SND_DPCM2_unloadDriver +00003688 t SND_PCM_unloadDriver +00003688 t SND_PCM4_unloadDriver +0000368a t YM2612_reset +00003a96 t setNextXFrame.constprop.0 +00003ae4 t DMA_initEx.constprop.0 +00003b5c t VRAM_createRegion.constprop.0 +00003bba t VRAM_alloc.constprop.0 +00003c88 t SPR_defragVRAM +00003d32 t VDP_setTileMapDataEx.constprop.0 +00003e06 t releaseSprite.part.0.isra.0 +00003e6e t SPR_addSpriteEx.constprop.0 +00003fd8 t JOY_update +000044a0 t Z80_clear +00004562 t Z80_upload +0000467c t Z80_upload.constprop.0 +00004758 t Z80_upload.constprop.1 +00004834 t PAL_doFadeStep +0000484e t SPR_end +000048dc t SND_NULL_loadDriver +000049d4 t Z80_loadDriverInternal +00004ae4 t getAccess +00004c34 t setFMVolume +00004ccc t setPSGVolume +00004d64 t setMusicTempo.constprop.0 +00004dfa t setLoopNumber.constprop.0 +00004e48 t setTileMapDataRowEx.constprop.1 +00004f74 t VDP_drawText +000050d0 t setTileMapDataColumnEx.constprop.0 +00005224 t VDP_setTileMapDataRectEx.constprop.0 +0000559e t unpack.isra.0 +000055d4 t SPR_update +00005ddc t VDP_waitVBlank +00005f86 T BMP_doVBlankProcess +00005f90 T memset +00005faa t XGM2_loadDriver +0000612a t Z80_loadDriver +0000620c t Z80_init +00006272 t XGM2_stop +000062f8 t XGM2_pause +0000636a t SYS_doVBlankProcessEx.constprop.0.isra.0 +000068a8 t waitSubTick.part.0 +00006a66 t XGM_loadDriver +00006d14 t SND_DPCM2_loadDriver +00006ebc t SND_PCM_loadDriver +00007064 t SND_PCM4_loadDriver +00007214 t POOL_reset.constprop.0 +0000728a t SPR_initEx.constprop.0 +000073ee T memcpy +000073fe T VDP_setAutoInc +00007418 t DMA_doDmaFast +0000759e t DMA_doCPUCopyDirect +000076dc t DMA_transfer.isra.0 +00007868 t PAL_setPalette +00007890 t VDP_loadTileSet +0000798a t updateMapsAddress +00007a12 t VDP_setReg.constprop.0 +00007a2c t JOY_setSupport +00007a50 t JOY_reset +0000811c t VDP_resetScreen +0000836c t VDP_init +0000846e t internal_reset +000085b4 t VDP_drawImageEx.constprop.0.isra.0 +000086fc t main.isra.0 +00008b70 T _start_entry +00008c36 T _reset_entry +00008c3e T XGM_doVBlankProcess +00008ca4 T MDDBG__SymbolDataPtr +00008ca8 t __ErrorHandler +00008ca8 t MDDBG__ErrorHandler +00008dd0 t MDDBG__Error_IdleLoop +00008dea t MDDBG__Error_InitConsole +00008df6 t MDDBG__Error_MaskStackBoundaries +00008e60 t MDDBG__Error_DrawOffsetLocation +00008e64 t MDDBG__Error_DrawOffsetLocation2 +00008e6a t MDDBG__Error_DrawOffsetLocation__inj +00008ef8 t MDDBG__ErrorHandler_SetupVDP +00008f2e t MDDBG__ErrorHandler_VDPConfig +00008f44 t MDDBG__ErrorHandler_VDPConfig_Nametables +00008f80 t MDDBG__ErrorHandler_ConsoleConfig_Initial +00008f84 t MDDBG__ErrorHandler_ConsoleConfig_Shared +00008fb4 t MDDBG__Str_OffsetLocation_24bit +00008fbd t MDDBG__Str_OffsetLocation_32bit +00008ff8 t MDDBG__Art1bpp_Font +000092f2 t MDDBG__GetSymbolByOffset +0000960c t MDDBG__FormatString +000096e6 t MDDBG__Console_Init +00009724 t MDDBG__Console_Reset +00009726 t MDDBG__Console_InitShared +00009770 t MDDBG__Console_SetPosAsXY_Stack +00009776 t MDDBG__Console_SetPosAsXY +000097aa t MDDBG__Console_GetPosAsXY +000097d0 t MDDBG__Console_StartNewLine +000097fe t MDDBG__Console_SetBasePattern +0000981a t MDDBG__Console_SetWidth +00009838 t MDDBG__Console_WriteLine_WithPattern +0000983a t MDDBG__Console_WriteLine +0000983e t MDDBG__Console_Write +00009904 t MDDBG__Console_WriteLine_Formatted +00009908 t MDDBG__Console_Write_Formatted +00009938 t MDDBG__Decomp1bpp +00009954 t MDDBG__KDebug_WriteLine_Formatted +00009958 t MDDBG__KDebug_Write_Formatted +000099ac t MDDBG__KDebug_FlushLine +000099b6 t MDDBG__KDebug_WriteLine +000099ba t MDDBG__KDebug_Write +000099e8 t MDDBG__ErrorHandler_ConsoleOnly +00009a0e t MDDBG__ErrorHandler_ClearConsole +00009a38 t MDDBG__ErrorHandler_PauseConsole +00009a72 t MDDBG__ErrorHandler_PagesController +00009ad2 t MDDBG__VSync +00009b0c t MDDBG__ErrorHandler_ExtraDebuggerList +00009b18 t MDDBG__Debugger_AddressRegisters +00009b64 t MDDBG__Debugger_Backtrace +00009c02 T _Bus_Error +00009c02 t MDDBG__BusError +00009c16 T _Address_Error +00009c16 t MDDBG__AddressError +00009c2e T _Illegal_Instruction +00009c2e t MDDBG__IllegalInstr +00009c4c T _Zero_Divide +00009c4c t MDDBG__ZeroDivide +00009c62 T _Chk_Instruction +00009c62 t MDDBG__ChkInstr +00009c7c T _Trapv_Instruction +00009c7c t MDDBG__TrapvInstr +00009c98 T _Privilege_Violation +00009c98 t MDDBG__PrivilegeViol +00009cb6 T _Trace +00009cb6 t MDDBG__Trace +00009cc6 T _Line_1010_Emulation +00009cc6 t MDDBG__Line1010Emu +00009ce2 T _Line_1111_Emulation +00009ce2 t MDDBG__Line1111Emu +00009cfe T _Error_Exception +00009cfe t MDDBG__ErrorExcept +00009e00 T smp_null +00009f00 T smp_null_dpcm +00009f80 T __mulsi3 /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442 +00009f80 T __mulsi3_internal /home/runner/work/m68k-elf-gcc/m68k-elf-gcc/.build/HOST-i686-w64-mingw32/m68k-elf/src/gcc/libgcc/config/m68k/lb1sf68.S:442 +00009fa4 T __CTOR_LIST__ +00009fac T __CTOR_END__ +00009fac T __DTOR_LIST__ +00009fb4 T __DTOR_END__ +00009fb4 t bgtest_tileset +00009fbc t bgtest_tilemap +00009fc6 t bgtest_palette +00009fcc T bgtest +00009fd8 t bigTex1_palette +00009fde t bigTex1_animation0_frame0_tileset +00009fe6 t bigTex1_animation0_frame0 +0000a002 t bigTex1_animation0_frames +0000a006 t bigTex1_animation0 +0000a00c t bigTex1_animations +0000a010 T bigTex1 +0000a022 t bg1_tileset +0000a02a t bg1_tilemap +0000a034 t bg1_palette +0000a03a T bg1 +0000a046 t fg1_tileset +0000a04e t fg1_tilemap +0000a058 T fg1 +0000a0ea t tab_vol +0000b0ea t psgVolTable +0000b14e t fmVolTable +0000b1b2 t palette_blue +0000b1d2 t palette_green +0000b1f2 t palette_red +0000b212 t palette_grey +0000b232 t visibilityMask.0 +0000b254 t xlt.1 +0000b25c t xlt_all.0 +0000b26c t sgdk_logo_palette +0000b272 T sgdk_logo +0000b280 T font_default +0000b288 T font_pal_default +0000b28e T drv_null +0000b2c8 T drv_xgm +0000c9c8 T drv_dpcm2 +0000d7c8 T drv_pcm +0000e2f8 T drv_pcm4 +0000ed66 T drv_xgm2 +00010d68 T __INIT_SECTION__ +00010d6a T __FINI_SECTION__ +00010d6c T _etext +00010d6c t bgtest_palette_data +00010dec t bigTex1_palette_data +00010e0c t bg1_palette_data +00010e8c t sgdk_logo_palette_data +00010eac t font_pal_default_data +00010ecc T stop_xgm +00010f78 t font_default_data +000111da t sgdk_logo_data +00011614 t bgtest_tilemap_data +00011884 t bg1_tilemap_data +000119c8 t fg1_tilemap_data +00011b14 t bgtest_tileset_data +000124ca t bigTex1_animation0_frame0_tileset_data +0001274c t bg1_tileset_data +00012b70 t fg1_tileset_data +00013018 A _stext e0ff0000 D task_sr e0ff0002 D task_pc e0ff0006 D task_regs @@ -585,81 +604,85 @@ e0ff0060 B intLevelSave e0ff0062 B intTrace e0ff0064 B dmaQueues e0ff0068 b state -e0ff006a b vscroll_update -e0ff006b b hscroll_update -e0ff006c b fadePSGVol -e0ff006e b fadeFMVol -e0ff0070 b fadeCount -e0ff0072 b usedVDPSprite -e0ff0074 b xgm2WaitTab -e0ff007c b xgm2IdleTab -e0ff0084 b xgmTempoCnt -e0ff0088 b xgmWaitTab -e0ff00c8 b xgmIdleTab -e0ff0108 b xgmTempoDef -e0ff010a b xgmTempo -e0ff010c b busProtectSignalAddress -e0ff010e b driverFlags -e0ff0110 b currentDriver -e0ff0112 b allocStack -e0ff0252 b lastVTimer.0 -e0ff0254 b text_plan -e0ff0258 b text_basetile -e0ff025a b lastVCnt -e0ff025c b windowWidthSft -e0ff025e b planeWidthSft -e0ff0260 b windowWidth -e0ff0262 b planeHeight -e0ff0264 b planeWidth -e0ff0266 b hscrl_addr -e0ff0268 b bgb_addr -e0ff026a b bga_addr -e0ff026c b window_addr -e0ff026e b lastTick -e0ff0272 b cpuFrameLoad -e0ff0274 b frameLoadIndex -e0ff0276 b frameLoads -e0ff0286 b vblankCB -e0ff028a b flags -e0ff028c b screenHeight -e0ff028e b screenWidth -e0ff0290 b maps_addr -e0ff0292 b slist_addr -e0ff0294 b vdpSpriteCache -e0ff0594 b spriteVramSize -e0ff0598 b vram -e0ff05a4 b lastSprite -e0ff05a8 b firstSprite -e0ff05ac b spritesPool -e0ff05b0 b fadeCounter -e0ff05b2 b heap -e0ff05b6 b free.lto_priv.0 -e0ff05ba b randomSeedSet -e0ff05bc b joyEventCB -e0ff05c0 b retry -e0ff05c1 b phase.lto_priv.1 -e0ff05c2 b gun -e0ff05c3 b extSet -e0ff05c4 b disableIntStack -e0ff05c6 b joyAxisY -e0ff05d6 b joyAxisX -e0ff05e6 b joyState -e0ff05f6 b portSupport -e0ff05f8 b portType -e0ff05fa b gport -e0ff05fc b regValues -e0ff0610 b flag -e0ff0612 b maxTransferPerFrame -e0ff0614 b queueSize -e0ff0616 b nextDataBuffer -e0ff061a b queueTransferSize -e0ff061c b queueIndexLimit -e0ff061e b queueIndex -e0ff0620 b dmaDataBuffer -e0ff0624 b dataBufferSize -e0ff0626 b phase.lto_priv.0 -e0ff0628 b joyType -e0ff0630 b buttonString -e0ff0634 b debugString -e0ff0684 B _bend +e0ff006c b tile_scroll_array +e0ff00a4 b scrollFrameDelay +e0ff00a8 b player_hflip +e0ff00aa b player +e0ff00ae b player_y +e0ff00b2 b player_x +e0ff00b6 b vscroll_update +e0ff00b7 b hscroll_update +e0ff00b8 b fadePSGVol +e0ff00ba b fadeFMVol +e0ff00bc b fadeCount +e0ff00be b usedVDPSprite +e0ff00c0 b xgm2WaitTab +e0ff00c8 b xgm2IdleTab +e0ff00d0 b xgmTempoCnt +e0ff00d4 b xgmWaitTab +e0ff0114 b xgmIdleTab +e0ff0154 b xgmTempoDef +e0ff0156 b xgmTempo +e0ff0158 b busProtectSignalAddress +e0ff015a b driverFlags +e0ff015c b currentDriver +e0ff015e b allocStack +e0ff029e b lastVTimer.0 +e0ff02a0 b text_plan +e0ff02a4 b text_basetile +e0ff02a6 b lastVCnt +e0ff02a8 b windowWidthSft +e0ff02aa b planeWidthSft +e0ff02ac b windowWidth +e0ff02ae b planeHeight +e0ff02b0 b planeWidth +e0ff02b2 b hscrl_addr +e0ff02b4 b bgb_addr +e0ff02b6 b bga_addr +e0ff02b8 b window_addr +e0ff02ba b lastTick +e0ff02be b cpuFrameLoad +e0ff02c0 b frameLoadIndex +e0ff02c2 b frameLoads +e0ff02d2 b vblankCB +e0ff02d6 b flags +e0ff02d8 b screenHeight +e0ff02da b screenWidth +e0ff02dc b maps_addr +e0ff02de b slist_addr +e0ff02e0 b vdpSpriteCache +e0ff05e0 b spriteVramSize +e0ff05e4 b vram +e0ff05f0 b lastSprite +e0ff05f4 b firstSprite +e0ff05f8 b spritesPool +e0ff05fc b fadeCounter +e0ff05fe b heap +e0ff0602 b free.lto_priv.0 +e0ff0606 b randomSeedSet +e0ff0608 b joyEventCB +e0ff060c b retry +e0ff060d b phase.lto_priv.1 +e0ff0610 b regValues +e0ff0623 b gun +e0ff0624 b extSet +e0ff0626 b disableIntStack +e0ff0628 b joyAxisY +e0ff0638 b joyAxisX +e0ff0648 b joyState +e0ff0658 b joyType +e0ff0660 b portSupport +e0ff0662 b portType +e0ff0664 b gport +e0ff0666 b flag +e0ff0668 b maxTransferPerFrame +e0ff066a b queueSize +e0ff066c b nextDataBuffer +e0ff0670 b queueTransferSize +e0ff0672 b queueIndexLimit +e0ff0674 b queueIndex +e0ff0676 b dmaDataBuffer +e0ff067a b dataBufferSize +e0ff067c b phase.lto_priv.0 +e0ff067e B _bend e1000000 A __stack diff --git a/res/btwade_bg1_1.png b/res/btwade_bg1_1.png new file mode 100644 index 0000000..f0d6f2d Binary files /dev/null and b/res/btwade_bg1_1.png differ diff --git a/res/btwade_bg2_1.png b/res/btwade_bg2_1.png new file mode 100644 index 0000000..7c4c188 Binary files /dev/null and b/res/btwade_bg2_1.png differ diff --git a/res/resources.h b/res/resources.h index 1dcb38a..f4ee747 100644 --- a/res/resources.h +++ b/res/resources.h @@ -3,7 +3,9 @@ #ifndef _RES_RESOURCES_H_ #define _RES_RESOURCES_H_ -extern const Image bg1; +extern const Image bgtest; extern const SpriteDefinition bigTex1; +extern const Image bg1; +extern const Image fg1; #endif // _RES_RESOURCES_H_ diff --git a/res/resources.res b/res/resources.res index e39a7cb..eb79401 100644 --- a/res/resources.res +++ b/res/resources.res @@ -1,2 +1,4 @@ -IMAGE bg1 "background1.png" BEST ALL -SPRITE bigTex1 "Sprites\BTW-1.png" 8 8 FAST \ No newline at end of file +IMAGE bgtest "background1.png" BEST ALL +SPRITE bigTex1 "Sprites\BTW-1.png" 8 8 FAST +IMAGE bg1 "btwade_bg1_1.png" BEST ALL +IMAGE fg1 "btwade_bg2_1.png" BEST ALL \ No newline at end of file diff --git a/src/Main.c b/src/Main.c index fc15235..e8b2ff2 100644 --- a/src/Main.c +++ b/src/Main.c @@ -5,6 +5,23 @@ char debugString[80]; char* buttonString; char* clearString = " "; Sprite* player; +int player_x; +int player_y; +bool player_hflip; + + +int scrollFrameDelay = 0; + +s16 tile_scroll_array [28] = { + 0,0,0,0,0, + 0,0,0,0,0, + 0,0,0,0,0, + 0,0,0,0,0, + 0,0,0,0,0, + 0,0,0 +}; + + void myJoyHandler( u16 joy, u16 changed, u16 state) { @@ -56,6 +73,23 @@ void myJoyHandler( u16 joy, u16 changed, u16 state) strcat(debugString, " Z "); } + + if(state & BUTTON_DOWN){ + player_y += 1; + } + + if(state & BUTTON_UP){ + player_y -= 1; + } + + if(state & BUTTON_LEFT){ + player_x -= 1; + player_hflip = false; + } + if(state & BUTTON_RIGHT){ + player_x += 1; + player_hflip = true; + } if ((strlen(debugString) == 0)){ strcpy(debugString, "None"); } @@ -63,39 +97,93 @@ void myJoyHandler( u16 joy, u16 changed, u16 state) } } +static void handleInputs(){ + u16 value = JOY_readJoypad(JOY_1); + if (value & BUTTON_RIGHT){ + player_x += 1; + player_hflip = true; + } + if (value & BUTTON_LEFT){ + player_x -= 1; + player_hflip = false; + } + if (value & BUTTON_UP){ + player_y -= 1; + } + if (value & BUTTON_DOWN){ + player_y += 1; + } +} + + int main(bool hard) { + player_x = 50; + player_y = 50; JOY_init(); - JOY_setEventHandler( &myJoyHandler ); + //JOY_setEventHandler( &myJoyHandler); u16 ind = TILE_USER_INDEX; + + SPR_init(); - - PAL_setPalette(PAL0, bg1.palette->data, DMA); + PAL_setPalette(PAL1,fg1.palette->data,DMA); PAL_setPalette(PAL2, bigTex1.palette->data, DMA); player = SPR_addSprite(&bigTex1, 0,0, TILE_ATTR(PAL2,false,false,false)); - VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true); + VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, -4, false, true); + ind += bg1.tileset->numTile; + + VDP_drawImageEx(BG_A, &fg1,TILE_ATTR_FULL(PAL1, false, false, false, ind), 0, -4, false, true); + ind += fg1.tileset->numTile; + + VDP_setScrollingMode(HSCROLL_TILE,VSCROLL_PLANE); + + + + + while(TRUE) { - VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true); + handleInputs(); + //VDP_drawImageEx(BG_B, &bg1,TILE_ATTR_FULL(PAL0, false, false, false, ind), 0, 0, false, true); + SPR_setPosition(player, player_x,player_y); + SPR_setHFlip(player, player_hflip); SPR_update(); // read input // move sprite // update score // draw current screen (logo, start screen, settings, game, gameover, credits...) - VDP_drawText(clearString, 2, 5); - VDP_drawText(buttonString, 2, 5); + + if (scrollFrameDelay > 1){ + scrollFrameDelay = 0; + tile_scroll_array[15] -=1; + tile_scroll_array[16] -=1; + tile_scroll_array[17] -=1; + tile_scroll_array[18] -=1; + tile_scroll_array[19] -=1; + + } + tile_scroll_array[20] -=1; + tile_scroll_array[21] -=1; + tile_scroll_array[22] -=2; + tile_scroll_array[23] -=2; + tile_scroll_array[24] -=2; + tile_scroll_array[25] -=3; + tile_scroll_array[26] -=3; + tile_scroll_array[27] -=3; + + VDP_setHorizontalScrollTile(BG_A, 0, tile_scroll_array, 28, DMA_QUEUE); + scrollFrameDelay ++; - VDP_drawText(clearString, 14, 13); - VDP_drawText(debugString, 14, 13); + // wait for screen refresh and do all SGDK VBlank tasks SYS_doVBlankProcess();