Commit Graph

86 Commits

Author SHA1 Message Date
negativeExponent
75872dab63 Remove CopyFami stuff
unused in this implementation, not any other emu uses it. considering
its even UNIF based, probably has no use anymore.
2022-06-09 14:10:43 +08:00
NewRisingSun
a13e82d631 Mapper 258: Is actually a duplicate of 215 that uses different features. Correct a few mapper 114, 215 and 258 iNES correction database entries. 2022-04-01 13:06:58 +02:00
Autechre
d8d59c9b85 Merge pull request #502 from negativeExponent/mappers
Mappers
2022-02-26 22:37:58 +01:00
NewRisingSun
53bca8e9bf Rewrite mapper 134 emulation for simplicity. Fix WRAM-using games. Remove leftover code from mmc3.c. Initialize the Frame IRQ register only on power-on reset, not soft-reset, which is necessary for two multicarts. 2022-02-19 12:53:26 +01:00
negativeExponent
560b3a7093 Add mapper 271 2022-02-18 21:05:50 +08:00
negativeExponent
ea0e198cf9 Update m285/BMC-A65AS 2022-02-18 19:45:05 +08:00
negativeExponent
bc8767ef26 Add mapper 396 2022-02-06 18:06:05 +08:00
negativeExponent
17ad461e7d mapper cleanups (#494)
* m215: Fix support for submapper 1 cart

* Switch UNL43272 to new Mapper242 implementation

* Merge mappers BMC-70in1/B and 236

* Merge 58/213/GK-192

* Assign GS-2004/GS-2014 to mapper 283

* Cleanup

Co-authored-by: negativeExponent <negativeExponent@users.noreply.github.com>
2022-02-05 19:19:33 +01:00
NRS-NewRisingSun
d72c64e5d9 Exponential notation of NES 2.0 ROM sizes; mappers (#480)
* Support 2 MIB mapper 314 (Y2K 76-in-1)

* Mapper 57: Forgot one Sync() statement

* Mapper 83: Correction for 256 KiB PRG+512 KiB CHR games

* Mapper 114: Use NES 2.0 submapper field if available to differentiate between scrambling patterns

* NES 2.0: Support exponential notation of PRG/CHR sizes, thus adding support for 4 KiB and 8 KiB ROM files.

* Add mapper 553.

* Correct the database regarding the Nanjing game Pegasus Senya

* Add submapper 5 (HST-162) to mapper 176

* Add mapper 436

* Mapper 176.5 has a CNROM latch as well, though it works a bit differently than submapper 1's

* Added mapper 429

* Added mapper 380 submapper 1

* Added mapper 437

* Added mapper 456

* Forgot to include math.h for pow

* Added mapper 434

* Added mapper 452

* Added mapper 438

* Added mappers 391 and 444, corrected the mixup with BS-110 and NC7000M

* Added mapper 443. Added menu-switching funcionality to mapper 444

Co-authored-by: NewRisingSun <8vytz1+dhp372pv94ebg@sharklasers.com>
2022-01-06 08:22:18 +01:00
NewRisingSun
97ffbc5f83 Rewrite mappers 162,163,164; add mapper 558. Add EEPROM support to 164. 2021-05-30 01:08:41 +02:00
NewRisingSun
5fc30e3d20 Add TF2740 to unif.c 2021-04-14 19:17:53 +02:00
NewRisingSun
cf476194ce Combine UNIF AB-G1L, WELL-NO-DG450 and TF2740 into NES 2.0 Mapper 428. 2021-04-14 19:16:57 +02:00
NewRisingSun
c06e25ed30 Rewrite and unify J.Y. ASIC emulation. Add multicart mappers. 2021-04-08 17:06:17 +02:00
NewRisingSun
82ce944aa3 Combine the very similar mappers 126/422/534/BS400/BS4040 into one common source code file. Rewrite for accuracy and compatibility with all known game dumps. Replace FUTURE KIDS hack with correct CNROM masking. 2021-01-31 15:51:09 +01:00
negativeExponent
ed01e34323 Add unif multicarts
- Add unif board BS400R
- Add unif board BS4040R
2020-11-09 20:12:54 +08:00
negativeExponent
71daae412e UNIF: Ensure that used memory are freed on errors
- removes "goto" jumps
- frees ROM and VROM if necessary
2020-10-23 10:24:12 +08:00
negativeExponent
c542204651 UNIF: Fix incorrect ines-mapper log and cleanup 2020-10-23 09:51:17 +08:00
negativeExponent
5538bbedd9 Update mapper 059/060
Excerpt from nesdev:

NESten's Mapper DLL v1.0 contained an incorrect implementation of T3H53 as iNES mapper 059 and UNIF mapper BMC-T3H53. The UNIF implementation was improved in NESten's Mapper DLL v1.2 while the iNES implementation was not, causing confusion about what kind of cartridge the unimproved mapper 59 was supposed to be. As Nintendulator's mapper DLL is based on NESten's mapper DLL, this was carried over to Nintendulator. Presumably as a result of this confusion, FCEUX and others put the correct implementation of T3H53 at INES Mapper 060, displacing the "Reset-based NROM-128 4-in-1" in the process.

With that said above, im following nesdev's notes and change the
following:

- Reassign Mapper 60 as Mapper 59.
- Add BMC-T3H53, a UNIF cart using the same UNIF-board D1038 which is
  assigned as iNES Mapper 59
- Add the Reset-Based NRON-128 mapper, Mapper 60
2020-10-22 05:49:41 +08:00
negativeExponent
99c0d8351f Fix warnings [-Wmissing-field-initializers] 2020-10-21 20:35:05 +08:00
negativeExponent
915c2be6a8 Fix unable to load some unif carts 2020-03-24 01:50:10 +08:00
negativeExponent
a1f7cf9d89 Merge unif board BMC-Super24in1SC03 to BMC-FK23C 2020-03-19 22:01:25 +08:00
negativeExponent
1788955a90 Unif: Show raw values for prg/chr rom size in logs 2020-03-17 20:19:33 +08:00
negativeExponent
e3c35c6eff unif.c: Align board map struct 2020-03-12 20:24:19 +08:00
negativeExponent
a69354c1c2 Add mapper 369 (BMC-N49C-300) 2020-03-07 01:55:59 +08:00
negativeExponent
80b002a04e Mapper42: Support for 256K prg rom fds conversion of Green Beret 2020-03-06 02:58:22 +08:00
negativeExponent
e9eb314311 Fix size inconsistency for prg and chr
- Unif shows ROM_size and VROM_size in bytes, while codebase expects these to be
in chunks of 16K for prg and 8K for chr. Update Unif to represent size as its
expected to be.

- Change PRGRomSize and CHRRomSize to represent sizes in bytes to make it consistent
with the rest of the size-related variables in struct CartInfo.
2020-03-06 02:57:16 +08:00
negativeExponent
fef34bda90 cnrom: Minor database cleanup
- use existing crc32 database for Bingo 75 (Asia) (Unl), this moves checksum check on mapper side instead of unif overrides.
- minor cleanup
2020-02-25 23:09:02 +08:00
negativeExponent
18701efb0f Silence warnings 2020-02-19 20:19:08 +08:00
negativeExponent
f9fb33d8e8 Silence warnings and fixes
- Silence warning [-Wmaybe-uninitialized]
- m359: Fix value overflow
- m534: Silence warnings
- mmc1: Silence warnings
- Silence more warnings
2020-02-17 10:30:42 +08:00
negativeExponent
ddb1fe786a Add UNIF BMC-WX-KB4K (m134) to supported boards 2020-02-17 09:32:29 +08:00
negativeExponent
86aad39c3d Buildfix 2020-02-17 09:32:29 +08:00
negativeExponent
6e7d5abaab Update implementation of some unlicensed mappers 2020-02-17 09:32:29 +08:00
negativeExponent
0b4b5421dc Add BMC-SB-5013 (m359) and UNL-82112C (m540) 2020-02-17 09:32:29 +08:00
negativeExponent
43ca4755bb Update mapper 150/243 (unif UNL-Sachen-74LS374N) 2020-02-17 09:26:01 +08:00
negativeExponent
a37314c4be Silence warnings 2020-02-16 23:14:49 +08:00
negativeExponent
d6143ef2ef Rename some cart info variables that indicates size (readability) 2020-02-16 22:15:25 +08:00
negativeExponent
bbce95d5aa Add prg and chr checksums and rearrange rom info logs 2020-02-16 21:54:21 +08:00
negativeExponent
85a15786ff Unif: Pass iNES mapper number to cart struct when available 2020-02-07 12:01:03 +08:00
negativeExponent
65ff96cd5c Add mapper 294 (m134) 2020-01-31 00:13:09 +08:00
negativeExponent
e1e48294f0 Remove unused variables 2020-01-27 21:40:13 +08:00
negativeExponent
b56fd973e3 Sanitize UNIF boardnames
- removes whitespaces on boardnames - as stated, some names can have whitespaces
- ignore character case when comparing - similar to above, boardnames can also be
  uppercase or lowercase in some.
2020-01-26 07:41:44 +08:00
negativeExponent
305d7a048d Add new mappers
Added iNES 1.0/2.0 mappers
134 - replaced Mapper134_init with Bs5652_Init
391 - NC7000M
402 - 831019C J-2282

Added UNIF boards:
AB-G1L
BS-110
WELL-NO-DG450
KG256
2020-01-23 08:29:09 +08:00
negativeExponent
9abfd80669 Update unif SUPER24IN1SC03 (179 variant) 2020-01-23 08:07:01 +08:00
retro-wertz
ec19b07b4d Mapper 226: Updated and remove duplicate mapper
- Updated mapper 226 to support 1.5mb carts, which in turn makes Unif Ghostbusters63n1 a duplicate.
- Unif 42in1ResetSwitch switch to mapper 233
2019-07-12 23:35:11 +08:00
retro-wertz
429f6c4545 UNIF: Update boards based on last commit
- fixes (if necessary), update and cleanup the following boards that now dont need alternate mappings:
- this is part of migrating unif to be usuable in ines mappers
- boards affected in this commit are:
  SUPERVISION16IN1, GS-2004, GS-2013, UNL-SMB2J, MARIO1-MALEE2, UNL-SA-9602B, UNL-KS106C / RESETNROM-XIN1
  UNL-AC08, NES-NTBROM, BMC-K-3033, BMC-GN-26, BMC-GHOSTBUSTERS63IN1, BMC-830425C-4391T
  BMC-830134C, BMC-891227 / BMC-CTC-12IN1, BMC-JC-016-2, UNL-T4A54A, UNL-8157, BMC-T-262
  (might have forgotten to list some...)
2019-07-11 16:34:39 +08:00
retro-wertz
2a7bd37276 UNIF: Change how roms are loaded in multiple prg/chr file versions
- Part of migrating UNIF to NES 2.0 conversion, which should make
  each unif roms to be compatible with each other. Some roms have
  separate prg and chr banks, which mapper has to do separate banking
  for such file versions.
- This change would  also make the boards to be easily usuable iNes/Nes 2.0.
2019-07-10 11:11:01 +08:00
retro-wertz
8f19234f55 Start assigning NES 2.0 mapper numbers to UNIF boards (256+ boards) 2019-07-09 09:07:23 +08:00
retro-wertz
51199e59d7 NES 2.0: Add preliminary support for iNES 2.0 format
Currently reads and sets the following:
- mapper number up to 4095, prg rom size, chr rom size
- chr ram (volatile + non-volatile), region (ntsc, pal, dendy or multi-region)

todo: submapper handling, w-ram and prg nvram at least...
2019-07-08 09:25:00 +08:00
retro-wertz
7e9b3b146d UNIF: Initial implementation of game overrides (move exiting ones out of mapper code) 2019-07-02 19:34:55 +08:00
retro-wertz
634eb688c1 UNIF: Fix potential crash when accessing non-existing rom banks
- As stated, prevent a potential crash on some certain roms using split rom banks. This is done by counting the number of prg/chr banks loaded and using this as limit count during mapper bank switching.
- Update related boards.
2019-06-29 17:11:49 +08:00