From 43a7e93eeeef14609d9382540b761bcbdd0addf6 Mon Sep 17 00:00:00 2001 From: Stephane Dallongeville Date: Sat, 28 Sep 2024 09:50:04 +0200 Subject: [PATCH] Added MAP patching example (press button Y to enable / disable it) --- sample/game/sonic/inc/level.h | 2 +- sample/game/sonic/out/rom.bin | Bin 262144 -> 262144 bytes sample/game/sonic/src/level.c | 40 +++++++++++++++++++++++++++++++++ sample/game/sonic/src/main.c | 3 ++- sample/game/sonic/src/player.c | 2 +- sample/game/sonic/src/utils.c | 1 - 6 files changed, 44 insertions(+), 4 deletions(-) diff --git a/sample/game/sonic/inc/level.h b/sample/game/sonic/inc/level.h index 5cd40da87..75b661cb6 100644 --- a/sample/game/sonic/inc/level.h +++ b/sample/game/sonic/inc/level.h @@ -23,7 +23,7 @@ void LEVEL_updateMapAlternate(VDPPlane plane, Map* map, s16 xmt, s16 ymt); void LEVEL_updateVDPScroll(); void LEVEL_onVBlank(void); -void LEVEL_handleInput(u16 value); +void LEVEL_doJoyAction(u16 joy, u16 changed, u16 state); #endif // _LEVEL_H_ diff --git a/sample/game/sonic/out/rom.bin b/sample/game/sonic/out/rom.bin index c080df96ebb731e04eff9bf64399b0761f28d699..9273efeaa7bc1fc490fce33eb2b055e340beea96 100644 GIT binary patch delta 19655 zcmcJ14Ompi)&IG(%d##DEU+LF)MY^=gs>|TLJZYqL0pk+s9IyJO*Ux28Uw@{gNC{* zeuO4g3D-zoW3Bq8#`+qAV2z>H5H-g5Nzf8&jZsuoG{(2hn;Hc6|C_n2g4(_x&-0h( z-aGfqnRCvZb7tnuxwCpa29L*3yIf)eUzDq)I_>Eb&L4=*Os~&n87%b7EbU_?o%PaJ zMH=TvM88>D|F*g|QaUS-9r&o*aVeclC1f<0P^8I1(eW0FOX-(NxmiW=xgU_JC_W{t zxiQVavVQBeN`J7G1zwrKY%cO-SsTaOw~sBnkoPr3J6~?z+k?aE`{HEQjV(I;PwV`~ z79MczuJ;UlMUuA5YX>{^MMMYmDq?tc%i{-|lg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cr|WA!08Yw zoY)pZh<=W6`ecOq^vUJ^hc^U-<6l>gdKrbV1^T4|-lO@GwKntCw_g%;O1#bFZ+=sS z2_Ef3e&3c^IeV%wV&E-*hAGvFQ-wI8=+nBX!aR>k+YBMxG0%UAW|gK~(?7qV`5%oN z@PR%B-`zPc+e$V<1_j`%=aI*1P1lzFV(KqZa}_8yFTbrZvvU1xxp}tr zlgil^>My4`k&`NySg1Ma(D}1lpNVdMN48u~2Zx>=qF2dju&ElmFF%=gsGmQRNiCas zb*maeULDh-AJl5!>L-xoYOk{)YQ6ch$~FrP4>M~gjYzImeiG{Q=d6L%@@5^*Bey~o z&7mIOWewTtxkSHuiM}!^h5Bpg`}FhBNj0GZZ-)83O3W#hb5m%9OmE#(xh{nU2$hu| zq|gy|^P6L8xxUq2&%d`-EmRL0zI^ajZy`L?H(am!Hc2+goKbq(RP9Yee}ChO|^W|gvzK?8swojFELvy zGg4_(oZecayej`vrzElmbcTNQS^bHP=40bJm0xE?zqdL!bkcn?!u(BX%sVH>b;=Ki zdVH95B6?F^m{9piD)m>E9vd^%|G)JsE9+9}P+3SRt-PH|X9dxB_15qHYio#59qcq~ zOm}sDxbmzI+eup@gDYpJ(UpNATg_gjU&#V>0|-8>`8^w|KA-Gm9;YAp?FK7-(L+CE zMX0rMyp;wiMpy%=x2$rumFCF9sE@3&&PoFXp|ZtFBcG)!U$s_y{GR?%ulSgRn(l&OW-XJ~k+*RUM?Q@S@DI#*MA!9b_VztasNvJO4<39tNk0v!{gAFwji z`j6p$MDO20uj+8@_-wdek!*apIVJohOZe;`Hl$PchKclwZdpiO$U%F^-$D-kJ>+DF n@!8c)W5+~mkHz>kofzjg#(lR^$e`C(O`_W-$!fM`3iAICWnSc$ diff --git a/sample/game/sonic/src/level.c b/sample/game/sonic/src/level.c index 9af5243b4..942e2b785 100644 --- a/sample/game/sonic/src/level.c +++ b/sample/game/sonic/src/level.c @@ -21,6 +21,10 @@ Map *bga; u16 bgBaseTileIndex[2]; +// forward +static void PatchDataCallback(Map *map, u16 *buf, u16 x, u16 y, MapUpdateType updateType, u16 size); + + u16 LEVEL_init(u16 vramIndex) { u16 ind; @@ -167,9 +171,45 @@ void LEVEL_updateMapAlternate(VDPPlane plane, Map* map, s16 xmt, s16 ymt) } +void LEVEL_doJoyAction(u16 joy, u16 changed, u16 state) +{ + if (changed & state & BUTTON_X) + { + if (bga->mapDataPatchCB != NULL) MAP_setDataPatchCallback(bga, NULL); + else MAP_setDataPatchCallback(bga, PatchDataCallback); + } +} + + void LEVEL_onVBlank(void) { // reset tilemap buffer position after update bufOffset = 0; } + +static void PatchDataCallback(Map *map, u16 *buf, u16 x, u16 y, MapUpdateType updateType, u16 size) +{ + u16* dst = buf; + u16 xt = x; + u16 yt = y; + u16 i = size; + + while(i--) + { + u16 tileData = *dst; + + // remove palette info + tileData &= ~TILE_ATTR_PALETTE_MASK; + // set palette depending tile position (just for fun) + tileData |= ((xt ^ yt) & 3) << TILE_ATTR_PALETTE_SFT; + + // set back tile data + *dst++ = tileData; + + // just to keep track of current tile position + if (updateType == ROW_UPDATE) xt++; + else yt++; + } +} + diff --git a/sample/game/sonic/src/main.c b/sample/game/sonic/src/main.c index cb1719437..0ea29d427 100644 --- a/sample/game/sonic/src/main.c +++ b/sample/game/sonic/src/main.c @@ -139,9 +139,10 @@ static void joyEvent(u16 joy, u16 changed, u16 state) // can't do more in paused state if (paused) return; - // handle player / camera joy actions + // handle player / camera / level joy actions PLAYER_doJoyAction(joy, changed, state); CAMERA_doJoyAction(joy, changed, state); + LEVEL_doJoyAction(joy, changed, state); } static void vblank() diff --git a/sample/game/sonic/src/player.c b/sample/game/sonic/src/player.c index 9c1dbd994..34f5b481b 100644 --- a/sample/game/sonic/src/player.c +++ b/sample/game/sonic/src/player.c @@ -173,7 +173,7 @@ void PLAYER_handleInput(u16 value) void PLAYER_doJoyAction(u16 joy, u16 changed, u16 state) { - if (changed & state & (BUTTON_A | BUTTON_B | BUTTON_C | BUTTON_X | BUTTON_Y | BUTTON_Z)) + if (changed & state & (BUTTON_A | BUTTON_B | BUTTON_C)) { if (movY == 0) { diff --git a/sample/game/sonic/src/utils.c b/sample/game/sonic/src/utils.c index 189403ea2..d37a0c014 100644 --- a/sample/game/sonic/src/utils.c +++ b/sample/game/sonic/src/utils.c @@ -13,4 +13,3 @@ void setSpritePosition(Sprite* sprite, s16 x, s16 y) SPR_setPosition(sprite, x, y); } } -