Skip to content

Commit

Permalink
Version 9.7 - see readme.md for details.
Browse files Browse the repository at this point in the history
  • Loading branch information
wavemotion-dave committed Apr 16, 2024
1 parent 822345c commit ec5ce71
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 23 deletions.
Binary file modified ColecoDS.nds
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include $(DEVKITARM)/ds_rules

export TARGET := ColecoDS
export TOPDIR := $(CURDIR)
export VERSION := 9.6f
export VERSION := 9.7

ICON := -b $(CURDIR)/logo.bmp "ColecoDS $(VERSION);wavemotion-dave;https://github.com/wavemotion-dave/ColecoDS"

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,12 @@ And then move the soundbank.h file to the arm9/sources directory

Versions :
-----------------------
V9.7: ??-???-2024 by wavemotion-dave
V9.7: 16-Apr-2024 by wavemotion-dave
* Fixed Colecovision RAM mirrors such that Boulderdash runs properly.
* The Heist now forces RAM to clear (all zeros) as it is known to be picky about contents of RAM on power up.
* Added the Wildcard and Print buttons on the virtual ADAM keyboard.
* Fix EEPROM sequential reads so Activision PCB games like Jewel Panic work correctly.
* Added the Wildcard and Print buttons on the virtual ADAM keyboard. All ADAM virtual keys should now be present.
* Added new configuration options to select the Colecovision mode to run in - you can force ADAM emulation, force PCB types, and set EEPROM sizes, etc.
* New global option to force ADAM mode, SGM can be Disabled, and BIOS auto-patch for 'Fast BIOS' to force the 15 second wait down to 3 seconds.
* Minor cleanup and optmizations to the Adam core.

Expand Down
Binary file modified arm9/gfx_data/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.
2 changes: 1 addition & 1 deletion arm9/source/colecoDS.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <string.h>
#include "C24XX.h"

#define VERSIONCLDS "9.6"
#define VERSIONCLDS "9.7"

extern u32 debug[0x10];

Expand Down
28 changes: 14 additions & 14 deletions arm9/source/colecogeneric.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ void SetDefaultGameConfig(void)
myConfig.gameSpeed = 0; // Default is 100% game speed
myConfig.keyMute = 0; // Default is no mute (key click heard)
myConfig.ein_ctc3 = 0; // Default is normal CTC3 handling for Einstein (no fudge factor)
myConfig.cvCartType = 0; // Default is normal detect of Coleco Cart
myConfig.cvMode = CV_MODE_NORMAL; // Default is normal detect of Coleco Cart with possible SGM
myConfig.reserved2 = 0;
myConfig.reserved3 = 0;
myConfig.reserved4 = 0;
Expand Down Expand Up @@ -1401,8 +1401,8 @@ void SetDefaultGameConfig(void)
// --------------------------------------------------------------------------
// There are a few games that don't want the SGM or ADAM... Check those now.
// --------------------------------------------------------------------------
if (file_crc == 0xef25af90) myConfig.cvCartType = 2; // Super DK Prototype - ignore any SGM/Adam Writes (this disables SGM)
if (file_crc == 0xc2e7f0e0) myConfig.cvCartType = 2; // Super DK JR Prototype - ignore any SGM/Adam Writes (this disables SGM)
if (file_crc == 0xef25af90) myConfig.cvMode = CV_MODE_NOSGM; // Super DK Prototype - ignore any SGM/Adam Writes (this disables SGM)
if (file_crc == 0xc2e7f0e0) myConfig.cvMode = CV_MODE_NOSGM; // Super DK JR Prototype - ignore any SGM/Adam Writes (this disables SGM)

if (file_crc == 0x987491ce) myConfig.memWipe = 1; // The Heist for Colecovision is touchy about RAM (known issue with game) so force clear

Expand Down Expand Up @@ -1579,34 +1579,34 @@ void SetDefaultGameConfig(void)
// -------------------------------------------------------------------
if (file_crc == 0xdddd1396)
{
myConfig.cvCartType = 3; // Black Onyx is Activision PCB
myConfig.cvMode = CV_MODE_ACTCART; // Black Onyx is Activision PCB
myConfig.cvEESize = EEPROM_256B; // Black Onyx EEPROM is 256 bytes
}

if (file_crc == 0x62dacf07)
{
myConfig.cvCartType = 3; // Boxxle is Activision PCB
myConfig.cvMode = CV_MODE_ACTCART; // Boxxle is Activision PCB
myConfig.cvEESize = EEPROM_32KB; // Boxxle EEPROM is 32K bytes
}

if (file_crc == 0x9f74b0e9)
{
myConfig.cvCartType = 3; // Jewel Panic is Activision PCB
myConfig.cvMode = CV_MODE_ACTCART; // Jewel Panic is Activision PCB
myConfig.cvEESize = EEPROM_256B; // Jewel Panic EEPROM is 256 bytes
}

// Acromage is also an Activision PCB and is thought to be 256 bytes of EE

if (file_crc == 0x30d337e4)
{
myConfig.cvCartType = 4; // Gradius Arcade - Super Game Cart
myConfig.cvEESize = EEPROM_1KB; // Gradius Arcade - 1K of EEPROM
myConfig.cvMode = CV_MODE_SUPERCART; // Gradius Arcade - Super Game Cart
myConfig.cvEESize = EEPROM_1KB; // Gradius Arcade - 1K of EEPROM
}

