Previous 199869 Revisions Next

r22605 Monday 29th April, 2013 at 09:58:35 UTC by Fabio Priuli
(MESS) nes: improved UNL-09-034A emulation and added some notes about
our slot implementation, to help possible external contributors to get the basics. nw.
[hash]nes.xml
[src/mess/machine]nes_bootleg.c nes_slot.c

trunk/src/mess/machine/nes_bootleg.c
r22604r22605
11091109 (UNL-)09-034A
11101110 
11111111 Games: Zanac FDS conversion with two PRG chips and
1112 no CHRROM (apparently also a Volleyball FDS conversion
1113 but the ones we have do not seem to be on this hw
1112 no CHRROM and Volleyball FDS conversion with two PRG
1113 chips and CHRROM.
11141114 Originally dumps were marked as UNL-SMB2J pcb
1115
11161115 
11171116 iNES:
11181117 
1119 In MESS: Supported (for Zanac)
1118 In MESS: Supported.
11201119 
11211120 -------------------------------------------------*/
11221121
r22604r22605
11251124   LOG_MMC(("09-034a write_ex, offset: %04x, data: %02x\n", offset, data));
11261125   
11271126   if (offset == 7)   // $4027
1128   {
11291127      m_reg = data & 1;
1130      if (m_chr_source == CHRRAM)      // zanac has no CHRROM and is wired differently so to access the second PRG chip
1131         m_reg += 4;
1132   }
11331128}
11341129
11351130READ8_MEMBER(nes_09034a_device::read_m)
11361131{
11371132   LOG_MMC(("09-034a read_m, offset: %04x\n", offset));
1138   return m_prg[(m_reg * 0x2000) + offset];
1133   // in 0x6000-0x7fff is mapped the 2nd PRG chip which starts after 32K (hence the +4)
1134   return m_prg[((m_reg + 4) * 0x2000) + offset];
11391135}
11401136
11411137/*-------------------------------------------------
trunk/src/mess/machine/nes_slot.c
r22604r22605
33 
44 Nintendo NES/FC cart emulation
55 (through slot devices)
6
7 The driver exposes address ranges
8 0x4100-0x5fff to read_l/write_l
9 0x6000-0x7fff to read_m/write_m (here are *usually* installed NVRAM & WRAM, if any)
10 0x8000-0xffff to write_h (reads are directed to 4 x 8K PRG banks)
11 Default implementations of these handlers are available here, to be rewritten by PCB-specific ones when needed.
612 
7 TODO: add notes about driver connections + about open bus (and our sketchy implementation) + about bus conflict...
8 
9 ***********************************************************************************************************/
13 Additional handlers are available, but have to be manually installed at machine_start
14 * read_ex/write_ex for address range 0x4020-0x40ff
15 * read_h for address range 0x8000-0xffff when a cart does some protection or address scramble before reading ROM
1016
11/*****************************************************************************************
17 PPU exposes address ranges
18 0x0000-0x1fff to chr_r/chr_w
19 0x2000-0x3eff to nt_r/nt_w
20 Default implementations of these handlers are available here, to be rewritten by PCB-specific ones when needed.
21
22 Plus a few of latch functions are available: ppu_latch (see MMC2), hblank_irq and scanline_irq (see e.g. MMC3),
23 but these might be subject to future changes when the PPU is revisited.
1224 
13 Notes to be merged / split...
25 Notes:
26 - Differently from later systems (like SNES or MD), it is uncommon to find PRG ROMs of NES games which are not a
27   power of 2K, so we do not perform any mirroring by default.
28   A bunch of pcb types, though, come with 1.5MB of PRG (some Waixing translations) or with multiple PRG chips
29   having peculiar size (32K + 16K, 32K + 8K, 32K + 2K). Hence, if such a configuration is detected, we provide
30   a m_prg_bank_map array to handle internally PRG mirroring up to the next power of 2K, as long as the size is
31   a multiple of 8K (i.e. the unit chunk for standard PRG).
32   For the case of PRG chips which are not-multiple of 8K (e.g. UNL-MARIO2-MALEE pcb), the handling has to be
33   handled in the pcb-specific code!
34 - Our open bus emulation is very sketchy, by simply returning the higher 8bits of the accessed address. This seems
35   enough for most games (only two sets have issues with this). A slightly better implementation is almost ready
36   to fix these two remaining cases, but I plan to revisit the whole implementation in an accurate way at a later
37   stage
38 - Bus conflict is implemented based on latest tests by Blargg. There is some uncertainty about AxROM behavior
39   (some AOROM pcbs suffers from bus conflict, some do not... since no AOROM game is known to glitch due to lack
40   of bus conflict it seems safe to emulate the board without bus conflict, but eventually it would be good to
41   differentiate the real variants)
1442
15 Many information about the mappers below come from the wonderful doc written by Disch.
43
44 Many information about the mappers/pcbs come from the wonderful doc written by Disch.
1645 Current info (when used) are based on v0.6.1 of his docs.
1746 You can find the latest version of the doc at http://www.romhacking.net/docs/362/
1847 
48 A lot of details have been based on the researches carried on at NesDev forums (by Blargg, Quietust and many more)
49 and collected on the NesDev Wiki http://wiki.nesdev.com/
1950 
51 Particular thanks go to
52 - Martin Freij for his work on NEStopia
53 - Cah4e3 for his efforts on FCEUMM and the reverse engineering of pirate boards
54 - BootGod, lidnariq and naruko for the PCB tests which made possible
55
56 
57 ***********************************************************************************************************/
58
59/*****************************************************************************************
60 
2061 A few Mappers suffer of hardware conflict: original dumpers have used the same mapper number for more than
2162 a kind of boards. In these cases (and only in these cases) we exploit nes.hsi to set up accordingly
2263 emulation. Games which requires this hack are the following:
r22604r22605
118159      m_prg = auto_alloc_array_clear(machine, UINT8, size);
119160      m_prg_size = size;
120161      m_prg_chunks = size / 0x4000;
121      if (size % 0x4000)
162      if (size % 0x2000)
122163      {
123164         // A few pirate carts have PRG made of 32K + 2K or some weird similar config
124165         // in this case we treat the banking as if this 'extra' PRG is not present and
125166         // the pcb code has to handle it by accessing directly m_prg!
126         printf("Warning! The loaded PRG has size not a multiple of 16KB (0x%X)\n", (UINT32)size);
167         printf("Warning! The loaded PRG has size not a multiple of 8KB (0x%X)\n", (UINT32)size);
127168         m_prg_chunks--;
128169      }
129170
trunk/hash/nes.xml
r22604r22605
6346263462      </part>
6346363463   </software>
6346463464
63465   <software name="vballfdsa" cloneof="volley" supported="no">
63465   <software name="vballfds" cloneof="volley" supported="no">
6346663466      <description>Volleyball (Asia, FDS conversion, Alt)</description>
6346763467      <year>19??</year>
6346863468      <publisher>&lt;pirate&gt;</publisher>
6346963469      <part name="cart" interface="nes_cart">
63470         <feature name="slot" value="smb2j" />
63470         <feature name="slot" value="09034a" />
6347163471         <feature name="pcb" value="UNL-SMB2J" />
63472         <feature name="mirroring" value="vertical" />
6347263473         <dataarea name="chr" size="8192">
6347363474            <rom name="volleyball (fds conversion) (unl) [u].chr" size="8192" crc="0101a6fb" sha1="fd7338e3802b897172f0f22e7f5a191bc68dd6d2" offset="00000" status="baddump" />
6347463475         </dataarea>
63475         <dataarea name="prg" size="32768">
63476            <rom name="volleyball (fds conversion) (unl) [u].prg" size="32768" crc="d4fb2cd8" sha1="56cacee106de0116857421081c778ebc9d480aa0" offset="00000" status="baddump" />
63476         <dataarea name="prg" size="40960">
63477            <rom name="volleyball (fds conversion) (unl) [u].prg0" size="32768" crc="d4fb2cd8" sha1="56cacee106de0116857421081c778ebc9d480aa0" offset="0x0000" status="baddump" />
63478            <rom name="volleyball (fds conversion) (unl) [u].prg1" size="8192" crc="b160e5eb" sha1="c5564e86cd50468745c8dff34398f95422a6d877" offset="0x8000" status="baddump" />
6347763479         </dataarea>
6347863480      </part>
6347963481   </software>
r22604r22605
6371863720      </part>
6371963721   </software>
6372063722
63721   <software name="vballfds" cloneof="volley" supported="no">
63723   <software name="vballfdsa" cloneof="volley" supported="no">
6372263724      <description>Volleyball (Asia, FDS conversion)</description>
6372363725      <year>19??</year>
6372463726      <publisher>&lt;pirate&gt;</publisher>

Previous 199869 Revisions Next


© 1997-2024 The MAME Team