mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-14 08:55:06 +01:00
V4.5 Fix VRC4e carts (Mapper 23)
The code change only affects readCHR(). It shortens the check to a single byte but that is enough to identify the four VRC4e carts. The original list of VRC4e carts that I referenced only showed Boku Dracula-kun and Tiny Toon Adventures. I found out that all four of the Mapper 23 VRC4 carts use the VRC4e submapper. Mapper 23 includes VRC4f but there are no known examples (BTW, VRC4f = VRC2b).
This commit is contained in:
parent
a8df8d215b
commit
f9ca4f9108
@ -2,8 +2,8 @@
|
|||||||
Cartridge Reader for Arduino Mega2560
|
Cartridge Reader for Arduino Mega2560
|
||||||
|
|
||||||
Author: sanni
|
Author: sanni
|
||||||
Date: 21.12.2019
|
Date: 03.03.2020
|
||||||
Version: 4.4
|
Version: 4.5
|
||||||
|
|
||||||
SD lib: https://github.com/greiman/SdFat
|
SD lib: https://github.com/greiman/SdFat
|
||||||
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
LCD lib: https://github.com/adafruit/Adafruit_SSD1306
|
||||||
@ -38,12 +38,12 @@
|
|||||||
rama - code speedup & improvements
|
rama - code speedup & improvements
|
||||||
Gens-gs - Megadrive checksum
|
Gens-gs - Megadrive checksum
|
||||||
Modman - N64 checksum comparison fix
|
Modman - N64 checksum comparison fix
|
||||||
splash5 - EMS GB Smart cart support
|
splash5 - EMS GB Smart cart support, Wonderswan module
|
||||||
|
|
||||||
**********************************************************************************/
|
**********************************************************************************/
|
||||||
#include <SdFat.h>
|
#include <SdFat.h>
|
||||||
|
|
||||||
char ver[5] = "4.4";
|
char ver[5] = "4.5";
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
Options
|
Options
|
||||||
|
@ -2101,17 +2101,17 @@ void readCHR() {
|
|||||||
case 23: // 128K
|
case 23: // 128K
|
||||||
// Detect VRC4e Carts - read PRG 0x1FFF6 (DATE)
|
// Detect VRC4e Carts - read PRG 0x1FFF6 (DATE)
|
||||||
// Boku Dracula-kun = 890810, Tiny Toon = 910809
|
// Boku Dracula-kun = 890810, Tiny Toon = 910809
|
||||||
|
// Crisis Force = 910701, Parodius Da! = 900916
|
||||||
write_prg_byte(0x8000, 15);
|
write_prg_byte(0x8000, 15);
|
||||||
prgchk0 = read_prg_byte(0x9FF6);
|
prgchk0 = read_prg_byte(0x9FF6);
|
||||||
prgchk1 = read_prg_byte(0x9FF7);
|
if (prgchk0 == 0x30) { // Check for "0" in middle of date
|
||||||
if ((prgchk0 == 0x30) && (prgchk1 == 0x38)) { // Check for "08" in middle of date
|
|
||||||
vrc4e = true; // VRC4e Cart
|
vrc4e = true; // VRC4e Cart
|
||||||
}
|
}
|
||||||
banks = int_pow(2, chrsize) * 4;
|
banks = int_pow(2, chrsize) * 4;
|
||||||
for (int i = 0; i < banks; i++) {
|
for (int i = 0; i < banks; i++) {
|
||||||
write_prg_byte(0xB000, i & 0xF); // CHR Bank Lower 4 bits
|
write_prg_byte(0xB000, i & 0xF); // CHR Bank Lower 4 bits
|
||||||
if (vrc4e == true)
|
if (vrc4e == true)
|
||||||
write_prg_byte(0xB004, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC4e (Boku Dracula-kun/Tiny Toon)
|
write_prg_byte(0xB004, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC4e
|
||||||
else
|
else
|
||||||
write_prg_byte(0xB001, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC2b/VRC4f
|
write_prg_byte(0xB001, (i >> 4) & 0xF); // CHR Bank Upper 4 bits VRC2b/VRC4f
|
||||||
for (word address = 0x0; address < 0x400; address += 512) {
|
for (word address = 0x0; address < 0x400; address += 512) {
|
||||||
|
Loading…
Reference in New Issue
Block a user