if (file_crc == 0x6831ad48)
{
myConfig.cvCartType = 4; // Penguin Adventure - Super Game Cart
myConfig.cvEESize = EEPROM_NONE; // No EEPROM
myConfig.cvMode = CV_MODE_SUPERCART; // Penguin Adventure - Super Game Cart
myConfig.cvEESize = EEPROM_NONE; // No EEPROM
}


Expand Down Expand Up @@ -1643,8 +1643,8 @@ void LoadConfig(void)
{
for (u16 slot=0; slot<MAX_CONFIGS; slot++)
{
AllConfigs[slot].cvCartType = 0;
AllConfigs[slot].cvEESize = EEPROM_NONE;
AllConfigs[slot].cvMode = CV_MODE_NORMAL;
AllConfigs[slot].cvEESize = EEPROM_NONE;
}
myGlobalConfig.config_ver = CONFIG_VER;
SaveConfig(FALSE);
Expand Down Expand Up @@ -1723,7 +1723,7 @@ const struct options_t Option_Table[3][20] =
{"MSX BIOS", {"C-BIOS 64K", msx_rom_str, "CX5M.ROM 32K", "HX-10.ROM 64K", "HB-10.ROM 16K", "FS1300.ROM 64K", "PV-7 8K"} , &myConfig.msxBios, 7},
{"RAM WIPE", {"RANDOM", "CLEAR"}, &myConfig.memWipe, 2},
{"COLECO RAM", {"NO MIRROR", "MIRRORED"}, &myConfig.mirrorRAM, 2},
{"COLECO CART", {"DEFAULT","FORCE ADAM","SGM DISABLE","ACTIVISION PCB","SUPERCART"}, &myConfig.cvCartType, 5},
{"COLECO MODE", {"NORMAL","FORCE ADAM","SGM DISABLE","ACTIVISION PCB","SUPERCART"}, &myConfig.cvMode, 5},
{"COLECO NVRAM", {"128B", "256B", "512B", "1KB", "2KB", "4KB", "8KB", "16KB", "32KB", "NONE"}, &myConfig.cvEESize, 10},
{NULL, {"", ""}, NULL, 1},
},
Expand Down Expand Up @@ -2317,7 +2317,7 @@ void ReadFileCRCAndConfig(void)
// ------------------------------------------------------------------------
// And if the cart type is specifically set to ADAM, force that driver in.
// ------------------------------------------------------------------------
if (myConfig.cvCartType == 1) adam_mode = 3;
if (myConfig.cvMode == CV_MODE_ADAM) adam_mode = 3;
}

// --------------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion arm9/source/colecogeneric.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
#define COLECO_RAM_NO_MIRROR 0
#define COLECO_RAM_NORMAL_MIRROR 1

#define CV_MODE_NORMAL 0
#define CV_MODE_ADAM 1
#define CV_MODE_NOSGM 2
#define CV_MODE_ACTCART 3
#define CV_MODE_SUPERCART 4

typedef struct {
char szName[MAX_ROM_LENGTH+1];
u8 uType;
Expand Down Expand Up @@ -84,7 +90,7 @@ struct __attribute__((__packed__)) Config_t
u8 gameSpeed;
u8 keyMute;
u8 ein_ctc3;
u8 cvCartType;
u8 cvMode;
u8 reserved2;
u8 reserved3;
u8 reserved4;
Expand Down
8 changes: 4 additions & 4 deletions arm9/source/colecomngt.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,14 +714,14 @@ u8 loadrom(const char *filename, u8 * ptr)
// --------------------------------------------------------------
bMagicMegaCart = ((ROM_Memory[0xC000] == 0x55 && ROM_Memory[0xC001] == 0xAA) ? 1:0);
last_mega_bank = 199; // Force load of the first bank when asked to bankswitch
if ((myConfig.cvCartType == 3) || ((romSize == (64 * 1024)) && !bMagicMegaCart)) // Some 64K carts are in the 'Activision PCB' style with EEPROM
if ((myConfig.cvMode == CV_MODE_ACTCART) || ((romSize == (64 * 1024)) && !bMagicMegaCart)) // Some 64K carts are in the 'Activision PCB' style with EEPROM
{
bActivisionPCB = 1;
memcpy(ptr, ROM_Memory, 0x4000); // bank 0
memcpy(ptr+0x4000, ROM_Memory+0x4000, 0x4000); // bank 1
romBankMask = 0x03;
}
else if (myConfig.cvCartType >= 4) // These are the Super Game Cart types... of varying EE sizes
else if (myConfig.cvMode == CV_MODE_SUPERCART) // These are the Super Game Cart types... of varying EE sizes
{
bSuperGameCart = 1;
memcpy(ptr, ROM_Memory, 0x2000);
Expand Down Expand Up @@ -775,8 +775,8 @@ u8 loadrom(const char *filename, u8 * ptr)
// --------------------------------------------------------------------------
__attribute__ ((noinline)) void SetupSGM(void)
{
if (adam_mode) return; // ADAM has it's own setup handler
if (myConfig.cvCartType == 2) return; // There are a couple of games were we don't want to enable the SGM. Most notably Super DK won't play with SGM emulation.
if (adam_mode) return; // ADAM has it's own setup handler
if (myConfig.cvMode == CV_MODE_NOSGM) return; // There are a couple of games were we don't want to enable the SGM. Most notably Super DK won't play with SGM emulation.

sgm_enable = (Port53 & 0x01) ? true:false; // Port 53 lowest bit dictates SGM memory support enable.

Expand Down

0 comments on commit ec5ce71

Please sign in to comment.