Skip to content

Commit 83d4ee6

Browse files
committed
PCE: Fixed Legend of Hero Tonma, use internal CRC function
1 parent 0f8d163 commit 83d4ee6

File tree

6 files changed

+50
-789
lines changed

6 files changed

+50
-789
lines changed

huexpress-go/components/huexpress/engine/crc_ctl.c

Lines changed: 0 additions & 258 deletions
This file was deleted.

huexpress-go/components/huexpress/engine/hard_pce.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,13 +692,13 @@ IO_write(uint16 A, uchar V)
692692
return;
693693

694694
case 0x1F00: /* Street Fighter 2 Mapper */
695-
if (ROMSIZE < 0xC0) {
695+
if (ROM_SIZE < 0xC0) {
696696
// We can't rely on CRC because rom hacks and homebews using the SF2 mapper exist
697697
break;
698698
}
699699
if (SF2 != (A & 3)) {
700700
SF2 = A & 3;
701-
uchar *base = ROM + SF2 * (512 * 1024);
701+
uchar *base = ROM_PTR + SF2 * (512 * 1024);
702702
for (int i = 0x40; i < 0x80; i++)
703703
{
704704
MemoryMapR[i] = base + i * 0x2000;

huexpress-go/components/huexpress/engine/hard_pce.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ typedef struct {
113113
uint16 SPRAM[64 * 4];
114114

115115
// ROM memory
116-
uchar *ROM;
116+
uchar *ROM, *ROM_PTR;
117117

118118
// ROM size in 0x2000 blocks
119-
uint16 ROMSIZE;
119+
uint16 ROM_SIZE;
120120

121121
// PCE->PC Palette convetion array
122122
// Each of the 512 available PCE colors (333 RGB -> 512 colors)
@@ -187,7 +187,8 @@ extern uchar *MemoryMapW[256];
187187
#define SPRAM PCE.SPRAM
188188
#define VRAM PCE.VRAM
189189
#define ROM PCE.ROM
190-
#define ROMSIZE PCE.ROMSIZE
190+
#define ROM_PTR PCE.ROM_PTR
191+
#define ROM_SIZE PCE.ROM_SIZE
191192
#define Scanline PCE.Scanline
192193
#define Palette PCE.Palette
193194
#define Cycles PCE.Cycles

0 commit comments

Comments
 (0)