Previous 199869 Revisions Next

r22807 Monday 13th May, 2013 at 14:29:50 UTC by Fabio Priuli
(MESS) nes.c: added a new fds conversion dump found in a big chinese pack. emulation
is only partial, unfortunately. nw.
[hash]nes.xml
[src/mess/includes]nes.h
[src/mess/machine]nes_bootleg.c nes_bootleg.h nes_ines.c nes_mmc3_clones.c nes_mmc3_clones.h nes_pcb.c nes_slot.h nes_unif.c

trunk/hash/nes.xml
r22806r22807
34093409      </part>
34103410   </software>
34113411
3412   <software name="bchess">
3412   <software name="btlchess">
34133413      <description>Battle Chess (USA)</description>
34143414      <year>1990</year>
34153415      <publisher>Data East</publisher>
r22806r22807
5900159001      <year>19??</year>
5900259002      <publisher>Hwang Shinwei</publisher>
5900359003      <part name="cart" interface="nes_cart">
59004         <feature name="slot" value="a9746" />
59005         <feature name="pcb" value="UNL-A9746" />
59004         <feature name="slot" value="nrom" />
59005         <feature name="pcb" value="NES-NROM-256" />
5900659006         <feature name="mirroring" value="vertical" />
5900759007         <dataarea name="prg" size="32768">
5900859008            <rom name="block force (unl) (hwang shinwei).prg" size="32768" crc="b655c53a" sha1="5de850b4e28c49ff9ed53def2a335d29b09387c2" offset="00000" status="baddump" />
r22806r22807
6328063280      </part>
6328163281   </software>
6328263282
63283   <software name="nazomfds" supported="no">
63284      <description>Nazo no Murasamejou (Asia, FDS conversion)</description>
63285      <year>19??</year>
63286      <publisher>Whirlwind Manu?</publisher>
63287      <part name="cart" interface="nes_cart">
63288         <feature name="slot" value="unl_lh53" />
63289         <feature name="pcb" value="UNL-LH53" />
63290         <feature name="mirroring" value="vertical" />
63291         <dataarea name="prg" size="131072">
63292            <rom name="nazo no murasamejou (fds conversion)(unl)[u][!].prg" size="131072" crc="11783125" sha1="cb3202693901124fcaf52c3e4d8fbf4949c326da" offset="00000" status="baddump" />
63293         </dataarea>
63294         <!-- 8k VRAM on cartridge -->
63295         <dataarea name="vram" size="8192">
63296         </dataarea>
63297         <!-- 8k WRAM (battery backed) on cartridge -->
63298         <dataarea name="bwram" size="8192">
63299         </dataarea>
63300      </part>
63301   </software>
63302
6328363303   <software name="prowrfds">
6328463304      <description>ProWres - Famicom Wrestling Association (Asia, FDS conversion)</description>
6328563305      <year>19??</year>
trunk/src/mess/machine/nes_pcb.c
r22806r22807
288288   { "ks7013b",          KAISER_KS7013B },
289289   { "mmalee2",          UNL_MMALEE },
290290   { "unl_2708",         UNL_2708 },
291   { "a9746",            UNL_A9746 },
292291   { "unl_lh10",         UNL_LH10 },
293292   { "unl_lh32",         UNL_LH32 },
293   { "unl_lh53",         UNL_LH53 },
294294   { "unl_ac08",         UNL_AC08 },
295295   { "unl_bb",           UNL_BB },
296296   { "unl_malisb",       UNL_MALISB },
r22806r22807
307307   { "unl_dance",        UNSUPPORTED_BOARD },
308308   { "bmc_hik_kof",      UNSUPPORTED_BOARD },
309309   { "onebus",           UNSUPPORTED_BOARD },
310   { "a9746",            UNSUPPORTED_BOARD },
310311   { "test",             TEST_BOARD },
311312   { "unknown",          UNKNOWN_BOARD }  //  a few pirate dumps uses the wrong mapper...
312313};
trunk/src/mess/machine/nes_ines.c
r22806r22807
250250   { 216, RCM_GS2015 },
251251   { 217, BMC_GOLDENCARD_6IN1 },
252252   // 218 Unused
253   { 216, UNL_A9746 },
253   // 219 UNL-A9746 (according to Cah4e3's code, no dump available (yet)
254254   // 220 Unused
255255   { 221, UNL_N625092 },
256256   { 222, BTL_DRAGONNINJA },
trunk/src/mess/machine/nes_unif.c
r22806r22807
126126   { "UNL-AC08",                   0,    0, CHRRAM_0,  UNL_AC08},
127127   { "UNL-BB",                     0,    0, CHRRAM_0,  UNL_BB},
128128   { "UNL-LH32",                   0,    0, CHRRAM_0,  UNL_LH32},
129   { "UNL-LH53",                   0,    0, CHRRAM_0,  UNL_LH53},
129130   { "BMC-G-146",                  0,    0, CHRRAM_0,  BMC_G146},
130131   { "BMC-11160",                  0,    0, CHRRAM_0,  BMC_11160},
131132   { "UNL-MALISB",                 0,    0, CHRRAM_0,  UNL_MALISB},
trunk/src/mess/machine/nes_mmc3_clones.c
r22806r22807
4949const device_type NES_GOUDER = &device_creator<nes_gouder_device>;
5050const device_type NES_SA9602B = &device_creator<nes_sa9602b_device>;
5151const device_type NES_SACHEN_SHERO = &device_creator<nes_sachen_shero_device>;
52const device_type NES_A9746 = &device_creator<nes_a9746_device>;
52//const device_type NES_A9746 = &device_creator<nes_a9746_device>;
5353
5454const device_type NES_FK23C = &device_creator<nes_fk23c_device>;
5555const device_type NES_FK23CA = &device_creator<nes_fk23ca_device>;
r22806r22807
166166{
167167}
168168
169nes_a9746_device::nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
170               : nes_txrom_device(mconfig, NES_A9746, "NES Cart A-9746 PCB", tag, owner, clock, "nes_bmc_a9746", __FILE__)
171{
172}
169//nes_a9746_device::nes_a9746_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
170//               : nes_txrom_device(mconfig, NES_A9746, "NES Cart A-9746 PCB", tag, owner, clock, "nes_bmc_a9746", __FILE__)
171//{
172//}
173173
174174nes_fk23c_device::nes_fk23c_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
175175               : nes_txrom_device(mconfig, type, name, tag, owner, clock, shortname, source)
r22806r22807
434434   mmc3_common_initialize(0xff, 0x1ff, 0);
435435}
436436
437void nes_a9746_device::device_start()
438{
439   mmc3_start();
440   save_item(NAME(m_reg));
441}
442
443void nes_a9746_device::pcb_reset()
444{
445   m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
446
447   m_reg[0] = 0;
448   m_reg[1] = 0;
449   m_reg[2] = 0;
450   mmc3_common_initialize(0x7f, 0xff, 0);
451}
452
453437void nes_fk23c_device::device_start()
454438{
455439   mmc3_start();
r22806r22807
18011785}
18021786
18031787
1804/*-------------------------------------------------
18051788
1806 UNL-A9746
1807
1808
1809 MMC3 clone
1810
1811
1812 In MESS: Very Preliminary Support
1813
1814 -------------------------------------------------*/
1815
1816void nes_a9746_device::update_banks(UINT8 value)
1817{
1818   UINT8 bank = BITSWAP8(value & 0x3c,7,6,0,1,2,3,4,5);
1819
1820   switch (m_reg[0])
1821   {
1822      case 0x26: prg8_89(bank); break;
1823      case 0x25: prg8_ab(bank); break;
1824      case 0x24: prg8_cd(bank); break;
1825      case 0x23: prg8_ef(bank); break;
1826   }
1827
1828   switch (m_reg[1])
1829   {
1830      case 0x08: case 0x0a: case 0x0c: case 0x0e:
1831      case 0x10: case 0x12: case 0x14: case 0x16:
1832      case 0x18: case 0x1a: case 0x1c: case 0x1e:
1833         m_reg[2] = (value << 4);
1834         break;
1835      case 0x09: chr1_0(m_reg[2] | (value >> 1), m_chr_source); break;
1836      case 0x0b: chr1_1(m_reg[2] | (value >> 1) | 1, m_chr_source);  break;
1837      case 0x0d: chr1_2(m_reg[2] | (value >> 1), m_chr_source);  break;
1838      case 0x0f: chr1_3(m_reg[2] | (value >> 1) | 1, m_chr_source);  break;
1839      case 0x11: chr1_4(m_reg[2] | (value >> 1), m_chr_source); break;
1840      case 0x15: chr1_5(m_reg[2] | (value >> 1), m_chr_source);  break;
1841      case 0x19: chr1_6(m_reg[2] | (value >> 1), m_chr_source);  break;
1842      case 0x1d: chr1_7(m_reg[2] | (value >> 1), m_chr_source);  break;
1843   }
1844}
1845
1846WRITE8_MEMBER(nes_a9746_device::write_h)
1847{
1848   LOG_MMC(("unl_a9746 write_h, offset: %04x, data: %02x\n", offset, data));
1849
1850   switch (offset & 0x6003)
1851   {
1852      case 0x0000:
1853         m_reg[1] = data;
1854         m_reg[0] = 0;
1855         break;
1856      case 0x0001:
1857         update_banks(data);
1858         break;
1859      case 0x0002:
1860         m_reg[0] = data;
1861         m_reg[1] = 0;
1862         break;
1863
1864      case 0x0003:
1865      case 0x2000:
1866      case 0x2001:
1867      case 0x2002:
1868      case 0x2003:
1869         break;
1870
1871      default:
1872         txrom_write(space, offset, data, mem_mask);
1873         break;
1874   }
1875}
1876
1877
18781789/*-------------------------------------------------
18791790
18801791 MULTIGAME CARTS BASED ON MMC3
r22806r22807
25842495         break;
25852496   }
25862497}
2498
2499#ifdef UNUSED_FUNCTION
2500/*-------------------------------------------------
2501 
2502 UNL-A9746
2503 
2504 
2505 MMC3 clone
2506 
2507 
2508 Preliminary emulation based on Cah4e3's code
2509 No dump is available (yet) for this.
2510 
2511 -------------------------------------------------*/
2512
2513void nes_a9746_device::device_start()
2514{
2515   mmc3_start();
2516   save_item(NAME(m_reg));
2517}
2518
2519void nes_a9746_device::pcb_reset()
2520{
2521   m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
2522   
2523   m_reg[0] = 0;
2524   m_reg[1] = 0;
2525   m_reg[2] = 0;
2526   mmc3_common_initialize(0x7f, 0xff, 0);
2527}
2528
2529void nes_a9746_device::update_banks(UINT8 value)
2530{
2531   UINT8 bank = BITSWAP8(value & 0x3c,7,6,0,1,2,3,4,5);
2532   
2533   switch (m_reg[0])
2534   {
2535      case 0x26: prg8_89(bank); break;
2536      case 0x25: prg8_ab(bank); break;
2537      case 0x24: prg8_cd(bank); break;
2538      case 0x23: prg8_ef(bank); break;
2539   }
2540   
2541   switch (m_reg[1])
2542   {
2543      case 0x08: case 0x0a: case 0x0c: case 0x0e:
2544      case 0x10: case 0x12: case 0x14: case 0x16:
2545      case 0x18: case 0x1a: case 0x1c: case 0x1e:
2546         m_reg[2] = (value << 4);
2547         break;
2548      case 0x09: chr1_0(m_reg[2] | (value >> 1), m_chr_source); break;
2549      case 0x0b: chr1_1(m_reg[2] | (value >> 1) | 1, m_chr_source);  break;
2550      case 0x0d: chr1_2(m_reg[2] | (value >> 1), m_chr_source);  break;
2551      case 0x0f: chr1_3(m_reg[2] | (value >> 1) | 1, m_chr_source);  break;
2552      case 0x11: chr1_4(m_reg[2] | (value >> 1), m_chr_source); break;
2553      case 0x15: chr1_5(m_reg[2] | (value >> 1), m_chr_source);  break;
2554      case 0x19: chr1_6(m_reg[2] | (value >> 1), m_chr_source);  break;
2555      case 0x1d: chr1_7(m_reg[2] | (value >> 1), m_chr_source);  break;
2556   }
2557}
2558
2559WRITE8_MEMBER(nes_a9746_device::write_h)
2560{
2561   LOG_MMC(("unl_a9746 write_h, offset: %04x, data: %02x\n", offset, data));
2562   
2563   switch (offset & 0x6003)
2564   {
2565      case 0x0000:
2566         m_reg[1] = data;
2567         m_reg[0] = 0;
2568         break;
2569      case 0x0001:
2570         update_banks(data);
2571         break;
2572      case 0x0002:
2573         m_reg[0] = data;
2574         m_reg[1] = 0;
2575         break;
2576         
2577      case 0x0003:
2578      case 0x2000:
2579      case 0x2001:
2580      case 0x2002:
2581      case 0x2003:
2582         break;
2583         
2584      default:
2585         txrom_write(space, offset, data, mem_mask);
2586         break;
2587   }
2588}
2589#endif
2590
trunk/src/mess/machine/nes_mmc3_clones.h
r22806r22807
383383   UINT8 m_reg;
384384};
385385
386
386#ifdef UNUSED_FUNCTION
387387// ======================> nes_a9746_device
388388
389389class nes_a9746_device : public nes_txrom_device
r22806r22807
402402   void update_banks(UINT8 value);
403403   UINT8 m_reg[3];
404404};
405#endif
405406
406407
407408// ======================> nes_fk23c_device
trunk/src/mess/machine/nes_bootleg.c
r22806r22807
5353const device_type NES_TOBIDASE = &device_creator<nes_tobidase_device>;
5454const device_type NES_LH32 = &device_creator<nes_lh32_device>;
5555const device_type NES_LH10 = &device_creator<nes_lh10_device>;
56const device_type NES_LH53 = &device_creator<nes_lh53_device>;
5657const device_type NES_2708 = &device_creator<nes_2708_device>;
5758const device_type NES_AC08 = &device_creator<nes_ac08_device>;
5859const device_type NES_UNL_BB = &device_creator<nes_unl_bb_device>;
r22806r22807
130131{
131132}
132133
134nes_lh53_device::nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
135               : nes_nrom_device(mconfig, NES_LH53, "NES Cart LH-53 Pirate PCB", tag, owner, clock, "nes_lh53", __FILE__)
136{
137}
138
133139nes_2708_device::nes_2708_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
134140               : nes_nrom_device(mconfig, NES_2708, "NES Cart BTL-2708 Pirate PCB", tag, owner, clock, "nes_2708", __FILE__)
135141{
r22806r22807
419425   m_latch = 0;
420426}
421427
428void nes_lh53_device::device_start()
429{
430   common_start();
431   irq_timer = timer_alloc(TIMER_IRQ);
432   irq_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1));
433   
434   save_item(NAME(m_irq_enable));
435   save_item(NAME(m_irq_count));
436   save_item(NAME(m_reg));
437}
438
439void nes_lh53_device::pcb_reset()
440{
441   chr8(0, CHRRAM);
442   
443   prg8_89(0xc);
444   prg8_ab(0xd);   // last 2K are overlayed by WRAM
445   prg8_cd(0xe);   // first 6K are overlayed by WRAM
446   prg8_ef(0xf);
447   m_reg = 0;
448   m_irq_count = 0;
449   m_irq_enable = 0;
450}
451
422452void nes_2708_device::device_start()
423453{
424454   common_start();
r22806r22807
12751305}
12761306
12771307/*-------------------------------------------------
1308 
1309 UNL-LH53
1310 
1311 Games: Nazo no Murasamejou (FDS conversion)
1312 
1313 This PCB maps WRAM (w/battery) in 0xb800-0xd7ff and
1314 PRG in 0x6000-0x7fff
12781315
1316 iNES:
1317 
1318 In MESS: Preliminar Support only.
1319 
1320 -------------------------------------------------*/
1321
1322void nes_lh53_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
1323{
1324   if (id == TIMER_IRQ)
1325   {
1326      if (m_irq_enable)
1327      {
1328         m_irq_count++;
1329         if (m_irq_count > 7560)//value from FCEUMM...
1330         {
1331            m_irq_count = 0;
1332            machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, ASSERT_LINE);
1333         }
1334      }
1335   }
1336}
1337
1338READ8_MEMBER(nes_lh53_device::read_m)
1339{
1340   LOG_MMC(("lh53 read_m, offset: %04x\n", offset));
1341   return m_prg[(m_reg * 0x2000) + (offset & 0x1fff)];
1342}
1343
1344READ8_MEMBER(nes_lh53_device::read_h)
1345{
1346   LOG_MMC(("lh53 read_h, offset: %04x\n", offset));
1347   
1348   if (offset >= 0x3800 && offset < 0x5800)
1349      return m_battery[offset & 0x1fff];
1350   
1351   return hi_access_rom(offset);
1352}
1353
1354WRITE8_MEMBER(nes_lh53_device::write_h)
1355{
1356   LOG_MMC(("lh53 write_h, offset: %04x, data: %02x\n", offset, data));
1357   
1358   if (offset >= 0x3800 && offset < 0x5800)
1359      m_battery[offset & 0x1fff] = data;
1360   
1361   else
1362   {
1363      switch (offset & 0x7000)
1364      {
1365         case 0x6000:
1366            m_irq_enable = BIT(data, 1);
1367            m_irq_count = 0;
1368            if (!m_irq_enable)
1369               machine().device("maincpu")->execute().set_input_line(M6502_IRQ_LINE, CLEAR_LINE);
1370            break;
1371         case 0x7000:
1372            m_reg = data & 0x0f;
1373            break;
1374      }
1375   }
1376}
1377
1378/*-------------------------------------------------
1379
12791380 BTL-2708
12801381
12811382 Games: Doki Doki Panic (FDS conversion)
trunk/src/mess/machine/nes_bootleg.h
r22806r22807
320320};
321321
322322
323// ======================> nes_lh53_device
324
325class nes_lh53_device : public nes_nrom_device
326{
327public:
328   // construction/destruction
329   nes_lh53_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
330   
331   // device-level overrides
332   virtual void device_start();
333   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
334   virtual DECLARE_READ8_MEMBER(read_m);
335   virtual DECLARE_READ8_MEMBER(read_h);
336   virtual DECLARE_WRITE8_MEMBER(write_m) {}
337   virtual DECLARE_WRITE8_MEMBER(write_h);
338   
339   virtual void pcb_reset();
340   
341private:
342   UINT16 m_irq_count;
343   int m_irq_enable;
344   UINT8 m_reg;
345   
346   static const device_timer_id TIMER_IRQ = 0;
347   emu_timer *irq_timer;
348   attotime timer_freq;
349};
350
351
323352// ======================> nes_2708_device
324353
325354class nes_2708_device : public nes_nrom_device
r22806r22807
438467extern const device_type NES_TOBIDASE;
439468extern const device_type NES_LH32;
440469extern const device_type NES_LH10;
470extern const device_type NES_LH53;
441471extern const device_type NES_2708;
442472extern const device_type NES_AC08;
443473extern const device_type NES_UNL_BB;
trunk/src/mess/machine/nes_slot.h
r22806r22807
9595   UNL_8237, UNL_CC21, UNL_AX5705, UNL_KOF97, UNL_KS7057,
9696   UNL_N625092, UNL_SC127, UNL_SMB2J, UNL_T230, UNL_MMALEE,
9797   UNL_UXROM, UNL_MK2, UNL_XIAOZY, UNL_KOF96,
98   UNL_SF3, UNL_RACERMATE, UNL_EDU2K, UNL_LH32, UNL_LH10,
98   UNL_SF3, UNL_RACERMATE, UNL_EDU2K, UNL_LH53, UNL_LH32, UNL_LH10,
9999   UNL_STUDYNGAME, UNL_603_5052, UNL_H2288, UNL_2708,
100100   UNL_MALISB, UNL_BB, UNL_AC08, UNL_A9746, UNL_WORLDHERO,
101101   UNL_43272, UNL_TF1201, UNL_CITYFIGHT,
trunk/src/mess/includes/nes.h
r22806r22807
285285   SLOT_INTERFACE_INTERNAL("unl_2708",         NES_2708)    // mapper 103
286286   SLOT_INTERFACE_INTERNAL("unl_lh32",         NES_LH32)   // used by Monty no Doki Doki Daidassou FDS conversion
287287   SLOT_INTERFACE_INTERNAL("unl_lh10",         NES_LH10)    // used in Fuuun Shaolin Kyo (FDS Conversion)
288   SLOT_INTERFACE_INTERNAL("unl_lh53",         NES_LH53)    // used in Nazo no Murasamejou (FDS Conversion)
288289   SLOT_INTERFACE_INTERNAL("unl_ac08",         NES_AC08) //  used by Green Beret FDS conversion
289290   SLOT_INTERFACE_INTERNAL("unl_bb",           NES_UNL_BB) //  used by a few FDS conversions
290291   SLOT_INTERFACE_INTERNAL("sgpipe",           NES_SHUIGUAN)    // mapper 183
r22806r22807
313314   SLOT_INTERFACE_INTERNAL("gouder",           NES_GOUDER)
314315   SLOT_INTERFACE_INTERNAL("sa9602b",          NES_SA9602B)
315316   SLOT_INTERFACE_INTERNAL("unl_shero",        NES_SACHEN_SHERO)
316   SLOT_INTERFACE_INTERNAL("a9746",            NES_A9746)    // mapper 219
317317// misc multigame cart boards
318318   SLOT_INTERFACE_INTERNAL("benshieng",        NES_BENSHIENG)
319319   SLOT_INTERFACE_INTERNAL("action52",         NES_ACTION52)
r22806r22807
392392   SLOT_INTERFACE_INTERNAL("unl_3d_block",     NES_NROM) //  [mentioned in FCEUMM source - we need more info] - UNSUPPORTED
393393   SLOT_INTERFACE_INTERNAL("unl_c_n22m",       NES_NROM) //  [mentioned in FCEUMM source - we need more info] - UNSUPPORTED
394394   SLOT_INTERFACE_INTERNAL("unl_pec_586",      NES_NROM) //  [mentioned in FCEUMM source - we need more info] - UNSUPPORTED
395   SLOT_INTERFACE_INTERNAL("a9746",            NES_NROM) // mapper 219 - UNSUPPORTED (no dump available)
395396// legacy boards for FFE copier mappers (are there images available to fix/improve emulation?)
396397   SLOT_INTERFACE_INTERNAL("ffe3",             NES_FFE3)
397398   SLOT_INTERFACE_INTERNAL("ffe4",             NES_FFE4)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team