Skip to content

Commit

Permalink
Version 4.5 with improved display output (small fonts look better) an…
Browse files Browse the repository at this point in the history
…d SNES pad support.
  • Loading branch information
wavemotion-dave committed Nov 18, 2022
1 parent 455e2d2 commit a6f3527
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 45 deletions.
Binary file modified A7800DS.nds
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=4.4a
VERSION=4.5
TARGNAME=A7800DS

#---------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,10 @@ Updates by wavemotion-dave: https://github.com/wavemotion-dave/A7800DS
--------------------------------------------------------------------------------
History :
--------------------------------------------------------------------------------
V4.4a : XX-YYYY-2022 by wavemotion-dave
V4.5 : 18-Nov-2022 by wavemotion-dave
* SNES2Atari adaptor supported.
* Improved display output to smooth over the fonts a bit.
* Small tweaks to internal database to ensure everything looks as good as possible.

V4.4 : 14-Nov-2022 by wavemotion-dave
* New palette options from the Trebor 'Pro Pack' of colors. COOL, WARM (default), and HOT allow you to shift the color temperature slightly on a per-game basis.
Expand Down
Binary file modified arm9/gfx/pdev_bg0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 19 additions & 25 deletions arm9/source/a7800utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ void FadeToColor(unsigned char ucSens, unsigned short ucBG, unsigned char ucScr,

ITCM_CODE void vblankIntr()
{
static uint xx=0;

if (bRefreshXY)
{
cxBG = (myCartInfo.xOffset << 8);
Expand All @@ -170,8 +168,8 @@ ITCM_CODE void vblankIntr()

REG_BG2X = cxBG;
REG_BG2Y = cyBG;
REG_BG3X = cxBG;
REG_BG3Y = cyBG;
REG_BG3X = cxBG+myCartInfo.xJiggle;
REG_BG3Y = cyBG+myCartInfo.yJiggle;

REG_BG2PA = xdxBG;
REG_BG2PD = ydyBG;
Expand All @@ -180,16 +178,6 @@ ITCM_CODE void vblankIntr()

bRefreshXY = false;
}
if (xx++ & 1)
{
REG_BG2X = cxBG+0x48;
REG_BG2Y = cyBG+0x22;
}
else
{
REG_BG2X = cxBG+0x40;
REG_BG2Y = cyBG+0x44;
}
}

void dsInitScreenMain(void)
Expand All @@ -201,7 +189,7 @@ void dsInitScreenMain(void)
if (isDSiMode()) isDS_LITE = false;
else isDS_LITE = true;

vramSetBankB(VRAM_B_LCD ); // Not using this for video but 16K of faster RAM always useful! Mapped at 0x06820000 - ..
vramSetBankB(VRAM_B_LCD ); // Not using this for video but 128K of faster RAM always useful! Mapped at 0x06820000 - 64K used for the is_memory_writable[] check and 64K for extra RAM
vramSetBankD(VRAM_D_LCD ); // Not using this for video but 128K of faster RAM always useful! Mapped at 0x06860000 - Used for Cart Bankswitch
vramSetBankE(VRAM_E_LCD ); // Not using this for video but 64K of faster RAM always useful! Mapped at 0x06880000 - Used for Cart Bankswitch
vramSetBankF(VRAM_F_LCD ); // Not using this for video but 16K of faster RAM always useful! Mapped at 0x06890000 - ..
Expand All @@ -221,7 +209,7 @@ void dsShowScreenEmu(void)
// Change vram
videoSetMode(MODE_5_2D | DISPLAY_BG2_ACTIVE | DISPLAY_BG3_ACTIVE);
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
vramSetBankB(VRAM_B_LCD ); // Not using this for video but 16K of faster RAM always useful! Mapped at 0x06820000 - ..
vramSetBankB(VRAM_B_LCD ); // Not using this for video but 128K of faster RAM always useful! Mapped at 0x06820000 - 64K used for the is_memory_writable[] check and 64K for extra RAM
vramSetBankD(VRAM_D_LCD ); // Not using this for video but 128K of faster RAM always useful! Mapped at 0x06860000 - Used for Cart Bankswitch
vramSetBankE(VRAM_E_LCD ); // Not using this for video but 64K of faster RAM always useful! Mapped at 0x06880000 - Used for Cart Bankswitch
vramSetBankF(VRAM_F_LCD ); // Not using this for video but 16K of faster RAM always useful! Mapped at 0x06890000 - ..
Expand All @@ -231,6 +219,9 @@ void dsShowScreenEmu(void)
bg0 = bgInit(3, BgType_Bmp8, BgSize_B8_512x512, 0,0);
bg1 = bgInit(2, BgType_Bmp8, BgSize_B8_512x512, 0,0);

REG_BLDCNT = BLEND_ALPHA | BLEND_SRC_BG2 | BLEND_DST_BG3;
REG_BLDALPHA = (8 << 8) | 8; // 50% / 50%

// Setup video scaling...
bufVideo = BG_GFX;
cxBG = (myCartInfo.xOffset << 8);
Expand All @@ -243,8 +234,8 @@ void dsShowScreenEmu(void)
REG_BG3PB = 0;
REG_BG3PC = 0;

REG_BG2X = cxBG;
REG_BG2Y = cyBG;
REG_BG2X = cxBG+myCartInfo.xJiggle;
REG_BG2Y = cyBG+myCartInfo.yJiggle;
REG_BG3X = cxBG;
REG_BG3Y = cyBG;

Expand Down Expand Up @@ -432,7 +423,7 @@ bool dsWaitOnQuit(void) {
return bRet;
}

void _putchar(char character) {};
void _putchar(char character) {}; // Not used but needed to link printf()

void dsDisplayFiles(unsigned int NoDebGame,u32 ucSel)
{
Expand Down Expand Up @@ -651,7 +642,7 @@ unsigned int dsWaitForRom(void)
unsigned int dsWaitOnMenu(unsigned int actState) {
unsigned int uState=A7800_PLAYINIT;
bool bDone=false, romSel;
int iTx,iTy;
short iTx,iTy;

while (bDone==false)
{
Expand Down Expand Up @@ -923,11 +914,14 @@ ITCM_CODE void dsMainLoop(void)
special_hsc_entry=70;
}
else if ((iTx>115) && (iTx<144) && (iTy>154) && (iTy<171)) { // Snap HSC Sram
dsPrintValue(13,0,0, "SAVING");
mmEffect(SFX_KEYCLICK); // Play short key click for feedback...
WAITVBL;WAITVBL;
cartridge_SaveHighScoreSram();
dsPrintValue(13,0,0, " ");
if (high_score_cart_loaded)
{
dsPrintValue(13,0,0, "SAVING");
mmEffect(SFX_KEYCLICK); // Play short key click for feedback...
WAITVBL;WAITVBL;
cartridge_SaveHighScoreSram();
dsPrintValue(13,0,0, " ");
}
dampen=60;
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions arm9/source/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ const struct options_t Game_Option_Table[] =
{"Y OFFSET", 2, {"-50", "+50"}, (u8*)&myCartInfo.yOffset, 2},
{"X SCALE", 2, {"+200", "+320"}, (u8*)&myCartInfo.xScale, 2},
{"Y SCALE", 2, {"+180", "+256"}, (u8*)&myCartInfo.yScale, 2},
{"X JIGGLE", 1, {"+1", "+256"}, (u8*)&myCartInfo.xJiggle, 2},
{"Y JIGGLE", 1, {"+1", "+256"}, (u8*)&myCartInfo.yJiggle, 2},



{NULL, 0, {"", ""}, NULL, 1},
};
Expand Down
4 changes: 2 additions & 2 deletions arm9/source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
// ---------------------------
// Config handling...
// ---------------------------
#define CONFIG_VER 0x0007
#define CONFIG_VER 0x0009

#define MAX_CONFIGS 700
#define MAX_CONFIGS 680

struct AllConfig_t
{
Expand Down
25 changes: 15 additions & 10 deletions arm9/source/emu/Database.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ Database_Entry game_list[] = {
{"a65f79ad4a0bbdecd59d5f7eb3623fd7", "Asteroids Deluxe (NTSC)", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 17, 256, 230, 0}, // title=Asteroids Deluxe
{"07342c78619ba6ffcc61c10e907e3b50", "Asteroids", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 17, 256, 230, 0}, // title=Asteroids
{"3d38281ed8a8d8c7cd457a18c92c8604", "Astro Blaster", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_B, DIFF_B, NTSC, HSC_YES, 0, 30, 9, 320, 210, 0}, // title=Astro Blaster
{"a51e5df28a0fe8c52e9d28fb5f8e44a6", "Astro Fighter", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 32, 9, 320, 210, 0}, // title=Astro Fighter
{"a51e5df28a0fe8c52e9d28fb5f8e44a6", "Astro Fighter", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 32, 9, 320, 213, 0}, // title=Astro Fighter
{"22e9fd9233348a572d49d80186af5d7f", "Petscii Robots", CT_BANKSHALT,POKEY_AT_800,SNES,JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 10, 256, 214, 0}, // title=Attack of the Petscii Robots (full)
{"7cdfbe37634e7dcd4dc67db7edbcd3ba", "Baby Pac-Man", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 32, 12, 320, 221, 0}, // title=Baby Pac Man
{"7cdfbe37634e7dcd4dc67db7edbcd3ba", "Baby Pac-Man", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 32, 12, 320, 222, 0}, // title=Baby Pac Man
{"8fc3a695eaea3984912d98ed4a543376", "Ballblazer", CT_NORMAL, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 6, 12, 262, 220, 0}, // title=Ballblazer
{"42682415906c21c6af80e4198403ffda", "Barnyard Blaster", CT_SUPCAR, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=Barnyard Blaster
{"f5f6b69c5eb4b55fc163158d1a6b423e", "Basketbrawl", CT_SUPROM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 1}, // title=Basketbrawl
{"78b1061d651ef806becac1dd3fda29a0", "Beef Drop", CT_NORMAL, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 8, 256, 220, 0}, // title=Beef Drop (Final Atariage)
{"34483432b92f565f4ced82a141119164", "Bentley Bear", CT_SUPLRG, POKEY_AT_450, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 3, 14, 256, 220, 0}, // title=Bentley Bear's Crystal Quest
{"4e325918a8b3bbcf2f9405040abcfc6d", "Older b*nQ", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, -3, 0, 18, 256, 220, 0}, // title=BonQ (found on Atairage Age site)
{"9fa7743a016c9b7015ee1d386326f88e", "b*nQ", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, -3, 0, 18, 256, 220, 0}, // title=BonQ (final Atariage)
{"4e325918a8b3bbcf2f9405040abcfc6d", "Older b*nQ", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, -3, 0, 18, 256, 223, 0}, // title=BonQ (found on Atairage Age site)
{"9fa7743a016c9b7015ee1d386326f88e", "b*nQ", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, -3, 0, 18, 256, 223, 0}, // title=BonQ (final Atariage)
{"4a8a22cff154f479f1ddaa386f21fc39", "Boom", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 7, 256, 220, 0}, // title=Boom!
{"000b5888d2489f7e256d80a0848ecd14", "Cannon in D for Defense", CT_SUPLRG, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 223, 0}, // title=Cannon in D for Defense (demo 03)
{"5a09946e57dbe30408a8f253a28d07db", "Centipede", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 24, 16, 300, 230, 0}, // title=Centipede
{"20660b667df538ec32a8e1b998438604", "Frameless Centipede", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 24, 16, 300, 230, 0}, // title=Centipede - Frameless Hack
{"a4b5d742860beb25c29def4530194c1e", "Chase", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 8, 19, 269, 233, 0}, // title=Chase
{"93e4387864b014c155d7c17877990d1e", "Choplifter", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=Choplifter
{"2e8e28f6ad8b9b9267d518d880c73ebb", "Commando", CT_SUPCAR, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 20, 0, 12, 256, 220, 1}, // title=Commando
{"2e8e28f6ad8b9b9267d518d880c73ebb", "Commando", CT_SUPCAR, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 20, 0, 12, 256, 218, 1}, // title=Commando
{"db691469128d9a4217ec7e315930b646", "Crack'ed", CT_SUPCAR, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 18, 256, 229, 0}, // title=Crack'ed
{"299d31c8e181fdd011df2014451bdf0f", "Crazy Brix", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 5, 256, 203, 0}, // title=Crazy Brix
{"2d2fe4da9f1bae102fa8ca2d8830a626", "Crazy Otto", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 9, 256, 232, 0}, // title=Crazy Otto
Expand All @@ -75,8 +75,6 @@ Database_Entry game_list[] = {
{"a9f29004412621f20ad9f5c51cc11486", "Draker Quest II", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 16, 256, 230, 0}, // title=Draker Quest II
{"fab1290f9a4c4f2b4d831c8a57f969f5", "Draker Quest", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 17, 256, 230, 0}, // title=Draker Quest
{"b3143adbbb7d7d189e918e5b29d55a72", "Dungeon Stalker", CT_NORMAL, POKEY_AT_450, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 15, 256, 220, 0}, // title=Dungeon Stalker (homebrew)
{"7099cc31cbc492d525d218efe88b8685", "xxxxx", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 17, 256, 230, 0}, // title=E.X.O. (Alpha)
{"faea27017447dd8bae677d91125a8135", "xxxxx", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 17, 256, 230, 0}, // title=E.X.O. (Beta)
{"a44e8b7b7881beb0fe3c71a1a04441c8", "EXO", CT_SUPRAM, POKEY_AT_450, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 16, 256, 234, 0}, // title=E.X.O. (RC Demo)
{"2251a6a0f3aec84cc0aff66fc9fa91e8", "F-18 Hornet", CT_ABSOLU, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=F-18 Hornet
{"6287727ab36391a62f728bbdee88675c", "Failsafe", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 14, 257, 220, 0}, // title=Failsafe (homebrew)
Expand All @@ -88,7 +86,7 @@ Database_Entry game_list[] = {
{"6053233cb59c0b4ca633623fd76c4576", "Froggie", CT_NORMAL, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 34, 8, 320, 205, 0}, // title=Froggie (homebrew)
{"4b8f22fc4b022a7ea1b4148195b85d4a", "Frogus", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 16, 256, 224, 0}, // title=Frogus
{"fb8d803b328b2e442548f7799cfa9a4a", "Galaga", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 0, 12, 256, 229, 0}, // title=Galaga
{"2f4ae1015a345652b36004a8c62a4ac6", "Galaxian", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 14, 5, 282, 200, 0}, // title=Galaxian
{"2f4ae1015a345652b36004a8c62a4ac6", "Galaxian", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 14, 5, 282, 211, 0}, // title=Galaxian
{"06204dadc975be5e5e37e7cc66f984cf", "Gato", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=Gato
{"e443f7fb5be3283dd44c0f5d80c3a7b3", "GoSub", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 13, 12, 280, 234, 0}, // title=GoSub
{"1e21bf1d9d7b3c0cebaac576964c9eb2", "Graze Suit Alpha", CT_SUPCAR, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 11, 256, 220, 1}, // title=Graze Suit Alpha
Expand Down Expand Up @@ -172,7 +170,7 @@ Database_Entry game_list[] = {
{"c3903ab01a51222a52197dbfe6538ecf", "Tomcat F-14 Simulator", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=Tomcat F-14 Simulator
{"208ef955fa90a29815eb097bce89bace", "Touchdown Football", CT_SUPROM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 12, 256, 220, 0}, // title=Touchdown Football
{"8d64763db3100aadc552db5e6868506a", "Tower Toppler", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 8, 256, 230, 0}, // title=Tower Toppler
{"79df20ee86a989e669158bcb9d113e8a", "UniWarS", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 9, 5, 282, 200, 0}, // title=UniWarS
{"79df20ee86a989e669158bcb9d113e8a", "UniWarS", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_YES, 0, 9, 5, 282, 202, 0}, // title=UniWarS
{"acf63758ecf3f3dd03e9d654ae6b69b7", "Water Ski", CT_SUPCAR, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 3, 256, 197, 0}, // title=Water Ski
{"427cb05d0a1abb068998e2760d77f4fb", "Water Ski", CT_SUPCAR, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 3, 256, 197, 0}, // title=Water Ski
{"3799d72f78dda2ee87b0ef8bf7b91186", "Winter Games", CT_SUPRAM, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, HSC_NO, 0, 0, 13, 256, 220, 0}, // title=Winter Games
Expand Down Expand Up @@ -224,6 +222,8 @@ bool database_Load(byte *digest)
memcpy(&myCartInfo, &game_list[i], sizeof(myCartInfo));
if (!isDSiMode()) myCartInfo.frameSkip = FRAMESKIP_AGGRESSIVE; // DS-Lite defaults to frame skipping no matter what the DB says... user can override
myCartInfo.palette = 1; // Force this if not specifically found by md5
myCartInfo.xJiggle = 64;
myCartInfo.yJiggle = 16;
bFound = true;
break;
}
Expand All @@ -248,6 +248,8 @@ bool database_Load(byte *digest)
strcpy(myCartInfo.digest, (char *)digest);
if (!isDSiMode()) myCartInfo.frameSkip = FRAMESKIP_AGGRESSIVE; // DS-Lite defaults to frame skipping no matter what the DB says... user can override
myCartInfo.palette = 1; // Force this if not specifically found by md5
myCartInfo.xJiggle = 64;
myCartInfo.yJiggle = 16;
bFound = true;
break;
}
Expand All @@ -273,9 +275,12 @@ bool database_Load(byte *digest)
myCartInfo.spare1 = 0;
myCartInfo.spare2 = 0;
myCartInfo.spare3 = 0;
myCartInfo.spare4 = 1;
myCartInfo.spare5 = 0;
myCartInfo.palette = 1;
myCartInfo.spare16 = 0x0000;
myCartInfo.dma_adjust = 0;
myCartInfo.xJiggle = 64;
myCartInfo.yJiggle = 16;

// -------------------------------------------------------------------
// If the game has no .a78 header, do our best to guess these...
Expand Down
8 changes: 6 additions & 2 deletions arm9/source/emu/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,15 @@ typedef struct {
s16 yScale;
u8 frameSkip;
u8 hasHeader;
u8 palette;
u8 xJiggle;
u8 yJiggle;
u8 spare0;
u8 spare1;
u8 spare2;
u8 spare3;
u8 palette;
s16 spare16;
u8 spare4;
s16 spare5;
} Database_Entry;


Expand Down
3 changes: 2 additions & 1 deletion arm9/source/emu/HighScore.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@
#define HSC_CART_ROM_SIZE 4096 // The highscore.rom is exactly 4K in size and gets loaded at 7800 memory address 0x3000
#define HSC_TITLE_SIZE 33 // Includes 32 chars for title name and 1 char for size

static byte high_score_cart_loaded = false;
static u32 last_hs_chksum = 0xFFFFEEEF;
static byte high_score_sram[VIRTUAL_SRAM_BLOCKS][HS_SRAM_SIZE];
static byte high_score_rom[HSC_CART_ROM_SIZE];
static byte hs_virtual_slot = 0;

byte high_score_cart_loaded = false;

/*
* Saves the high score cartridge SRAM
*
Expand Down
2 changes: 2 additions & 0 deletions arm9/source/emu/HighScore.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ extern bool cartridge_LoadHighScoreCart(void);
extern bool cartridge_SaveHighScoreSram(void);
extern bool cartridge_SaveHighScoreSram(void);

extern byte high_score_cart_loaded;

#endif
Loading

0 comments on commit a6f3527

Please sign in to comment.