Previous 199869 Revisions Next

r34603 Sunday 25th January, 2015 at 12:53:11 UTC by Couriersud
Merged winmisc/sdlmisc into osdlib_*.c. (nw)
[src/emu]device.c device.h emu.h emu.mak machine.c machine.h parameters.c parameters.h romload.c romload.h
[src/emu/cpu/i386]pentops.inc
[src/emu/cpu/mips]mips3drc.c
[src/emu/cpu/powerpc]ppcdrc.c
[src/emu/cpu/rsp]rspdrc.c
[src/emu/cpu/sh2]sh2drc.c
[src/emu/video]h63484.c h63484.h
[src/lib/util]astring.h
[src/mame]mame.mak
[src/mame/drivers]hikaru.c model2.c model3.c naomi.c segajw.c stv.c
[src/mame/machine]315-5881_crypt.c 315-5881_crypt.h 315-5881_helper.c* 315-5881_helper.h* naomim2.c naomim2.h stvprot.c
[src/mess]mess.lst mess.mak
[src/mess/drivers]slicer.c
[src/osd/modules/lib]osdlib_macosx.c osdlib_os2.c osdlib_unix.c osdlib_win32.c
[src/osd/sdl]sdl.mak sdlmisc_os2.c sdlmisc_unix.c sdlmisc_win32.c sdlos_os2.c
[src/osd/windows]windows.mak winmisc.c

trunk/src/emu/cpu/i386/pentops.inc
r243114r243115
22492249   MMXPROLOG();
22502250   UINT8 modrm = FETCH();
22512251   if( modrm >= 0xc0 ) {
2252      MMX_REG ds, sd;
22532252      int s,d;
22542253      s=modrm & 0x7;
22552254      d=(modrm >> 3) & 0x7;
2256      ds.q = MMX(d).q;
2257      sd.q = MMX(s).q;
2258      MMX(d).b[0]=SaturatedSignedWordToUnsignedByte(ds.s[0]);
2259      MMX(d).b[1]=SaturatedSignedWordToUnsignedByte(ds.s[1]);
2260      MMX(d).b[2]=SaturatedSignedWordToUnsignedByte(ds.s[2]);
2261      MMX(d).b[3]=SaturatedSignedWordToUnsignedByte(ds.s[3]);
2262      MMX(d).b[4]=SaturatedSignedWordToUnsignedByte(sd.s[0]);
2263      MMX(d).b[5]=SaturatedSignedWordToUnsignedByte(sd.s[1]);
2264      MMX(d).b[6]=SaturatedSignedWordToUnsignedByte(sd.s[2]);
2265      MMX(d).b[7]=SaturatedSignedWordToUnsignedByte(sd.s[3]);
2255      MMX(d).b[0]=SaturatedSignedWordToUnsignedByte(MMX(d).s[0]);
2256      MMX(d).b[1]=SaturatedSignedWordToUnsignedByte(MMX(d).s[1]);
2257      MMX(d).b[2]=SaturatedSignedWordToUnsignedByte(MMX(d).s[2]);
2258      MMX(d).b[3]=SaturatedSignedWordToUnsignedByte(MMX(d).s[3]);
2259      MMX(d).b[4]=SaturatedSignedWordToUnsignedByte(MMX(s).s[0]);
2260      MMX(d).b[5]=SaturatedSignedWordToUnsignedByte(MMX(s).s[1]);
2261      MMX(d).b[6]=SaturatedSignedWordToUnsignedByte(MMX(s).s[2]);
2262      MMX(d).b[7]=SaturatedSignedWordToUnsignedByte(MMX(s).s[3]);
22662263   } else {
2267      MMX_REG s,t;
2264      MMX_REG s;
22682265      int d=(modrm >> 3) & 0x7;
22692266      UINT32 ea = GetEA(modrm, 0);
22702267      READMMX(ea, s);
2271      t.q = MMX(d).q;
2272      MMX(d).b[0]=SaturatedSignedWordToUnsignedByte(t.s[0]);
2273      MMX(d).b[1]=SaturatedSignedWordToUnsignedByte(t.s[1]);
2274      MMX(d).b[2]=SaturatedSignedWordToUnsignedByte(t.s[2]);
2275      MMX(d).b[3]=SaturatedSignedWordToUnsignedByte(t.s[3]);
2268      MMX(d).b[0]=SaturatedSignedWordToUnsignedByte(MMX(d).s[0]);
2269      MMX(d).b[1]=SaturatedSignedWordToUnsignedByte(MMX(d).s[1]);
2270      MMX(d).b[2]=SaturatedSignedWordToUnsignedByte(MMX(d).s[2]);
2271      MMX(d).b[3]=SaturatedSignedWordToUnsignedByte(MMX(d).s[3]);
22762272      MMX(d).b[4]=SaturatedSignedWordToUnsignedByte(s.s[0]);
22772273      MMX(d).b[5]=SaturatedSignedWordToUnsignedByte(s.s[1]);
22782274      MMX(d).b[6]=SaturatedSignedWordToUnsignedByte(s.s[2]);
r243114r243115
23662362   UINT8 modrm = FETCH();
23672363   if( modrm >= 0xc0 ) {
23682364      int s,d;
2369      INT32 t1, t2, t3, t4;
23702365      s=modrm & 0x7;
23712366      d=(modrm >> 3) & 0x7;
2372      t1 = MMX(d).i[0];
2373      t2 = MMX(d).i[1];
2374      t3 = MMX(s).i[0];
2375      t4 = MMX(s).i[1];
2376      MMX(d).s[0] = SaturatedSignedDwordToSignedWord(t1);
2377      MMX(d).s[1] = SaturatedSignedDwordToSignedWord(t2);
2378      MMX(d).s[2] = SaturatedSignedDwordToSignedWord(t3);
2379      MMX(d).s[3] = SaturatedSignedDwordToSignedWord(t4);
2380   }
2381   else {
2367      MMX(d).s[0]=SaturatedSignedDwordToSignedWord(MMX(d).i[0]);
2368      MMX(d).s[1]=SaturatedSignedDwordToSignedWord(MMX(d).i[1]);
2369      MMX(d).s[2]=SaturatedSignedDwordToSignedWord(MMX(s).i[0]);
2370      MMX(d).s[3]=SaturatedSignedDwordToSignedWord(MMX(s).i[1]);
2371   } else {
23822372      MMX_REG s;
2383      INT32 t1, t2;
23842373      int d=(modrm >> 3) & 0x7;
23852374      UINT32 ea = GetEA(modrm, 0);
23862375      READMMX(ea, s);
2387      t1 = MMX(d).i[0];
2388      t2 = MMX(d).i[1];
2389      MMX(d).s[0] = SaturatedSignedDwordToSignedWord(t1);
2390      MMX(d).s[1] = SaturatedSignedDwordToSignedWord(t2);
2391      MMX(d).s[2] = SaturatedSignedDwordToSignedWord(s.i[0]);
2392      MMX(d).s[3] = SaturatedSignedDwordToSignedWord(s.i[1]);
2376      MMX(d).s[0]=SaturatedSignedDwordToSignedWord(MMX(d).i[0]);
2377      MMX(d).s[1]=SaturatedSignedDwordToSignedWord(MMX(d).i[1]);
2378      MMX(d).s[2]=SaturatedSignedDwordToSignedWord(s.i[0]);
2379      MMX(d).s[3]=SaturatedSignedDwordToSignedWord(s.i[1]);
23932380   }
23942381   CYCLES(1);     // TODO: correct cycle count
23952382}
r243114r243115
27242711{
27252712   UINT8 modrm = FETCH();
27262713   if( modrm >= 0xc0 ) {
2727      // MOVHLPS opcode
2728      XMM((modrm >> 3) & 0x7).q[0] = XMM(modrm & 0x7).q[1];
2714      // unsupported by cpu
27292715      CYCLES(1);     // TODO: correct cycle count
27302716   } else {
2731      // MOVLPS opcode
27322717      UINT32 ea = GetEA(modrm, 0);
27332718      READXMM_LO64(ea, XMM((modrm >> 3) & 0x7));
27342719      CYCLES(1);     // TODO: correct cycle count
r243114r243115
27522737{
27532738   UINT8 modrm = FETCH();
27542739   if( modrm >= 0xc0 ) {
2755      // MOVLHPS opcode
2756      XMM((modrm >> 3) & 0x7).q[1] = XMM(modrm & 0x7).q[0];
2740      // unsupported by cpu
27572741      CYCLES(1);     // TODO: correct cycle count
27582742   } else {
2759      // MOVHPS opcode
27602743      UINT32 ea = GetEA(modrm, 0);
27612744      READXMM_HI64(ea, XMM((modrm >> 3) & 0x7));
27622745      CYCLES(1);     // TODO: correct cycle count
r243114r243115
33843367   CYCLES(1);     // TODO: correct cycle count
33853368}
33863369
3387void i386_device::sse_shufps() // Opcode 0f c6
3370void i386_device::sse_shufps() // Opcode 0f 67
33883371{
33893372   UINT8 modrm = FETCH();
33903373   UINT8 sel = FETCH();
r243114r243115
33973380   s=modrm & 0x7;
33983381   d=(modrm >> 3) & 0x7;
33993382   if( modrm >= 0xc0 ) {
3400      UINT32 t1,t2,t3,t4;
3401      t1=XMM(d).d[m1];
3402      t2=XMM(d).d[m2];
3403      t3=XMM(s).d[m3];
3404      t4=XMM(s).d[m4];
3405      XMM(d).d[0]=t1;
3406      XMM(d).d[1]=t2;
3407      XMM(d).d[2]=t3;
3408      XMM(d).d[3]=t4;
3383      UINT32 t;
3384      t=XMM(d).d[m1];
3385      XMM(d).d[1]=XMM(d).d[m2];
3386      XMM(d).d[0]=t;
3387      XMM(d).d[2]=XMM(s).d[m3];
3388      XMM(d).d[3]=XMM(s).d[m4];
34093389   } else {
3410      UINT32 t1,t2;
3390      UINT32 t;
34113391      XMM_REG src;
34123392      UINT32 ea = GetEA(modrm, 0);
34133393      READXMM(ea, src);
3414      t1=XMM(d).d[m1];
3415      t2=XMM(d).d[m2];
3416      XMM(d).d[0]=t1;
3417      XMM(d).d[1]=t2;
3394      t=XMM(d).d[m1];
3395      XMM(d).d[1]=XMM(d).d[m2];
3396      XMM(d).d[0]=t;
34183397      XMM(d).d[2]=src.d[m3];
34193398      XMM(d).d[3]=src.d[m4];
34203399   }
r243114r243115
34253404{
34263405   UINT8 modrm = FETCH();
34273406   int s,d;
3428   UINT32 t1, t2, t3, t4;
34293407   s=modrm & 0x7;
34303408   d=(modrm >> 3) & 0x7;
34313409   if( modrm >= 0xc0 ) {
3432      t1 = XMM(s).d[1];
3433      t2 = XMM(d).d[1];
3434      t3 = XMM(s).d[0];
3435      t4 = XMM(d).d[0];
3436      XMM(d).d[3]=t1;
3437      XMM(d).d[2]=t2;
3438      XMM(d).d[1]=t3;
3439      XMM(d).d[0]=t4;
3410      XMM(d).d[3]=XMM(s).d[1];
3411      XMM(d).d[2]=XMM(d).d[1];
3412      XMM(d).d[1]=XMM(s).d[0];
3413      //XMM(d).d[0]=XMM(d).d[0];
34403414   } else {
34413415      XMM_REG src;
34423416      UINT32 ea = GetEA(modrm, 0);
34433417      READXMM(ea, src);
3444      t2 = XMM(d).d[1];
34453418      XMM(d).d[3]=src.d[1];
3446      XMM(d).d[2]=t2;
3419      XMM(d).d[2]=XMM(d).d[1];
34473420      XMM(d).d[1]=src.d[0];
34483421   }
34493422   CYCLES(1);     // TODO: correct cycle count
r243114r243115
34533426{
34543427   UINT8 modrm = FETCH();
34553428   int s,d;
3456   UINT32 t1, t2, t3, t4;
34573429   s=modrm & 0x7;
34583430   d=(modrm >> 3) & 0x7;
34593431   if( modrm >= 0xc0 ) {
3460      t1 = XMM(d).d[2];
3461      t2 = XMM(s).d[2];
3462      t3 = XMM(d).d[3];
3463      t4 = XMM(s).d[3];
3464      XMM(d).d[0]=t1;
3465      XMM(d).d[1]=t2;
3466      XMM(d).d[2]=t3;
3467      XMM(d).d[3]=t4;
3432      XMM(d).d[0]=XMM(d).d[2];
3433      XMM(d).d[1]=XMM(s).d[2];
3434      XMM(d).d[2]=XMM(d).d[3];
3435      XMM(d).d[3]=XMM(s).d[3];
34683436   } else {
34693437      XMM_REG src;
34703438      UINT32 ea = GetEA(modrm, 0);
34713439      READXMM(ea, src);
3472      t1 = XMM(d).d[2];
3473      t3 = XMM(d).d[3];
3474      XMM(d).d[0]=t1;
3440      XMM(d).d[0]=XMM(d).d[2];
34753441      XMM(d).d[1]=src.d[2];
3476      XMM(d).d[2]=t3;
3442      XMM(d).d[2]=XMM(d).d[3];
34773443      XMM(d).d[3]=src.d[3];
34783444   }
34793445   CYCLES(1);     // TODO: correct cycle count
trunk/src/emu/cpu/mips/mips3drc.c
r243114r243115
10131013    an exception if out
10141014-------------------------------------------------*/
10151015
1016void mips3_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, uml::parameter param, int allow_exception)
1016void mips3_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, parameter param, int allow_exception)
10171017{
10181018   /* check software interrupts if pending */
10191019   if (compiler->checksoftints)
trunk/src/emu/cpu/powerpc/ppcdrc.c
r243114r243115
5757***************************************************************************/
5858
5959#define R32(reg)                m_regmap[reg]
60#define R32Z(reg)               (((reg) == 0) ? uml::parameter(0) : m_regmap[reg])
60#define R32Z(reg)               (((reg) == 0) ? parameter(0) : m_regmap[reg])
6161#define F64(reg)                m_fdregmap[reg]
6262#define CR32(reg)               mem(&m_core->cr[reg])
6363#define FPSCR32                 mem(&m_core->fpscr)
r243114r243115
15491549    an exception if out
15501550-------------------------------------------------*/
15511551
1552void ppc_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, uml::parameter param, int allow_exception)
1552void ppc_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, parameter param, int allow_exception)
15531553{
15541554   /* check full interrupts if pending */
15551555   if (compiler->checkints)
trunk/src/emu/cpu/rsp/rspdrc.c
r243114r243115
641641    subtract cycles from the icount and generate
642642    an exception if out
643643-------------------------------------------------*/
644void rsp_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, uml::parameter param, int allow_exception)
644void rsp_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, parameter param, int allow_exception)
645645{
646646   /* account for cycles */
647647   if (compiler->cycles > 0)
trunk/src/emu/cpu/sh2/sh2drc.c
r243114r243115
9191   {
9292      if (m_regmap[regnum].is_int_register())
9393      {
94         UML_MOV(block, uml::parameter::make_ireg(m_regmap[regnum].ireg()), mem(&m_sh2_state->r[regnum]));
94         UML_MOV(block, parameter::make_ireg(m_regmap[regnum].ireg()), mem(&m_sh2_state->r[regnum]));
9595      }
9696   }
9797}
r243114r243115
110110   {
111111      if (m_regmap[regnum].is_int_register())
112112      {
113         UML_MOV(block, mem(&m_sh2_state->r[regnum]), uml::parameter::make_ireg(m_regmap[regnum].ireg()));
113         UML_MOV(block, mem(&m_sh2_state->r[regnum]), parameter::make_ireg(m_regmap[regnum].ireg()));
114114      }
115115   }
116116}
r243114r243115
12201220    subtract cycles from the icount and generate
12211221    an exception if out
12221222-------------------------------------------------*/
1223void sh2_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, uml::parameter param, int allow_exception)
1223void sh2_device::generate_update_cycles(drcuml_block *block, compiler_state *compiler, parameter param, int allow_exception)
12241224{
12251225   /* check full interrupts if pending */
12261226   if (compiler->checkints)
trunk/src/emu/device.c
r243114r243115
186186
187187
188188//-------------------------------------------------
189//  ioport - return a pointer to the I/O port
190//  object for a given port name
191//-------------------------------------------------
192
193astring device_t::parameter(const char *tag) const
194{
195   // safety first
196   if (this == NULL)
197      return NULL;
198
199   // build a fully-qualified name and look it up
200   astring fullpath;
201   return machine().parameters().lookup(subtag(fullpath, tag));
202}
203
204
205//-------------------------------------------------
206189//  static_set_clock - set/change the clock on
207190//  a device
208191//-------------------------------------------------
trunk/src/emu/device.h
r243114r243115
130130   UINT8 default_bios() const { return m_default_bios; }
131131   UINT8 system_bios() const { return m_system_bios; }
132132   astring default_bios_tag() const { return m_default_bios_tag; }
133   astring parameter(const char *tag) const;
134133
135134   // interface helpers
136135   device_interface *first_interface() const { return m_interface_list; }
trunk/src/emu/emu.h
r243114r243115
8282// machine and driver configuration
8383#include "mconfig.h"
8484#include "gamedrv.h"
85#include "parameters.h"
8685
8786// timers, CPU and scheduling
8887#include "devcpu.h"
trunk/src/emu/emu.mak
r243114r243115
9999   $(EMUOBJ)/memarray.o \
100100   $(EMUOBJ)/memory.o \
101101   $(EMUOBJ)/network.o \
102   $(EMUOBJ)/parameters.o \
103102   $(EMUOBJ)/output.o \
104103   $(EMUOBJ)/render.o \
105104   $(EMUOBJ)/rendfont.o \
trunk/src/emu/machine.c
r243114r243115
142142      m_save(*this),
143143      m_memory(*this),
144144      m_ioport(*this),
145      m_parameters(*this),
146145      m_scheduler(*this)
147146{
148147   memset(&m_base_time, 0, sizeof(m_base_time));
trunk/src/emu/machine.h
r243114r243115
165165   save_manager &save() { return m_save; }
166166   memory_manager &memory() { return m_memory; }
167167   ioport_manager &ioport() { return m_ioport; }
168   parameters_manager &parameters() { return m_parameters; }
169168   cheat_manager &cheat() const { assert(m_cheat != NULL); return *m_cheat; }
170169   render_manager &render() const { assert(m_render != NULL); return *m_render; }
171170   input_manager &input() const { assert(m_input != NULL); return *m_input; }
r243114r243115
358357   save_manager            m_save;                 // save manager
359358   memory_manager          m_memory;               // memory manager
360359   ioport_manager          m_ioport;               // I/O port manager
361   parameters_manager      m_parameters;           // parameters manager
362360   device_scheduler        m_scheduler;            // scheduler object
363361   emu_timer               *m_autoboot_timer;      // autoboot timer
364362};
trunk/src/emu/parameters.c
r243114r243115
1// license:BSD-3-Clause
2// copyright-holders:Olivier Galibert, Aaron Giles
3/***************************************************************************
4
5    parameters.c
6
7    Per-game parameters handling.
8
9***************************************************************************/
10
11#include "emu.h"
12
13parameters_manager::parameters_manager(running_machine &machine)
14   : m_machine(machine)
15{
16}
17
18astring parameters_manager::lookup(astring tag) const
19{
20   return m_parameters.find(tag);
21}
22
23void parameters_manager::add(astring tag, astring value)
24{
25   m_parameters.add(tag, value);
26}
27
trunk/src/emu/parameters.h
r243114r243115
1// license:BSD-3-Clause
2// copyright-holders:Olivier Galibert,Aaron Giles
3/***************************************************************************
4
5    parameters.h
6
7    Per-game parameters handling.
8
9***************************************************************************/
10
11#pragma once
12
13#ifndef __EMU_H__
14#error Dont include this file directly; include emu.h instead.
15#endif
16
17#ifndef __PARAMETERS_H__
18#define __PARAMETERS_H__
19
20
21//**************************************************************************
22//  TYPE DEFINITIONS
23//**************************************************************************
24
25// ======================> parameters_manager
26
27class parameters_manager
28{
29   DISABLE_COPYING(parameters_manager);
30
31public:
32   // construction/destruction
33   parameters_manager(running_machine &machine);
34
35   // getters
36   running_machine &machine() const { return m_machine; }
37   astring lookup(astring tag) const;
38
39   // setters
40   void add(astring tag, astring value);
41
42private:
43   // internal state
44   running_machine &       m_machine;              // reference to owning machine
45   tagmap_t<astring>       m_parameters;
46};
47
48#endif  // __INPTPORT_H__ */
trunk/src/emu/romload.c
r243114r243115
171171const rom_entry *rom_first_region(const device_t &device)
172172{
173173   const rom_entry *romp = device.rom_region();
174   while (romp && ROMENTRY_ISPARAMETER(romp))
175      romp++;
176174   return (romp != NULL && !ROMENTRY_ISEND(romp)) ? romp : NULL;
177175}
178176
r243114r243115
187185   romp++;
188186   while (!ROMENTRY_ISREGIONEND(romp))
189187      romp++;
190   while (ROMENTRY_ISPARAMETER(romp))
191      romp++;
192188   return ROMENTRY_ISEND(romp) ? NULL : romp;
193189}
194190
r243114r243115
222218
223219
224220/*-------------------------------------------------
225    rom_first_parameter - return pointer to the first
226    per-game parameter
227-------------------------------------------------*/
228
229const rom_entry *rom_first_parameter(const device_t &device)
230{
231   const rom_entry *romp = device.rom_region();
232   while (romp && !ROMENTRY_ISEND(romp) && !ROMENTRY_ISPARAMETER(romp))
233      romp++;
234   return (romp != NULL && !ROMENTRY_ISEND(romp)) ? romp : NULL;
235}
236
237
238/*-------------------------------------------------
239    rom_next_parameter - return pointer to the next
240    per-game parameter
241-------------------------------------------------*/
242
243const rom_entry *rom_next_parameter(const rom_entry *romp)
244{
245   romp++;
246   while (!ROMENTRY_ISREGIONEND(romp) && !ROMENTRY_ISPARAMETER(romp))
247      romp++;
248   return ROMENTRY_ISEND(romp) ? NULL : romp;
249}
250
251
252/*-------------------------------------------------
253221    rom_region_name - return the appropriate name
254222    for a rom region
255223-------------------------------------------------*/
r243114r243115
261229
262230
263231/*-------------------------------------------------
264    rom_parameter_name - return the appropriate name
265    for a per-game parameter
266-------------------------------------------------*/
267
268astring &rom_parameter_name(astring &result, const device_t &device, const rom_entry *romp)
269{
270   return device.subtag(result, romp->_name);
271}
272
273
274/*-------------------------------------------------
275    rom_parameter_name - return the value for a
276    per-game parameter
277-------------------------------------------------*/
278
279astring rom_parameter_value(const rom_entry *romp)
280{
281   return romp->_hashdata;
282}
283
284
285/*-------------------------------------------------
286232    rom_file_size - return the expected size of a
287233    file given the ROM description
288234-------------------------------------------------*/
r243114r243115
15081454         rom_region_name(regiontag, *device, region);
15091455         region_post_process(romdata, regiontag, ROMREGION_ISINVERTED(region));
15101456      }
1511
1512   /* and finally register all per-game parameters */
1513   for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
1514      for (const rom_entry *param = rom_first_parameter(*device); param != NULL; param = rom_next_parameter(param))
1515      {
1516         rom_parameter_name(regiontag, *device, param);
1517         romdata->machine().parameters().add(regiontag, rom_parameter_value(param));
1518      }
15191457}
15201458
15211459
trunk/src/emu/romload.h
r243114r243115
3939   ROMENTRYTYPE_IGNORE,        /* this entry continues loading the previous ROM but throws the data away */
4040   ROMENTRYTYPE_SYSTEM_BIOS,   /* this entry specifies a bios */
4141   ROMENTRYTYPE_DEFAULT_BIOS,  /* this entry specifies a default bios */
42   ROMENTRYTYPE_PARAMETER,     /* this entry specifies a per-game parameter */
4342   ROMENTRYTYPE_COUNT
4443};
4544
r243114r243115
153152#define ROMENTRY_ISIGNORE(r)        (ROMENTRY_GETTYPE(r) == ROMENTRYTYPE_IGNORE)
154153#define ROMENTRY_ISSYSTEM_BIOS(r)   (ROMENTRY_GETTYPE(r) == ROMENTRYTYPE_SYSTEM_BIOS)
155154#define ROMENTRY_ISDEFAULT_BIOS(r)  (ROMENTRY_GETTYPE(r) == ROMENTRYTYPE_DEFAULT_BIOS)
156#define ROMENTRY_ISPARAMETER(r)     (ROMENTRY_GETTYPE(r) == ROMENTRYTYPE_PARAMETER)
157#define ROMENTRY_ISREGIONEND(r)     (ROMENTRY_ISREGION(r) || ROMENTRY_ISPARAMETER(r) || ROMENTRY_ISEND(r))
155#define ROMENTRY_ISREGIONEND(r)     (ROMENTRY_ISREGION(r) || ROMENTRY_ISEND(r))
158156
159157/* ----- per-region macros ----- */
160158#define ROMREGION_GETTAG(r)         ((r)->_name)
r243114r243115
245243#define ROM_DEFAULT_BIOS(name)                      { name, NULL, 0, 0, ROMENTRYTYPE_DEFAULT_BIOS },
246244
247245
248/* ----- game parameter macro ----- */
249#define ROM_PARAMETER(tag, value)                   { tag, value, 0, 0, ROMENTRYTYPE_PARAMETER },
250
251246/* ----- disk loading macros ----- */
252247#define DISK_REGION(tag)                            ROM_REGION(1, tag, ROMREGION_DATATYPEDISK)
253248#define DISK_IMAGE(name,idx,hash)                   ROMX_LOAD(name, idx, 0, hash, DISK_READWRITE)
r243114r243115
282277/* ----- ROM iteration ----- */
283278
284279/* return pointer to the first ROM region within a source */
285const rom_entry *rom_first_region(const device_t &device);
280const rom_entry *rom_first_region(const device_t &romp);
286281
287282/* return pointer to the next ROM region within a source */
288283const rom_entry *rom_next_region(const rom_entry *romp);
r243114r243115
299294/* return the appropriate name for a rom region */
300295astring &rom_region_name(astring &result, const device_t &device, const rom_entry *romp);
301296
302/* return pointer to the first per-game parameter */
303const rom_entry *rom_first_parameter(const device_t &device);
304297
305/* return pointer to the next per-game parameter */
306const rom_entry *rom_next_parameter(const rom_entry *romp);
307298
308/* return the appropriate name for a per-game parameter */
309astring &rom_parameter_name(astring &result, const device_t &device, const rom_entry *romp);
310
311/* return the value for a per-game parameter */
312astring rom_parameter_value(const rom_entry *romp);
313
314
315299/* ----- disk handling ----- */
316300
317301/* open a disk image, searching up the parent and loading by checksum */
trunk/src/emu/video/h63484.c
r243114r243115
20012001void h63484_device::device_start()
20022002{
20032003   m_display_cb.bind_relative_to(*owner());
2004   
2005   register_save_state();
20062004}
20072005
20082006//-------------------------------------------------
r243114r243115
21272125   }
21282126   return 0;
21292127}
2130
2131void h63484_device::register_save_state()
2132{
2133   save_item(NAME(m_ar));
2134   save_item(NAME(m_vreg));
2135   save_item(NAME(m_sr));
2136   save_item(NAME(m_fifo));
2137   save_item(NAME(m_fifo_ptr));
2138   save_item(NAME(m_fifo_r));
2139   save_item(NAME(m_fifo_r_ptr));
2140   save_item(NAME(m_cr));
2141   save_item(NAME(m_pr));
2142   save_item(NAME(m_param_ptr));
2143   save_item(NAME(m_rwp));
2144   save_item(NAME(m_rwp_dn));
2145   save_item(NAME(m_org_dpa));
2146   save_item(NAME(m_org_dn));
2147   save_item(NAME(m_org_dpd));
2148   save_item(NAME(m_cl0));
2149   save_item(NAME(m_cl1));
2150   save_item(NAME(m_ccmp));
2151   save_item(NAME(m_mask));
2152   save_item(NAME(m_cpx));
2153   save_item(NAME(m_cpy));
2154   save_item(NAME(m_mwr));
2155   save_item(NAME(m_mwr_chr));
2156   save_item(NAME(m_sar));
2157   save_item(NAME(m_sda));
2158   save_item(NAME(m_pram));
2159   save_item(NAME(m_dn));
2160   save_item(NAME(m_ccr));
2161   save_item(NAME(m_omr));
2162   save_item(NAME(m_edg));
2163   save_item(NAME(m_dcr));
2164   save_item(NAME(m_hc));
2165   save_item(NAME(m_hds));
2166   save_item(NAME(m_hdw));
2167   save_item(NAME(m_hws));
2168   save_item(NAME(m_hww));
2169   save_item(NAME(m_sp));
2170   save_item(NAME(m_hsw));
2171   save_item(NAME(m_vc));
2172   save_item(NAME(m_vws));
2173   save_item(NAME(m_vww));
2174   save_item(NAME(m_vds));
2175   save_item(NAME(m_vsw));
2176   save_item(NAME(m_ppy));
2177   save_item(NAME(m_pzcy));
2178   save_item(NAME(m_ppx));
2179   save_item(NAME(m_pzcx));
2180   save_item(NAME(m_psx));
2181   save_item(NAME(m_pex));
2182   save_item(NAME(m_pzx));
2183   save_item(NAME(m_psy));
2184   save_item(NAME(m_pzy));
2185   save_item(NAME(m_pey));
2186   save_item(NAME(m_xmin));
2187   save_item(NAME(m_ymin));
2188   save_item(NAME(m_xmax));
2189   save_item(NAME(m_ymax));
2190}
trunk/src/emu/video/h63484.h
r243114r243115
107107   void video_registers_w(int offset);
108108   int translate_command(UINT16 data);
109109   void draw_graphics_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int vs, int y, int layer_n, bool active, bool ins_window);
110   
111   void register_save_state();
112110
113111   h63484_display_delegate  m_display_cb;
114112
trunk/src/lib/util/astring.h
r243114r243115
3232   ~astring();
3333
3434   // construction with copy
35   astring(const char *string) { init(); if(string) cpy(string); }
35   astring(const char *string) { init().cpy(string); }
3636   astring(const char *string, int length) { init().cpy(string, length); }
3737   astring(const char *str1, const char *str2) { init().cpy(str1).cat(str2); }
3838   astring(const char *str1, const char *str2, const char *str3) { init().cpy(str1).cat(str2).cat(str3); }
trunk/src/mame/drivers/hikaru.c
r243114r243115
382382#include "emu.h"
383383#include "cpu/sh4/sh4.h"
384384#include "machine/naomicrypt.h"
385#include "machine/315-5881_helper.h"
385386
386387#define CPU_CLOCK (200000000)
387388                           /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */
r243114r243115
571572   /* ic65 unpopulated */
572573   /* ic66 unpopulated */
573574
574   // 834-14149   2000     317-0294-COM   Hikaru
575   ROM_PARAMETER( ":rom_board:segam2crypt:key", "091b02c7" )
575   // 315-5881 security IC key
576   _315_5881_KEYFILE("airtrix-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
576577ROM_END
577578
578579
r243114r243115
609610   ROM_LOAD32_WORD( "mpr-23560.ic65", 0xe000000, 0x1000000, CRC(24bb7072) SHA1(dad5135c89d292e4a1f96bd0ad28be6a17154be0) )
610611   ROM_LOAD32_WORD( "mpr-23564.ic66", 0xe000002, 0x1000000, CRC(255724b6) SHA1(1b382fad165831de3f2e39352c031146759dfc69) )
611612
612   // 834-14144   2001     317-0297-COM   Hikaru
613   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0912c68a" )
613   // 315-5881 security IC key
614   _315_5881_KEYFILE("pharrier-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
614615ROM_END
615616
616617ROM_START( podrace )
r243114r243115
663664   ROM_LOAD32_WORD("mpr-23117.ic68s" , 0xf000002, 0x0800000, CRC(9d4d3529) SHA1(66008445629681ebf2f26b3f181d8524a8576d2f))
664665
665666   // current 315-5881 decryption simulation code can't produce valid output data with any of keys
666   // 834-14002   2001     317-0277-COM   Hikaru
667   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0903dad5" )
667   ROM_REGION( 4, "rom_key", ROMREGION_ERASE00 )
668668ROM_END
669669
670670ROM_START( braveff )
r243114r243115
708708   ROM_LOAD32_WORD( "mpr-22022.ic59s", 0xb000000, 0x800000, CRC(abd3d888) SHA1(9654c3a38feab46b4983a602831fb29cccdd0526) )
709709   ROM_LOAD32_WORD( "mpr-22023.ic60s", 0xb000002, 0x800000, CRC(07f00869) SHA1(92282d09d72d3e65a91128e06bb0d4426bb90be5) )
710710
711   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0" ) // 315-5881 not populated
711   // 315-5881 not populated
712   _315_5881_UNUSED
712713ROM_END
713714
714715ROM_START( sgnascar )
trunk/src/mame/drivers/model2.c
r243114r243115
28422842   ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
28432843   ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
28442844
2845   //             1997     317-5038-COM   Model 2
2846   ROM_PARAMETER( ":315_5881:key", "042c0d13" )
2847
28482845   MODEL2_CPU_BOARD
28492846   MODEL2A_VID_BOARD
28502847ROM_END
r243114r243115
28772874   ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
28782875   ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
28792876
2880   //             1997     317-5038-COM   Model 2
2881   ROM_PARAMETER( ":315_5881:key", "042c0d13" )
2882
28832877   MODEL2_CPU_BOARD
28842878   MODEL2A_VID_BOARD
28852879ROM_END
r243114r243115
29112905   ROM_REGION( 0x400000, "scsp", 0 ) // Samples
29122906   ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
29132907   ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
2914
2915   //             1997     317-5038-COM   Model 2
2916   ROM_PARAMETER( ":315_5881:key", "042c0d13" )
29172908ROM_END
29182909
29192910ROM_START( zerogunj ) /* Zero Gunner (Japan), Model 2B */
r243114r243115
29432934   ROM_REGION( 0x400000, "scsp", 0 ) // Samples
29442935   ROM_LOAD("mpr-20303.32", 0x000000, 0x200000, CRC(c040973f) SHA1(57a496c5dcc1a3931b6e41bf8d41e45d6dac0c31) )
29452936   ROM_LOAD("mpr-20304.33", 0x200000, 0x200000, CRC(6decfe83) SHA1(d73adafceff2f1776c93e53bd5677d67f1c2c08f) )
2946
2947   //             1997     317-5038-COM   Model 2
2948   ROM_PARAMETER( ":315_5881:key", "042c0d13" )
29492937ROM_END
29502938
29512939ROM_START( gunblade ) /* Gunblade NY Revision A, Model 2B, Sega game ID# 833-12562 GUN BLADE, Sega ROM board ID# 834-12563 */
r243114r243115
36813669   ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) )
36823670   ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) )
36833671
3684   //             1998     317-0236-COM   Model 2
3685   ROM_PARAMETER( ":315_5881:key", "0c2a4a93" )
3686
36873672   MODEL2_CPU_BOARD
36883673   MODEL2A_VID_BOARD
36893674ROM_END
r243114r243115
37323717   ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) )
37333718   ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) )
37343719
3735   //             1998     317-0236-COM   Model 2
3736   ROM_PARAMETER( ":315_5881:key", "0c2a4a93" )
3737
37383720   MODEL2_CPU_BOARD
37393721   MODEL2A_VID_BOARD
37403722ROM_END
r243114r243115
37823764   ROM_LOAD("mpr-20813.32", 0x200000, 0x200000, CRC(1908679c) SHA1(32913385f09da2e43af0c4a4612b955527bfe759) )
37833765   ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) )
37843766   ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) )
3785
3786   //             1998     317-0236-COM   Model 2
3787   ROM_PARAMETER( ":315_5881:key", "0c2a4a93" )
37883767ROM_END
37893768
37903769ROM_START( dyndeka2b ) /* Dynamite Deka 2 (Japan), Model 2B */
r243114r243115
38303809   ROM_LOAD("mpr-20813.32", 0x200000, 0x200000, CRC(1908679c) SHA1(32913385f09da2e43af0c4a4612b955527bfe759) )
38313810   ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) )
38323811   ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) )
3833
3834   //             1998     317-0236-COM   Model 2
3835   ROM_PARAMETER( ":315_5881:key", "0c2a4a93" )
38363812ROM_END
38373813
38383814ROM_START( dynamcopc ) /* Dynamite Cop (USA), Model 2C */
r243114r243115
38783854   ROM_LOAD("mpr-20813.32", 0x200000, 0x200000, CRC(1908679c) SHA1(32913385f09da2e43af0c4a4612b955527bfe759) ) /* Located at position 33 on 2C-CRX rom board */
38793855   ROM_LOAD("mpr-20814.36", 0x400000, 0x200000, CRC(e8ebc74c) SHA1(731ce721bb9e148f3a9f7fbe569522567a681c4e) ) /* Located at position 34 on 2C-CRX rom board */
38803856   ROM_LOAD("mpr-20815.37", 0x600000, 0x200000, CRC(1b5aaae4) SHA1(32b4bf6c096fdccdd5d8f1ddb6c27d3389a52234) ) /* Located at position 35 on 2C-CRX rom board */
3881
3882   //             1998     317-0236-COM   Model 2
3883   ROM_PARAMETER( ":315_5881:key", "0c2a4a93" )
38843857ROM_END
38853858
38863859ROM_START( schamp ) /* Sonic Championship, Model 2B - Sega ROM board ID# 834-12786 */
r243114r243115
44234396   ROM_LOAD("mpr-21279.sd3", 0x0400000, 0x200000, CRC(3a8dcf68) SHA1(312496b45b699051c8b4dd0e5d94e73fe5f3ad8d) )
44244397   ROM_LOAD("mpr-21280.sd4", 0x0600000, 0x200000, CRC(aa548124) SHA1(a94adfe16b5c3236746451c181ccd3e1c27432f4) )
44254398
4426   //             1998     317-5044-COM   Model 2
4427   ROM_PARAMETER( ":315_5881:key", "042e2dc1" )
4428
44294399   MODEL2_CPU_BOARD
44304400   MODEL2A_VID_BOARD
44314401ROM_END
r243114r243115
44654435   ROM_LOAD("mpr-21278.sd2", 0x0200000, 0x200000, CRC(27e18e08) SHA1(254c0ad4d6bd572ff0efc3ea80489e73716a31a7) )
44664436   ROM_LOAD("mpr-21279.sd3", 0x0400000, 0x200000, CRC(3a8dcf68) SHA1(312496b45b699051c8b4dd0e5d94e73fe5f3ad8d) )
44674437   ROM_LOAD("mpr-21280.sd4", 0x0600000, 0x200000, CRC(aa548124) SHA1(a94adfe16b5c3236746451c181ccd3e1c27432f4) )
4468
4469   //             1998     317-5044-COM   Model 2
4470   ROM_PARAMETER( ":315_5881:key", "042e2dc1" )
44714438ROM_END
44724439
44734440ROM_START( indy500 ) /* Defaults to Twin (Stand Alone) Cab version.  2 credits to start - Can be set to Deluxe setting in service mode, Sega Game ID# 833-12361, ROM board ID# 834-12362 */
r243114r243115
60015968ROM_END
60025969
60035970DRIVER_INIT_MEMBER(model2_state,genprot)
6004{   
6005   astring key = parameter(":315_5881:key");
5971{
5972   
5973   INT64 key = get_315_5881_key(machine());
60065974
6007   if (key)
5975   if (key != -1)
60085976   {
60095977      m_maincpu->space(AS_PROGRAM).install_ram(0x01d80000, 0x01d8ffff);
60105978      m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01d90000, 0x01d9ffff, read32_delegate(FUNC(model2_state::model2_5881prot_r), this), write32_delegate(FUNC(model2_state::model2_5881prot_w), this));
5979      m_cryptdevice->set_key(key);
60115980   }
60125981   else
60135982   {
trunk/src/mame/drivers/model3.c
r243114r243115
34373437
34383438   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
34393439   ROM_FILL( 0x000000, 0x80000, 0 )
3440
3441   //             ????     317-0237-COM   Model 3
3442   ROM_PARAMETER( ":315_5881:key", "09234e96" )
34433440ROM_END
34443441
34453442ROM_START( vs29815 )    /* Step 1.5, ROM board ID# 834-13495 VS2 VER98 STEP 1.5 */
r243114r243115
35903587
35913588   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
35923589   ROM_FILL( 0x000000, 0x80000, 0 )
3593
3594   //             ????     317-0245-COM   Model 3
3595   ROM_PARAMETER( ":315_5881:key", "09222ac8" )
35963590ROM_END
35973591
35983592ROM_START( vs299b ) /* Step 2.0 */
r243114r243115
36683662
36693663   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
36703664   ROM_FILL( 0x000000, 0x80000, 0 )
3671
3672   //             ????     317-0245-COM   Model 3
3673   ROM_PARAMETER( ":315_5881:key", "09222ac8" )
36743665ROM_END
36753666
36763667ROM_START( vs299a ) /* Step 2.0 */
r243114r243115
37463737
37473738   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
37483739   ROM_FILL( 0x000000, 0x80000, 0 )
3749
3750   //             ????     317-0245-COM   Model 3
3751   ROM_PARAMETER( ":315_5881:key", "09222ac8" )
37523740ROM_END
37533741
37543742ROM_START( vs299 )  /* Step 2.0 */
r243114r243115
38243812
38253813   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
38263814   ROM_FILL( 0x000000, 0x80000, 0 )
3827
3828   //             ????     317-0245-COM   Model 3
3829   ROM_PARAMETER( ":315_5881:key", "09222ac8" )
38303815ROM_END
38313816
38323817ROM_START( von2 )   /* Step 2.0 */
r243114r243115
39033888
39043889   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
39053890   ROM_FILL( 0x000000, 0x80000, 0 )
3906
3907   //             ????     317-0234-COM   Model 3
3908   ROM_PARAMETER( ":315_5881:key", "092a0e97" )
39093891ROM_END
39103892
39113893ROM_START( von254g )    /* Step 2.0, Sega game ID# is 833-13789 */
r243114r243115
39823964
39833965   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
39843966   ROM_FILL( 0x000000, 0x80000, 0 )
3985
3986   //             ????     317-0234-COM   Model 3
3987   ROM_PARAMETER( ":315_5881:key", "092a0e97" )
39883967ROM_END
39893968
39903969ROM_START( skichamp )   /* Step 2.0 */
r243114r243115
41294108
41304109   ROM_REGION( 0x10000, "ffcpu", 0 )   /* force feedback controller prg */
41314110   ROM_LOAD( "epr21119.ic8",  0x00000, 0x10000, CRC(65082b14) SHA1(6c3c192dd6ef3780c6202dd63fc6086328928818) )
4132
4133   //             ????     317-0241-COM   Model 3
4134   ROM_PARAMETER( ":315_5881:key", "11272a01" )
41354111ROM_END
41364112
41374113ROM_START( swtrilgya )  /* Step 2.1, Sega game ID# is 833-13586, ROM board ID# 834-13587 STAR WARS TRILOGY, Security board ID# 837-13588-COM */
r243114r243115
42014177
42024178   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
42034179   ROM_FILL( 0x000000, 0x80000, 0 )
4204
4205   //             ????     317-0241-COM   Model 3
4206   ROM_PARAMETER( ":315_5881:key", "11272a01" )
42074180ROM_END
42084181
42094182ROM_START( dirtdvls )   /* Step 2.1, Sega game ID# is 833-13427, ROM board ID# 834-13528 DRT */
r243114r243115
42654238
42664239   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
42674240   ROM_FILL( 0x000000, 0x80000, 0 )
4268
4269   //             ????     317-0238-COM   Model 3
4270   ROM_PARAMETER( ":315_5881:key", "09290f17" )
42714241ROM_END
42724242
42734243ROM_START( dirtdvlsa )  /* Step 2.1 */
r243114r243115
43294299
43304300   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
43314301   ROM_FILL( 0x000000, 0x80000, 0 )
4332
4333   //             ????     317-0238-COM   Model 3
4334   ROM_PARAMETER( ":315_5881:key", "09290f17" )
43354302ROM_END
43364303
43374304ROM_START( daytona2 )   /* Step 2.1, ROM board ID# 834-13428 DAYTONA USA2, Security board ID# 837-13507-COM */
r243114r243115
44124379
44134380   ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
44144381   ROM_LOAD( "epr-20985.bin", 0x000000, 0x010000, CRC(b139481d) SHA1(05fca7db7c8b084c53bd157ba3e8296f1a961a99) )
4415
4416   //             ????     317-0239-COM   Model 3
4417   ROM_PARAMETER( ":315_5881:key", "09250e16" )
44184382ROM_END
44194383
44204384ROM_START( dayto2pe )   /* Step 2.1, Sega game ID# is 833-13610 DAYTONA USA2 SP, ROM board ID# 834-13609 DAYTONA USA2 SP, Security board ID# 837-13645-COM */
r243114r243115
44954459
44964460   ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
44974461   ROM_LOAD( "epr-20985.bin", 0x000000, 0x010000, CRC(b139481d) SHA1(05fca7db7c8b084c53bd157ba3e8296f1a961a99) )
4498
4499   //             ????     317-5045-COM   Model 3
4500   ROM_PARAMETER( ":315_5881:key", "0" ) // unknown
45014462ROM_END
45024463
45034464ROM_START( srally2 )    /* Step 2.0, Sega game ID# is 833-13373, ROM board ID# 834-13374 SRT TWIN */
r243114r243115
48504811
48514812   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
48524813   ROM_FILL( 0x000000, 0x80000, 0 )
4853
4854   //             ????     317-0235-COM   Model 3
4855   ROM_PARAMETER( ":315_5881:key", "09260e96" )
48564814ROM_END
48574815
48584816ROM_START( spikeout )   /* Step 2.1 */
r243114r243115
49304888
49314889   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
49324890   ROM_FILL( 0x000000, 0x80000, 0 )
4933
4934   //             ????     317-0240-COM   Model 3
4935   ROM_PARAMETER( ":315_5881:key", "092f2b04" )
49364891ROM_END
49374892
49384893ROM_START( spikeofe )   /* Step 2.1, Sega game ID# is 833-13746, ROM board ID# 834-13747 SPK F/E, Security board ID# 837-13726-COM */
r243114r243115
50104965
50114966   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
50124967   ROM_FILL( 0x000000, 0x80000, 0 )
5013
5014   //             ????     317-0247-COM   Model 3
5015   ROM_PARAMETER( ":315_5881:key", "09236fc8" )
50164968ROM_END
50174969
50184970ROM_START( eca )    /* Step 2.1, ROM board ID# 834-13946-01 ECA */
r243114r243115
50815033
50825034   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
50835035   ROM_FILL( 0x000000, 0x80000, 0 )
5084
5085   //             ????     317-0265-COM   Model 3
5086   ROM_PARAMETER( ":315_5881:key", "0923aa91" )
50875036ROM_END
50885037
50895038ROM_START( ecax )   /* Step 2.1 */
r243114r243115
51525101
51535102   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
51545103   ROM_FILL( 0x000000, 0x80000, 0 )
5155
5156   //             ????     317-0265-COM   Model 3
5157   ROM_PARAMETER( ":315_5881:key", "0923aa91" )
51585104ROM_END
51595105
51605106ROM_START( ecap )   /* Step 2.1 - Proto or Location test - No security dongle */
r243114r243115
52265172
52275173   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
52285174   ROM_FILL( 0x000000, 0x80000, 0 )
5229
5230   //             ????     317-0265-COM   Model 3
5231   ROM_PARAMETER( ":315_5881:key", "0923aa91" )
52325175ROM_END
52335176
52345177ROM_START( magtruck )   /* Step 2.1, Sega game ID# is 833-13601-01 (Export), ROM board ID# 834-13600-01 RCS EXP (Export), Security board ID# 837-13599-COM */
r243114r243115
52855228
52865229   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
52875230   ROM_FILL( 0x000000, 0x80000, 0 )
5288
5289   //             ????     317-0243-COM   Model 3
5290   ROM_PARAMETER( ":315_5881:key", "09266e45" )
52915231ROM_END
52925232
52935233ROM_START( oceanhun )   /* Step 2.0, Sega game ID# is 833-13571, ROM board ID# 834-13572 THE OCEAN HUNTER, 317-0242-COM security chip (837-13576-COM security board) */
r243114r243115
53565296
53575297   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
53585298   ROM_FILL( 0x000000, 0x80000, 0 )
5359
5360   //             ????     317-0242-COM   Model 3
5361   ROM_PARAMETER( ":315_5881:key", "092b6a01" )
53625299ROM_END
53635300
53645301ROM_START( lamachin )   /* Step 2.0, Sega game ID# is 833-13664, ROM board ID# 834-13665 L.A.MACHINEGUNS, 317-0244-COM security chip (837-13666-COM security board) */
r243114r243115
54285365
54295366   ROM_REGION( 0x80000, "scsp2", 0 )   /* second SCSP's RAM */
54305367   ROM_FILL( 0x000000, 0x80000, 0 )
5431
5432   //             ????     317-0244-COM   Model 3
5433   ROM_PARAMETER( ":315_5881:key", "092a2bc5" )
54345368ROM_END
54355369
54365370/* Model 3 sound board emulation */
r243114r243115
57325666
57335667DRIVER_INIT_MEMBER(model3_state, genprot)
57345668{
5735   astring key = parameter(":315_5881:key");
5669   INT64 key = get_315_5881_key(machine());
57365670
57375671   m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0, 0x0e000000);
57385672
5739   if (key)
5673   if (key != -1)
57405674   {
5675      m_cryptdevice->set_key(key);
57415676      m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) );                   
57425677   }
57435678   else
trunk/src/mame/drivers/naomi.c
r243114r243115
15101510#include "includes/dc.h"
15111511#include "includes/naomi.h"
15121512#include "machine/naomicrypt.h"
1513#include "machine/315-5881_helper.h"
15131514
15141515#define CPU_CLOCK (200000000)
15151516
r243114r243115
26622663 */
26632664
26642665static MACHINE_CONFIG_DERIVED( naomim2, naomi_base )
2665   MCFG_NAOMI_M2_BOARD_ADD("rom_board", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
2666   MCFG_NAOMI_M2_BOARD_ADD("rom_board", ":315_5881key", "naomibd_eeprom", ":boardid", WRITE8(dc_state, g1_irq))
26662667MACHINE_CONFIG_END
26672668
26682669/*
r243114r243115
31053106   ROM_LOAD("mpr-23208.ic11", 0x5800000, 0x0800000, CRC(b9494f4b) SHA1(2f35b25edf5210a82d4b67e639eeae11440d065a) )
31063107   ROM_LOAD("mpr-23209.ic12s",0x6000000, 0x0800000, CRC(560188c0) SHA1(77f14c9a031c6e5414ffa854d20c40115361d715) )
31073108
3108   // 841-0012    2000     317-5060-COM   Naomi
3109   ROM_PARAMETER( "rom_board:segam2crypt:key", "000e2010" )
3109   _315_5881_KEYFILE("cspike-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
31103110ROM_END
31113111
31123112/*
r243114r243115
31493149   ROM_LOAD( "mpr-23509.ic6", 0x5800000, 0x1000000, CRC(281d633d) SHA1(d773be8e95f7bf9212ee1061f3076220d4fce9e0) )
31503150   ROM_LOAD( "mpr-23510.ic7", 0x6800000, 0x1000000, CRC(b856fef5) SHA1(0634f86740c438b40286256a0269570d24cb845a) )
31513151
3152   // 841-0011    2000     317-5059-COM   Naomi
3153   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00000000" )
3152   _315_5881_KEYFILE("capsnk-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
31543153ROM_END
31553154
31563155// ver 000804
r243114r243115
31683167   ROM_LOAD( "mpr-23509.ic6", 0x5800000, 0x1000000, CRC(281d633d) SHA1(d773be8e95f7bf9212ee1061f3076220d4fce9e0) )
31693168   ROM_LOAD( "mpr-23510.ic7", 0x6800000, 0x1000000, CRC(b856fef5) SHA1(0634f86740c438b40286256a0269570d24cb845a) )
31703169
3171   // 841-0011    2000     317-5059-COM   Naomi
3172   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00000000" )
3170   _315_5881_KEYFILE("capsnk-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
31733171ROM_END
31743172
31753173// ver 000802
r243114r243115
31873185   ROM_LOAD( "mpr-23509.ic6", 0x5800000, 0x1000000, CRC(281d633d) SHA1(d773be8e95f7bf9212ee1061f3076220d4fce9e0) )
31883186   ROM_LOAD( "mpr-23510.ic7", 0x6800000, 0x1000000, CRC(b856fef5) SHA1(0634f86740c438b40286256a0269570d24cb845a) )
31893187
3190   // 841-0011    2000     317-5059-COM   Naomi
3191   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00000000" )
3188   _315_5881_KEYFILE("capsnk-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
31923189ROM_END
31933190
31943191/*
r243114r243115
32283225   ROM_LOAD("mpr-23426.ic7",   0x3800000, 0x0800000, CRC(7f91b13f) SHA1(2d534f77291ebfedc011bf0e803a1b9243fb477f) )
32293226   ROM_LOAD("mpr-23427.ic8",   0x4000000, 0x0800000, CRC(5851d525) SHA1(1cb1073542d75a3bcc0d363ed31d49bcaf1fd494) )
32303227
3231   // 840-0044    2000     317-0289-COM   Naomi
3232   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08103347" )
3228   _315_5881_KEYFILE("csmash-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
32333229ROM_END
32343230
32353231ROM_START( csmasho )
r243114r243115
32473243   ROM_LOAD("mpr-23426.ic7", 0x3800000, 0x0800000, CRC(7f91b13f) SHA1(2d534f77291ebfedc011bf0e803a1b9243fb477f) )
32483244   ROM_LOAD("mpr-23427.ic8", 0x4000000, 0x0800000, CRC(5851d525) SHA1(1cb1073542d75a3bcc0d363ed31d49bcaf1fd494) )
32493245
3250   // 840-0044    2000     317-0289-COM   Naomi
3251   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08103347" )
3246   _315_5881_KEYFILE("csmasho-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
32523247ROM_END
32533248
32543249/*
r243114r243115
32773272   ROM_LOAD("mpr-23522.ic9", 0x4800000, 0x0800000, CRC(7ae6716e) SHA1(658b794ae6e3898885524582a207faa1076a65ca) )
32783273   ROM_LOAD("mpr-23523.ic10",0x5000000, 0x0800000, CRC(c91efb67) SHA1(3d79870551310da7a641858ffec3840714e9cc22) )
32793274
3280   // 841-0016    2000     317-5066-COM   Naomi
3281   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000b64d0" )
3275   _315_5881_KEYFILE("deathcox-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
32823276ROM_END
32833277
32843278/*
r243114r243115
33433337   ROM_LOAD("mpr-22119.ic20s",0xa000000, 0x0800000, CRC(d608fa86) SHA1(54c8107cccec8cbb536f13cda5b220b7972190b7) )
33443338   ROM_LOAD("mpr-22120.ic21s",0xa800000, 0x0800000, CRC(a30facb4) SHA1(70415ca34095c795297486bce1f956f6a8d4817f) )
33453339
3346   // 841-0003    1999     317-5048-COM   Naomi
3347   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" )
3340   _315_5881_KEYFILE("doa2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
33483341
33493342   // on-cart X76F100 eeprom contents
33503343   ROM_REGION( 0x84, "naomibd_eeprom", 0 )
r243114r243115
34153408   ROM_LOAD("mpr-22119.ic20s",0xa000000, 0x0800000, CRC(d608fa86) SHA1(54c8107cccec8cbb536f13cda5b220b7972190b7) )
34163409   ROM_LOAD("mpr-22120.ic21s",0xa800000, 0x0800000, CRC(a30facb4) SHA1(70415ca34095c795297486bce1f956f6a8d4817f) )
34173410
3418   // 841-0003    1999     317-5048-COM   Naomi
3419   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0008ad01" )
3411   _315_5881_KEYFILE("doa2m-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
34203412
34213413   // on-cart X76F100 eeprom contents
34223414   ROM_REGION( 0x84, "naomibd_eeprom", 0 )
r243114r243115
34723464   ROM_LOAD("mpr-22097.ic13s", 0x6800000, 0x0800000, CRC(f1dedac5) SHA1(9d4499cbafe80dd0b36be617de7994a96e1e9a01) )
34733465   ROM_LOAD("mpr-22098.ic14s", 0x7000000, 0x0800000, CRC(f9824d2e) SHA1(f20f8cc2b1bef9077ede1cb874da8f2a335d39de) )
34743466
3475   // 840-0016    1999     317-0262-JPN   Naomi
3476   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080fee35" )
3467   _315_5881_KEYFILE("derbyoc-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
34773468ROM_END
34783469
34793470ROM_START( derbyocw )
r243114r243115
34903481   ROM_LOAD( "mpr-22337.ic6", 0x5800000, 0x1000000, CRC(87ca3a2f) SHA1(2ffc01597107eb60dfa7aa49d51f203b51a44334) )
34913482   ROM_LOAD( "mpr-22338.ic7", 0x6800000, 0x1000000, CRC(4bda7303) SHA1(db27d91ef811d741cfdb5c0196e61be722c2f5bd) )
34923483
3493   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3484   _315_5881_UNUSED_OR_UNKNOWN
34943485ROM_END
34953486
34963487ROM_START( drbyocwc )
r243114r243115
35073498   ROM_LOAD( "mpr-22333.ic6", 0x5800000, 0x1000000, CRC(96f324aa) SHA1(bc41e2097c1841771d786ba9ad1a31df1494a856) )
35083499   ROM_LOAD( "mpr-22334.ic7", 0x6800000, 0x1000000, CRC(5389b05a) SHA1(e206e4d82d7b1a59c33043ec0812eb69be08d9b3) )
35093500
3510   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3501   _315_5881_UNUSED_OR_UNKNOWN
35113502ROM_END
35123503
35133504/*
r243114r243115
35353526   ROM_LOAD( "mpr-22304.ic10", 0x9800000, 0x1000000, CRC(46c1fb1f) SHA1(6daca76a75df3501f77e473eb065d48804fcc64a) )
35363527   ROM_LOAD( "mpr-22305.ic11", 0xa800000, 0x1000000, CRC(027d0e7b) SHA1(e3c874e60cabb6f9ce686696d9055a0c0d5289ae) )
35373528
3538   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3529   _315_5881_UNUSED_OR_UNKNOWN
35393530ROM_END
35403531
35413532/*
r243114r243115
36143605   ROM_LOAD("mpr-21573.ic20s", 0xa000000, 0x0800000, CRC(5d822e63) SHA1(8412980b288531c294d5cf9a6394aa0b9503d7df) )
36153606   ROM_LOAD("mpr-21574.ic21s", 0xa800000, 0x0800000, CRC(d794a42c) SHA1(a79c7818c6ec993e718494b1d5407eb270a29abe) )
36163607
3617   // 840-0001    1998     317-0246-JPN   Naomi
3618   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080e6ae1" )
3608   _315_5881_KEYFILE("dynabbnao-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
36193609ROM_END
36203610
36213611/*
r243114r243115
36783668   ROM_LOAD("mpr-22139.ic18s", 0x9000000, 0x0800000, CRC(92faa2ca) SHA1(4953f0219c3ae62de0a89473cb7b9dd30b33fcfb) )
36793669   ROM_LOAD("mpr-22140.ic19s", 0x9800000, 0x0800000, CRC(4cb54893) SHA1(a99b39cc3c82c3cf90f794bb8c8ba60638a6f921) )
36803670
3681   // 840-0019    1999     317-0269-JPN   Naomi
3682   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0804ae71" )
3671   _315_5881_KEYFILE("dyb99-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
36833672ROM_END
36843673
36853674ROM_START( smlg99 )
r243114r243115
37113700   ROM_LOAD( "mpr-22057.ic20s", 0xa000000, 0x800000, CRC(a056c109) SHA1(637e80c2d605851265430b0fa771a4ad5233be8a) )
37123701   ROM_LOAD( "mpr-22058.ic21s", 0xa800000, 0x800000, CRC(f16edaa0) SHA1(e093f5594df43c592a9acd45002ecc65035c2435) )
37133702
3714   // 840-0012    1999     317-0259-COM   Naomi
3715   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08048a01" )
3703   _315_5881_KEYFILE("sml99-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
37163704ROM_END
37173705
37183706/*
r243114r243115
37533741   ROM_LOAD("mpr-21900.ic20s", 0xa000000, 0x0800000, CRC(81901130) SHA1(1573b5c4360e29ba1a4b4901af49d5399fa1e635) )
37543742   ROM_LOAD("mpr-21901.ic21s", 0xa800000, 0x0800000, CRC(266a3eea) SHA1(795ecc5589a0152b9cf1e03e454ed1ea01501942) )
37553743
3756   // 834-13842   1999     317-0254-COM   Naomi
3757   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080e8f84" )
3744   _315_5881_KEYFILE("f355-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
37583745
37593746   ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
37603747   ROM_LOAD( "epr-21867.bin", 0x000000, 0x010000, CRC(4f93a2a0) SHA1(875907e7fcfc44850e2c60c12268ac61c742f217) )
r243114r243115
37883775   ROM_LOAD( "mpr-22846.ic20s", 0xa000000, 0x800000, CRC(d4148f39) SHA1(b6598ce52bcaa42805c581de326c953d27c1b2b4) )
37893776   ROM_LOAD( "mpr-22847.ic21s", 0xa800000, 0x800000, CRC(955ad42e) SHA1(e396ca02b5786557434632c4fac56af3a4a9f8ce) )
37903777
3791   // 834-13950   1999     317-0267-COM   Naomi
3792   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0806efd4" )
3778   _315_5881_KEYFILE("f355twin-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
37933779ROM_END
37943780
37953781// There is also a development cart (171-7885A). Content is the same.
r243114r243115
38213807   ROM_LOAD( "mpr-23397.ic20s", 0xa000000, 0x800000, CRC(28d2caf6) SHA1(67a3bc19abccf7f211c3aae67e751815857bd564) )
38223808   ROM_LOAD( "mpr-23398.ic21s", 0xa800000, 0x800000, CRC(ea4d4d2a) SHA1(3dc9c7164516ae7f3b988c088ab819d8fd40d75e) )
38233809
3824   // 840-0042    2001     317-0287-COM   Naomi
3825   ROM_PARAMETER( ":rom_board:segam2crypt:key", "081666c6" )
3810   _315_5881_KEYFILE("f355twn2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
38263811ROM_END
38273812
38283813ROM_START( alpiltdx )
r243114r243115
38433828   ROM_LOAD( "mpr-21737.ic10", 0x5000000, 0x800000, CRC(260aaa98) SHA1(d1082587afe9d79f286df8b107a553ee51c27643) )
38443829   ROM_LOAD( "mpr-21738.ic11", 0x5800000, 0x800000, CRC(95a592e8) SHA1(862dce467e8805381bab001df68262f1baf3c498) )
38453830
3846   // 834-?????   1999     317-0251-COM   Naomi
3847   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08070e41" )
3831   _315_5881_KEYFILE("alpltdx-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
38483832
38493833   // on-cart X76F100 eeprom contents
38503834   ROM_REGION( 0x84, "naomibd_eeprom", 0 )
r243114r243115
38693853   ROM_LOAD( "mpr-21737.ic10", 0x5000000, 0x800000, CRC(260aaa98) SHA1(d1082587afe9d79f286df8b107a553ee51c27643) )
38703854   ROM_LOAD( "mpr-21738.ic11", 0x5800000, 0x800000, CRC(95a592e8) SHA1(862dce467e8805381bab001df68262f1baf3c498) )
38713855
3872   // 840-0005    1999     317-0251-COM   Naomi
3873   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08070e41" )
3856   _315_5881_KEYFILE("alpilota-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
38743857ROM_END
38753858
38763859ROM_START( hotd2 )
r243114r243115
39043887   ROM_LOAD( "mpr-21404.ic19s", 0x9800000, 0x800000, CRC(6cf6e705) SHA1(68d7e9becefe27b556e0c5d7ba00efd2d1fb71ca) )
39053888   ROM_LOAD( "mpr-21405.ic20s", 0xa000000, 0x800000, CRC(495e6265) SHA1(57936367fec0000691641525682fb8aefc4e4f56) )
39063889
3907   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3890   _315_5881_UNUSED_OR_UNKNOWN
39083891ROM_END
39093892
39103893ROM_START( hotd2o )
r243114r243115
39383921   ROM_LOAD( "mpr-21404.ic19s", 0x9800000, 0x800000, CRC(6cf6e705) SHA1(68d7e9becefe27b556e0c5d7ba00efd2d1fb71ca) )
39393922   ROM_LOAD( "mpr-21405.ic20s", 0xa000000, 0x800000, CRC(495e6265) SHA1(57936367fec0000691641525682fb8aefc4e4f56) )
39403923
3941   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3924   _315_5881_UNUSED_OR_UNKNOWN
39423925ROM_END
39433926
39443927ROM_START( hotd2p )
r243114r243115
39723955   ROM_LOAD( "mpr-21404.ic19s", 0x9800000, 0x800000, CRC(6cf6e705) SHA1(68d7e9becefe27b556e0c5d7ba00efd2d1fb71ca) )
39733956   ROM_LOAD( "mpr-21405.ic20s", 0xa000000, 0x800000, CRC(495e6265) SHA1(57936367fec0000691641525682fb8aefc4e4f56) )
39743957
3975   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
3958   _315_5881_UNUSED_OR_UNKNOWN
39763959ROM_END
39773960
39783961/*
r243114r243115
40073990   ROM_LOAD("mpr-21830.ic10", 0x5000000, 0x0800000, CRC(e01ceb86) SHA1(dd5703d7712cfc0053bddfff63e78dda372b6ff2) )
40083991   ROM_LOAD("mpr-21831.ic11", 0x5800000, 0x0800000, CRC(751848d0) SHA1(9c2267fd3c6f9ea5f2679bb2ca20d511a49b2845) )
40093992
4010   // 840-0007    1999     317-0253-JPN   Naomi
4011   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08074a61" )
3993   _315_5881_KEYFILE("ggram2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
40123994ROM_END
40133995
40143996/*
r243114r243115
40964078   ROM_REGION( 0x84, "naomibd_eeprom", 0 )
40974079   ROM_LOAD( "x76f100.ic37", 0x000000, 0x000084, CRC(c79251d5) SHA1(3e70bbbb6d28bade7eec7e27d716463045656f98) )
40984080
4099   // 840-0008    1999     317-0255-JPN   Naomi
4100   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08028ea5" )
4081   _315_5881_KEYFILE("tduno-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
41014082ROM_END
41024083
41034084ROM_START( tduno2 )
r243114r243115
41514132   ROM_LOAD( "mpr-24281.ic6",  0x5800000, 0x1000000, CRC(39133c32) SHA1(09ea8c1a98ba0fac36e18ae14ed5302feaeb89ca) )
41524133   ROM_LOAD( "mpr-24282.ic7",  0x6800000, 0x1000000, CRC(9aa4ad5a) SHA1(2d81f99a579477c5db725f71c51f18afc15abce7) )
41534134
4154   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown // or M1?
4135   _315_5881_UNUSED_OR_UNKNOWN // or M1?
41554136ROM_END
41564137
41574138ROM_START( crackndj )
r243114r243115
41714152   ROM_LOAD( "mpr-23533.ic9",  0x8800000, 0x1000000, CRC(fc909c00) SHA1(9cf22a97ea272c4586f3942aefdb803bd0e6ede7) )
41724153   ROM_LOAD( "mpr-23534.ic10", 0x9800000, 0x1000000, CRC(62ed85b6) SHA1(b88336bc6115c92a839981cb0c0d0a67b1f7eda5) )
41734154
4174   // 840-0043    2000     317-0288-COM   Naomi
4175   ROM_PARAMETER( ":rom_board:segam2crypt:key", "081c2347" )
4155   _315_5881_KEYFILE("crackndj-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
41764156ROM_END
41774157
41784158ROM_START( crakndj2 )
r243114r243115
42054185   ROM_LOAD( "rom19.ic19s",  0x9800000, 0x800000, CRC(31f816ba) SHA1(354f8271eef20eb131f83fb9641002cfcd31c8cd) )
42064186   ROM_LOAD( "rom20.ic20s",  0xa000000, 0x800000, CRC(aabcd580) SHA1(9455e218ab381c7ad5adb2884da39ca7948169d5) )
42074187
4208   // 840-0068    2001     317-0311-COM   Naomi
4209   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08428247" )
4188   _315_5881_KEYFILE("crackndj2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
42104189ROM_END
42114190
42124191ROM_START( samba2k )
r243114r243115
42274206   ROM_LOAD( "mpr-23598.ic10", 0x09800000, 0x1000000, CRC(e06ee3dd) SHA1(21985e45e1ab5e3a79dd52492a582324a1a36d56) )
42284207   ROM_LOAD( "mpr-23599.ic11", 0x0a800000, 0x1000000, CRC(1fd2e792) SHA1(6f299e527be529f85d0e8b4ce0e7a06ac0d25fe9) )
42294208
4230   // 840-0047    2000     317-0295-COM   Naomi
4231   ROM_PARAMETER( ":rom_board:segam2crypt:key", "081702cf" )
4209   _315_5881_KEYFILE("samba2k-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
42324210ROM_END
42334211
42344212ROM_START( alienfnt )
r243114r243115
42434221   ROM_LOAD( "mpr-23584.ic4",   0x3800000, 0x1000000, CRC(8d444756) SHA1(89c480f9ed1239c8ae565c85fa0fd50324264b20) )
42444222   ROM_LOAD( "mpr-23585.ic5",   0x4800000, 0x1000000, CRC(883a6482) SHA1(e3145710df793b7fd67f02707904416210a71978) )
42454223
4246   // 840-0048    2001     317-0293-COM   Naomi
4247   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08174343" )
4224   _315_5881_KEYFILE("alienfnt-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
42484225ROM_END
42494226
42504227ROM_START( alienfnta )
r243114r243115
42594236   ROM_LOAD( "mpr-23584.ic4",   0x3800000, 0x1000000, CRC(8d444756) SHA1(89c480f9ed1239c8ae565c85fa0fd50324264b20) )
42604237   ROM_LOAD( "mpr-23585.ic5",   0x4800000, 0x1000000, CRC(883a6482) SHA1(e3145710df793b7fd67f02707904416210a71978) )
42614238
4262   // 840-0048    2001     317-0293-COM   Naomi
4263   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08174343" )
4239   _315_5881_KEYFILE("alienfnt-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
42644240ROM_END
42654241
42664242/*
r243114r243115
42914267   ROM_LOAD("mpr-23354.ic13s",0x6800000, 0x0800000, CRC(cea127f7) SHA1(11f12472ebfc93eb72b764c780e30afd4812dbe9) )
42924268   ROM_LOAD("mpr-23355.ic14s",0x7000000, 0x0800000, CRC(e809685f) SHA1(dc052b4eb4fdcfdc22c4807316ce34ee7a0d58a6) )
42934269
4294   // 841-0013    2000     317-5063-COM   Naomi
4295   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00076110" )
4270   _315_5881_KEYFILE("ggx-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
42964271ROM_END
42974272
42984273/*
r243114r243115
43374312   ROM_LOAD("mpr-23714.ic10",0x5000000, 0x0800000, CRC(da462c44) SHA1(ca450b6c07f939f96eba7b44c45b4e38abd598aa) )
43384313   ROM_LOAD("mpr-23715.ic11",0x5800000, 0x0800000, CRC(c750abbd) SHA1(2a5bedc2b21cd3f991c7145ccfd8c7a9e7f647ae) )
43394314
4340   // HMG016007   2001     317-5071-COM   Naomi
4341   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00038510" )
4315   _315_5881_KEYFILE("hmgeo-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
43424316ROM_END
43434317
43444318/*
r243114r243115
43764350   ROM_LOAD("mpr-22274.ic4", 0x3800000, 0x1000000, CRC(f8daaaf3) SHA1(8854d3f8e3d55715ede33ee918b641e251f752b4) )
43774351   ROM_LOAD("mpr-22275.ic5", 0x4800000, 0x1000000, CRC(61aa1521) SHA1(7d9f5790e72a9151d128ac7887e236526fdf72a0) )
43784352
4379   // 841-0014    2000     317-5064-COM   Naomi
4380   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000b25d0" )
4353   _315_5881_KEYFILE("gwing2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
43814354ROM_END
43824355
43834356/*
r243114r243115
44264399   ROM_LOAD("mpr-21992.ic13s",0x6800000, 0x0800000, CRC(599a2fb8) SHA1(2a0007064ad2ee1e1a0fda1d5676df4ff19a9f2f) )
44274400   ROM_LOAD("mpr-21993.ic14s",0x7000000, 0x0400000, CRC(fb28cf0a) SHA1(d51b1d4514a93074d1f77bd1bc5995739604cf56) )
44284401
4429   // 841-0002    1999     317-5047-JPN   Naomi
4430   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000368e1" )
4402   _315_5881_KEYFILE("suchie3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
44314403ROM_END
44324404
44334405/*
r243114r243115
44564428   ROM_LOAD("mpr-22071.ic11", 0x5800000, 0x0800000, CRC(1ab1f1ab) SHA1(bb8fa8d5a681115a82e9598ebe599b106f7aae9d) )
44574429   ROM_LOAD("mpr-22072.ic12s",0x6000000, 0x0800000, CRC(cb8d2634) SHA1(03ac8fb3a1acb1f8e32d9325c4da42417752f934) )
44584430
4459   // 841-0004    1999     317-5050-JPN   Naomi     seems not used by game
4460   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0")
4431   _315_5881_UNUSED_OR_UNKNOWN
44614432ROM_END
44624433
44634434/*
r243114r243115
45214492   ROM_LOAD("mpr-22033.ic9", 0x4800000, 0x0800000, CRC(5fe5586e) SHA1(3ff41ae1f81469597684faadd88e62b5e0634352) )
45224493   ROM_LOAD("mpr-22034.ic10",0x5000000, 0x0800000, CRC(3aa5ce5e) SHA1(f00a906235e4522d6fc2ac771324114346875314) )
45234494
4524   // 840-0011    1999     317-0257-COM   Naomi
4525   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0802ca85" )
4495   _315_5881_KEYFILE("toyfight-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
45264496ROM_END
45274497
45284498/* Crazy Taxi */
r243114r243115
45464516   ROM_LOAD( "mpr-21682.ic14s", 0x7000000, 0x800000, CRC(54c0290e) SHA1(6e07ab6e95c29a2aabed0ba1a7af0d7d605e0309) )
45474517   ROM_LOAD( "mpr-21683.ic15s", 0x7800000, 0x800000, CRC(ac8a27e0) SHA1(8e71d853a102dd6c164d5326e6d157ccfb8c7b36) )
45484518
4549   // 840-0002    1999     317-0248-COM   Naomi
4550   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080d2f45" )
4519   _315_5881_KEYFILE("crzytaxi-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
45514520ROM_END
45524521
45534522/* Jambo! Safari */
r243114r243115
45664535   ROM_LOAD( "mpr-22824.ic7",  0x3800000, 0x800000, CRC(cc55304a) SHA1(e548d8de83469e5816c55dbbb00afbb894282fd6) )
45674536   ROM_LOAD( "mpr-22825.ic8",  0x4000000, 0x800000, CRC(85bada10) SHA1(b6e15d8f1d6bca12ffa4816ed0393c04ca500fba) )
45684537
4569   // 840-0013    1999     317-0264-COM   Naomi
4570   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080fab95" )
4538   _315_5881_KEYFILE("jambo-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
45714539ROM_END
45724540
45734541/* 18 Wheeler (deluxe) (Rev A) */
r243114r243115
45984566   ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) )
45994567   ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) )
46004568
4601   // 840-0023    2000     317-0273-COM   Naomi
4602   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0807cf54" )
4569   _315_5881_KEYFILE("18wheelr-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
46034570
46044571   // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC)
46054572   ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF)
r243114r243115
46404607   ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) )
46414608   ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) )
46424609
4643   // 840-0023    2000     317-0273-COM   Naomi
4644   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0807cf54" )
4610   _315_5881_KEYFILE("18wheelr-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
46454611
46464612   // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC)
46474613   ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF)
r243114r243115
46824648   ROM_LOAD( "mpr-22182.ic19s", 0x9800000, 0x800000, CRC(c5606c42) SHA1(5871104ff1c7acde0493e13b9a4d0abdf8a40728) )
46834649   ROM_LOAD( "mpr-22183.ic20s", 0xa000000, 0x800000, CRC(776af308) SHA1(7d29cb4dce75d34c622549fea7e102868d0da60a) )
46844650
4685   // 840-0023    2000     317-0273-COM   Naomi
4686   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0807cf54" )
4651   _315_5881_KEYFILE("18wheelr-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
46874652
46884653   // JVS I/O board 837-13844, code is for a Z80 of unknown type (it's inside the big Sega ASIC)
46894654   ROM_REGION( 0x20000, "jvsio", ROMREGION_ERASEFF)
r243114r243115
47154680   ROM_LOAD( "mpr-22991.ic14s", 0x7000000, 0x800000, CRC(0c20f313) SHA1(ac335d3015ef348c91319ae0e98b79a60e92f452) )
47164681   ROM_LOAD( "mpr-22992.ic15s", 0x7800000, 0x800000, CRC(5eb6c4c6) SHA1(5dc1bced7ebd7d7e01f74d03706ec4a96585628d) )
47174682
4718   // 840-0025    1999     317-0274-JPN   Naomi
4719   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080b8ef5" )
4683   _315_5881_KEYFILE("marstv-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
47204684ROM_END
47214685
47224686/* Sega Strike Fighter */
r243114r243115
47474711   ROM_LOAD( "mpr-23320.ic19s", 0x9800000, 0x800000, CRC(5ec75a45) SHA1(696e5d14678c794dec67246507bd580f7e5b5043) )
47484712   ROM_LOAD( "mpr-23321.ic20s", 0xa000000, 0x800000, CRC(018627d4) SHA1(2519f39ad046d14f602648fed39bc3719185b55e) )
47494713
4750   // 840-0035    2000     317-0281-COM   Naomi
4751   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08132303" )
4714   _315_5881_KEYFILE("sstrkfgt-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
47524715ROM_END
47534716
47544717// EPR ROM have different number, possible updated/bugfixed re-release or STD/DLX version, difference with original set is unknown, have "Rev.A" label too
r243114r243115
47794742   ROM_LOAD( "mpr-23320.ic19s", 0x9800000, 0x800000, CRC(5ec75a45) SHA1(696e5d14678c794dec67246507bd580f7e5b5043) )
47804743   ROM_LOAD( "mpr-23321.ic20s", 0xa000000, 0x800000, CRC(018627d4) SHA1(2519f39ad046d14f602648fed39bc3719185b55e) )
47814744
4782   // 840-0035    2000     317-0281-COM   Naomi
4783   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08132303" )
4745   _315_5881_KEYFILE("sstrkfgt-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
47844746ROM_END
47854747
47864748
r243114r243115
47994761   ROM_LOAD( "mpr-22914.ic5", 0x2800000, 0x800000, CRC(77844b60) SHA1(65d71febb8a160d00778ac7b53e082253cad9834) )
48004762   ROM_LOAD( "mpr-22915.ic6", 0x3000000, 0x800000, CRC(e48148ac) SHA1(c1273353eeaf9bb6b185f133281d7d04271bc895) )
48014763
4802   // 840-0018    1999     317-0268-COM   Naomi
4803   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0808ae51" )
4764   _315_5881_KEYFILE("sgtetri-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
48044765ROM_END
48054766
48064767/*
r243114r243115
48564817   ROM_LOAD("mpr-23339.ic16s",0x8000000, 0x0800000, CRC(fd8c2736) SHA1(34ae1a4e35b4aac6666719fb4fc0959bd64ff3d6) )
48574818   ROM_LOAD("mpr-23340.ic17s",0x8800000, 0x0800000, CRC(001604f8) SHA1(615ec027d383d44d4aadb1175be6320e4139d7d1) )
48584819
4859   // 840-0041    2000     317-0286-COM   Naomi
4860   ROM_PARAMETER( ":rom_board:segam2crypt:key", "081a66ca" )
4820   _315_5881_KEYFILE("slasho-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
48614821ROM_END
48624822
48634823
r243114r243115
49144874   ROM_LOAD( "mpr-23546.ic10", 0x9800000, 0x1000000, CRC(85db2248) SHA1(37845c269a2e65ee6181a8e7500c2e7dd9b2e343) )
49154875   ROM_LOAD( "mpr-23547.ic11", 0xa800000, 0x1000000, CRC(18b369c7) SHA1(b61cb3fda8cc685865684f7afc7dad0b29d93ca5) )
49164876
4917   // 841-0015    2000     317-5065-COM   Naomi
4918   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000725d0" )
4877   _315_5881_KEYFILE("pjustic-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
49194878ROM_END
49204879
49214880/*
r243114r243115
49564915   ROM_LOAD("mpr-21595.ic7", 0x3800000, 0x0800000, CRC(7ab218f7) SHA1(c5c022e63f926cce09d49331647cde20e8e42ab3) )
49574916   ROM_LOAD("mpr-21596.ic8", 0x4000000, 0x0800000, CRC(f27dbdc5) SHA1(d54717d62897546968de2f049239f68bee49bdd8) )
49584917
4959   // 841-0001    1999     317-5046-COM   Naomi
4960   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000e69c1" )
4918   _315_5881_KEYFILE("pston-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
49614919ROM_END
49624920
49634921/*
r243114r243115
49994957   ROM_LOAD("mpr-23125.ic8", 0x4000000, 0x0800000, CRC(b9938bbc) SHA1(d55d7adecb5a5a4a276a5a17c12808085d980fd9) )
50004958   ROM_LOAD("mpr-23126.ic9", 0x4800000, 0x0800000, CRC(fbb0325b) SHA1(21b965519d7508d84344641d43e8af2c3ca29ba4) )
50014959
5002   // 841-0008    2000     317-5054-COM   Naomi
5003   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000b8dc0" )
4960   _315_5881_KEYFILE("pstone2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
50044961ROM_END
50054962
50064963
r243114r243115
50645021   ROM_LOAD("mpr-22159.ic18s",0x9000000, 0x0800000, CRC(f8b5e99d) SHA1(bb174a6a80967d0ff05c3a7512e4f0f9c921d130) )
50655022   ROM_LOAD("mpr-22160.ic19s",0x9800000, 0x0800000, CRC(579eef4e) SHA1(bfcabd57f623647053afcedcabfbc74e5736819f) )
50665023
5067   // 840-0017    1999     317-0266-COM   Naomi
5068   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080fea94" )
5024   _315_5881_KEYFILE("outrigger-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
50695025ROM_END
50705026
50715027/*
r243114r243115
51565112   ROM_LOAD("mpr-22964.ic15s",0x7800000, 0x0800000, CRC(f581d5a3) SHA1(8cf769f5b0a48951246bb60e9cf58232bcee7bc8) )
51575113   ROM_LOAD("mpr-22965.ic16s",0x8000000, 0x0800000, CRC(8f7bfa8a) SHA1(19f137b1552978d232785c4408805b71835585c6) )
51585114
5159   // 840-0020    1999     317-0270-COM   Naomi
5160   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080a8b5d" )
5115   _315_5881_KEYFILE("samba-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
51615116ROM_END
51625117
51635118// prototype - only works with US BIOS
r243114r243115
51845139   ROM_LOAD("mpr-22964.ic15s",0x7800000, 0x0800000, CRC(f581d5a3) SHA1(8cf769f5b0a48951246bb60e9cf58232bcee7bc8) )
51855140   ROM_LOAD("mpr-22965.ic16s",0x8000000, 0x0800000, CRC(8f7bfa8a) SHA1(19f137b1552978d232785c4408805b71835585c6) )
51865141
5187   // 840-0020    1999     317-0270-COM   Naomi
5188   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080a8b5d" )
5142   _315_5881_KEYFILE("samba-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
51895143ROM_END
51905144
51915145/*
r243114r243115
52165170   ROM_LOAD("mpr-22218.ic11",  0x5800000, 0x0800000, CRC(f9ca31b8) SHA1(ea3d0f38ca1a46c896c06f038a6362ad3c9f90b2) )
52175171   ROM_LOAD("mpr-22219.ic12s", 0x6000000, 0x0800000, CRC(b3b45811) SHA1(045e7236b814f848d4c9767618ddcd4344d880ec) )
52185172
5219   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
5173   _315_5881_UNUSED_OR_UNKNOWN
52205174ROM_END
52215175
52225176// Shootout Pool
r243114r243115
52835237   ROM_LOAD( "mpr-24057.ic4", 0x3800000, 0x1000000, CRC(6dec3518) SHA1(3e65065df22680e2bbf2d3db22da413f347a1abe) )
52845238   ROM_LOAD( "mpr-24058.ic5", 0x4800000, 0x1000000, CRC(0eba9049) SHA1(a71ca72aeaf17180cde59d7c7b42c97a1b4259ab) )
52855239
5286   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
5240   _315_5881_UNUSED_OR_UNKNOWN
52875241ROM_END
52885242
52895243/*
r243114r243115
53275281   ROM_LOAD("mpr-22975.ic9",  0x4800000, 0x0800000, CRC(0d3c70d1) SHA1(22920bc5fd1dda760b5cb17482e9181be899bc08) )
53285282   ROM_LOAD("mpr-22976.ic10", 0x5000000, 0x0800000, CRC(092d8063) SHA1(14fafd3f4c4f2b37172453d1c815fb9b8f4814f4) )
53295283
5330   // 841-0005    1999     317-5051-COM   Naomi
5331   ROM_PARAMETER( ":rom_board:segam2crypt:key", "00078d01" )
5284   _315_5881_KEYFILE("spawn-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
53325285ROM_END
53335286
53345287/*
r243114r243115
53695322   ROM_LOAD("mpr-23020.ic20s", 0xa000000, 0x0800000, CRC(b5943007) SHA1(d0e95084aec5e05027c21a6b4a3331408853781b) )
53705323   //ic21 not populated
53715324
5372   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
5325   _315_5881_UNUSED_OR_UNKNOWN
53735326ROM_END
53745327
53755328/*
r243114r243115
54335386   ROM_LOAD("mpr-22947.ic20s", 0xa000000, 0x0800000, CRC(5e5eb595) SHA1(401d4a11d436988d716bb014b36233f171dc576d) )
54345387   ROM_LOAD("mpr-22948.ic21s", 0xa800000, 0x0800000, CRC(1b0de917) SHA1(fd1742ea9bb2f1ce871ee3266171f26634e1c8e7) )
54355388
5436   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
5389   _315_5881_UNUSED_OR_UNKNOWN
54375390ROM_END
54385391
54395392ROM_START( virnbao )
r243114r243115
54645417   ROM_LOAD("mpr-22947.ic20s", 0xa000000, 0x0800000, CRC(5e5eb595) SHA1(401d4a11d436988d716bb014b36233f171dc576d) )
54655418   ROM_LOAD("mpr-22948.ic21s", 0xa800000, 0x0800000, CRC(1b0de917) SHA1(fd1742ea9bb2f1ce871ee3266171f26634e1c8e7) )
54665419
5467   // 840-0021    2000     317-0271-COM   Naomi
5468   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08068b58" )
5420   _315_5881_KEYFILE("virnbao-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
54695421ROM_END
54705422
54715423ROM_START( virnbap )
r243114r243115
54965448   ROM_LOAD("mpr-22947.ic20s", 0xa000000, 0x0800000, CRC(5e5eb595) SHA1(401d4a11d436988d716bb014b36233f171dc576d) )
54975449   ROM_LOAD("mpr-22948.ic21s", 0xa800000, 0x0800000, CRC(1b0de917) SHA1(fd1742ea9bb2f1ce871ee3266171f26634e1c8e7) )
54985450
5499   // 840-0021    2000     317-0271-COM   Naomi
5500   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08068b58" )
5451   _315_5881_KEYFILE("virnbao-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
55015452ROM_END
55025453
55035454/*
r243114r243115
55495500   ROM_LOAD("mpr-21922.ic14s",0x7000000, 0x0800000, CRC(a1901e1e) SHA1(2281f91ac696cc14886bcdf4b0685ce2f5bb8117) )
55505501   ROM_LOAD("mpr-21923.ic15s",0x7800000, 0x0400000, CRC(d127d9a5) SHA1(78c95357344ea15469b84fa8b1332e76521892cd) )
55515502
5552   // 840-0010    1999     317-0258-COM   Naomi
5553   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08088b08" )
5503   _315_5881_KEYFILE("vs2_2k-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
55545504ROM_END
55555505
55565506/*
r243114r243115
55945544   ROM_LOAD("mpr-22925.ic10",0x5000000, 0x0800000, CRC(81057e42) SHA1(d41137ae28c64dbdb50150db8cf25851bc0709c4) )
55955545   ROM_LOAD("mpr-22926.ic11",0x5800000, 0x0800000, CRC(57eec89d) SHA1(dd8f9a9155e51ee5260f559449fb0ea245077952) )
55965546
5597   // 840-0015    1999     317-0263-COM   Naomi
5598   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0803eb15" )
5547   _315_5881_KEYFILE("vtennis-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
55995548ROM_END
56005549
56015550/*
r243114r243115
56205569   ROM_LOAD( "mpr-22268.ic7", 0x6800000, 0x1000000, CRC(536f5eea) SHA1(f1de8624f82595adf75693b604fb026bf3f778ee) )
56215570   ROM_LOAD( "mpr-22269.ic8", 0x7800000, 0x1000000, CRC(6c0cf740) SHA1(da10b33a6e54afbe1d7e52801216e7119b0b33b1) )
56225571
5623   // 840-0040    2000     317-0285-COM   Naomi
5624   ROM_PARAMETER( ":rom_board:segam2crypt:key", "081627c3" )
5572   _315_5881_KEYFILE("wwfroyal-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
56255573ROM_END
56265574
56275575ROM_START( mushik2e )
r243114r243115
59375885   ROM_LOAD("mpr-21725.ic18s",0x9000000, 0x0800000, CRC(2202077b) SHA1(0893a85379f994277083c0bc5b178dd34508f816) )
59385886   ROM_LOAD("mpr-21726.ic19s",0x9800000, 0x0800000, CRC(429bf290) SHA1(6733e1bcf100e73ab43273f6feedc187fcaa55d4) )
59395887
5940   // 840-0003    1999     317-0249-COM   Naomi
5941   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08012b41" )
5888   _315_5881_KEYFILE("zombrvn-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
59425889ROM_END
59435890
59445891ROM_START( gunsur2 )
r243114r243115
59625909   ROM_LOAD( "bhf1ma14.6m",  0xe000000, 0x1000000, CRC(d06c9bd7) SHA1(54668a2fd31059976890da92709c18f308634887) )
59635910   ROM_LOAD( "bhf1ma15.6l",  0xf000000, 0x1000000, CRC(db3c396b) SHA1(da0e125d627ce890906ca100081ab0685e11c0ef) )
59645911
5965   // 25709801    2001     317-5075-COM   Naomi
5966   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000680d0" )
5912   _315_5881_KEYFILE("bhf1-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
59675913ROM_END
59685914
59695915ROM_START( gunsur2e )
r243114r243115
59875933   ROM_LOAD( "bhf1ma14.6m",  0xe000000, 0x1000000, CRC(d06c9bd7) SHA1(54668a2fd31059976890da92709c18f308634887) )
59885934   ROM_LOAD( "bhf1ma15.6l",  0xf000000, 0x1000000, CRC(db3c396b) SHA1(da0e125d627ce890906ca100081ab0685e11c0ef) )
59895935
5990   // 25709801    2001     317-5075-COM   Naomi
5991   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000680d0" )
5936   _315_5881_KEYFILE("bhf1-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
59925937ROM_END
59935938
59945939ROM_START( wldkicks )
r243114r243115
60095954   ROM_LOAD( "wk1ma9.4d",   0x9000000, 0x1000000, CRC(29635a54) SHA1(a3109d0f8f271e2183316846df2a6a819f6a9b20) )
60105955   ROM_LOAD( "wk1ma10.4c",  0xa000000, 0x1000000, CRC(e96f312c) SHA1(0a92640277111aef5c6e9dab4218a8ae2196ce61) )
60115956
6012   // 25209801    2000     317-5040-COM   Naomi
6013   ROM_PARAMETER( ":rom_board:segam2crypt:key", "052e2901" )
5957   _315_5881_KEYFILE("wldkicks-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
60145958ROM_END
60155959
60165960ROM_START( wldkicksa )
r243114r243115
60315975   ROM_LOAD( "wk1ma9.4d",   0x9000000, 0x1000000, CRC(29635a54) SHA1(a3109d0f8f271e2183316846df2a6a819f6a9b20) )
60325976   ROM_LOAD( "wk1ma10.4c",  0xa000000, 0x1000000, CRC(e96f312c) SHA1(0a92640277111aef5c6e9dab4218a8ae2196ce61) )
60335977
6034   // 25209801    2000     317-5040-COM   Naomi
6035   ROM_PARAMETER( ":rom_board:segam2crypt:key", "052e2901" )
5978   _315_5881_KEYFILE("wldkicks-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
60365979ROM_END
60375980
60385981ROM_START( wldkicksb )
r243114r243115
60535996   ROM_LOAD( "wk1ma9.4d",   0x9000000, 0x1000000, CRC(29635a54) SHA1(a3109d0f8f271e2183316846df2a6a819f6a9b20) )
60545997   ROM_LOAD( "wk1ma10.4c",  0xa000000, 0x1000000, CRC(e96f312c) SHA1(0a92640277111aef5c6e9dab4218a8ae2196ce61) )
60555998
6056   // 25209801    2000     317-5040-COM   Naomi
6057   ROM_PARAMETER( ":rom_board:segam2crypt:key", "052e2901" )
5999   _315_5881_KEYFILE("wldkicks-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
60586000ROM_END
60596001
60606002ROM_START( toukon4 )
r243114r243115
60806022   ROM_LOAD( "trf1ma14.6m", 0xe000000, 0x1000000, CRC(87cb31a0) SHA1(27aef9ac571a0b5e3a76e4ee22f5bc5d0ae962f2) )
60816023   ROM_LOAD( "trf1ma15.6l", 0xf000000, 0x1000000, CRC(42d318c5) SHA1(f9fe82ffbfc51fcb52333f94c55a7092e7124fb4) )
60826024
6083   // 25349801    2000     317-5040-COM   Naomi
6084   ROM_PARAMETER( ":rom_board:segam2crypt:key", "052e2901" )
6025   _315_5881_KEYFILE("tr4a-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
60856026ROM_END
60866027
60876028ROM_START( ninjaslt )
r243114r243115
61026043   ROM_LOAD( "nja1ma9.4c",      0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) )
61036044   ROM_LOAD( "nja1ma10.4b",     0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) )
61046045
6105   // 25469801    2000     317-5068-COM   Naomi
6106   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" )
6046   _315_5881_KEYFILE("nja3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
61076047
61086048   ROM_REGION( 0x20000, "jyu_io", 0 )  // H8/3334-based I/O board ROM, eventually should be separated out
61096049   ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) )
r243114r243115
61276067   ROM_LOAD( "nja1ma9.4c",      0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) )
61286068   ROM_LOAD( "nja1ma10.4b",     0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) )
61296069
6130   // 25469801    2000     317-5068-COM   Naomi
6131   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" )
6070   _315_5881_KEYFILE("nja3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
61326071
61336072   ROM_REGION( 0x20000, "jyu_io", 0 )  // H8/3334-based I/O board ROM, eventually should be separated out
61346073   ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) )
r243114r243115
61526091   ROM_LOAD( "nja1ma9.4c",      0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) )
61536092   ROM_LOAD( "nja1ma10.4b",     0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) )
61546093
6155   // 25469801    2000     317-5068-COM   Naomi
6156   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" )
6094   _315_5881_KEYFILE("nja3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
61576095
61586096   ROM_REGION( 0x20000, "jyu_io", 0 )  // H8/3334-based I/O board ROM, eventually should be separated out
61596097   ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) )
r243114r243115
61776115   ROM_LOAD( "nja1ma9.4c",      0x9000000, 0x1000000, CRC(8abed815) SHA1(5e1b208d23a17ba743d0507d963be42e7828755f) )
61786116   ROM_LOAD( "nja1ma10.4b",     0xa000000, 0x1000000, CRC(f14d2073) SHA1(b4a8cd585794be149b616119df3f75c0fb30e2f0) )
61796117
6180   // 25469801    2000     317-5068-COM   Naomi
6181   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000ca510" )
6118   _315_5881_KEYFILE("nja3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
61826119
61836120   ROM_REGION( 0x20000, "jyu_io", 0 )  // H8/3334-based I/O board ROM, eventually should be separated out
61846121   ROM_LOAD( "jyu1_prg0a.ic3", 0x000000, 0x020000, CRC(aec4dbc1) SHA1(bddd4f345baf7f594998a39c09da18b3834f0ac2) )
r243114r243115
61996136   ROM_LOAD( "maz1ma7.4e",  0x7000000, 0x1000000, CRC(6103ad9c) SHA1(e4abbb5867cae6a9bf9067ab3a091ef7b18fa0cd) )
62006137   ROM_LOAD( "maz1ma8.4d",  0x8000000, 0x1000000, CRC(d46c9f40) SHA1(45eec7fa3d4261f12438e841254fa75d572331b3) )
62016138
6202   // 25869812    2002     317-0266-COM   Naomi
6203   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080fea94" )
6139   _315_5881_KEYFILE("maz1-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
62046140ROM_END
62056141
62066142ROM_START( mazana )
r243114r243115
62186154   ROM_LOAD( "maz1ma7.4e",  0x7000000, 0x1000000, CRC(6103ad9c) SHA1(e4abbb5867cae6a9bf9067ab3a091ef7b18fa0cd) )
62196155   ROM_LOAD( "maz1ma8.4d",  0x8000000, 0x1000000, CRC(d46c9f40) SHA1(45eec7fa3d4261f12438e841254fa75d572331b3) )
62206156
6221   // 25869812    2002     317-0266-COM   Naomi
6222   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080fea94" )
6157   _315_5881_KEYFILE("maz1-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
62236158ROM_END
62246159
62256160ROM_START( vtenis2c )
r243114r243115
62946229   ROM_LOAD( "mpr-23723.ic5",  0x4800000, 0x1000000, CRC(651610eb) SHA1(4dfe4f876a5440bd1034f41a4d76e1d6bd3e0e32) )
62956230   ROM_LOAD( "mpr-23724.ic6",  0x5800000, 0x1000000, CRC(c633c45a) SHA1(23b45140f965428d33e2424b0574715c0b952d05) )
62966231
6297   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6232   _315_5881_UNUSED_OR_UNKNOWN
62986233ROM_END
62996234
63006235ROM_START( gundmct )
r243114r243115
63146249   ROM_LOAD( "mpr-23636.ic9",  0x8800000, 0x1000000, CRC(57199e9f) SHA1(73a6f20ee7b3133ed4c6286e477e2ff9757106bd) )
63156250   ROM_LOAD( "mpr-23637.ic10", 0x9800000, 0x1000000, CRC(737b5dff) SHA1(0a405b711ffb096a3e6d52ececed73a5f93ebf02) )
63166251
6317   // 841-0017    2001     317-5070-COM   Naomi
6318   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000e8010" )
6252   _315_5881_KEYFILE("gundmct-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
63196253ROM_END
63206254
63216255ROM_START( puyoda )
r243114r243115
63456279   ROM_LOAD( "mpr-22204.ic19s", 0x9800000, 0x800000, CRC(2c5e5140) SHA1(7887fc19459dc85ca78256e0c50c762eea001e51) )
63466280   ROM_LOAD( "mpr-22205.ic20s", 0xa000000, 0x800000, CRC(7d523ae5) SHA1(7495082b7e83b6ee8f47660baba4c604d8ba2ff1) )
63476281
6348   // 841-0006    1999     317-5052-COM   Naomi
6349   ROM_PARAMETER( ":rom_board:segam2crypt:key", "000acd40" )
6282   _315_5881_KEYFILE("puyoda-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
63506283ROM_END
63516284
63526285ROM_START( zerogu2 )
r243114r243115
63616294   ROM_LOAD( "mpr-23687.ic4",  0x3800000, 0x1000000, CRC(e125439a) SHA1(07e7339f3f53aeb0ebddf7a8ac3eb6d8f3fe9de6) )
63626295   ROM_LOAD( "mpr-23688.ic5",  0x4800000, 0x1000000, CRC(38412edf) SHA1(9cae06cf46e134531f47e64deedace449664f69a) )
63636296
6364   // 841-0020    2001     317-5073-COM   Naomi
6365   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0007c010" )
6297   _315_5881_KEYFILE("zerogu2-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
63666298ROM_END
63676299
63686300ROM_START( inunoos )
r243114r243115
63896321   ROM_LOAD( "ic15s.bin", 0x7800000, 0x800000, CRC(b85e13ef) SHA1(974f6b8f24efe79d72ea9d7a2cfccf479704243d) )
63906322   ROM_LOAD( "ic16s.bin", 0x8000000, 0x800000, CRC(b8493dbe) SHA1(b641417e1bda49341e7ff86340072d74e3330665) )
63916323
6392   // 840-0073    2001     317-0316-JPN   Naomi
6393   ROM_PARAMETER( ":rom_board:segam2crypt:key", "094bc3e3" )
6324   _315_5881_KEYFILE("inuoos-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
63946325ROM_END
63956326
63966327ROM_START( ringout )
r243114r243115
64106341   ROM_LOAD( "mpr-21769.ic9",  0x4800000, 0x800000, CRC(6d22d29d) SHA1(382dcd62065437b34fe101144b1c047eb261f047) )
64116342   ROM_LOAD( "mpr-21770.ic10", 0x5000000, 0x800000, CRC(c5308e61) SHA1(e51f8026351d5ffbda2a5bed39aeef543366febf) )
64126343
6413   // 840-0004    1999     317-0250-COM   Naomi
6414   ROM_PARAMETER( ":rom_board:segam2crypt:key", "080b1e40" )
6344   _315_5881_KEYFILE("ringout-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
64156345ROM_END
64166346
64176347ROM_START( vonot )
r243114r243115
64346364   ROM_LOAD( "mpr-23193.ic12s", 0x6000000, 0x800000, CRC(c86a5b9b) SHA1(4b8dda85003289e1464e12c3abf449bb8df20e3a) )
64356365   ROM_LOAD( "mpr-23194.ic13s", 0x6800000, 0x800000, CRC(5adea0bd) SHA1(f8614ba83d5f61556c3db1a1796a02ed2c51ce2a) )
64366366
6437   // 840-0028    2000     317-0279-COM   Naomi
6438   ROM_PARAMETER( ":rom_board:segam2crypt:key", "08010715" )
6367   _315_5881_KEYFILE("vonot-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
64396368ROM_END
64406369
64416370ROM_START( derbyo2k )
r243114r243115
64616390   ROM_LOAD( "mpr-22237.ic15s", 0x7800000, 0x800000, CRC(718dd6bf) SHA1(6b71bb6970b582865f53d26e9579587fce86439e) )
64626391   ROM_LOAD( "mpr-22238.ic16s", 0x8000000, 0x800000, CRC(fb3e55da) SHA1(d547ee5b47e6e6fec9e447460300c828fbff8f2e) )
64636392
6464   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6393   _315_5881_UNUSED_OR_UNKNOWN
64656394ROM_END
64666395
64676396ROM_START( starhrse )
r243114r243115
64756404   ROM_LOAD( "mpr-23233.ic3",  0x2800000, 0x1000000, CRC(d6451cab) SHA1(6508e27d0370b19df01150da7baf4875479c166a) )
64766405   ROM_LOAD( "mpr-23234.ic4",  0x3800000, 0x1000000, CRC(44044c14) SHA1(4934cb8d5f9b4085ffb5ddc711343f488aae4c4d) )
64776406
6478   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6407   _315_5881_UNUSED_OR_UNKNOWN
64796408
64806409   // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes
64816410   ROM_REGION(0x84, "some_eeprom", 0)
r243114r243115
65086437   ROM_LOAD( "ic17s.bin", 0x8800000, 0x800000, CRC(b4c40606) SHA1(4f187dfe44bd89c90b6fa4b90f16222bc0a74d22) )
65096438   // .18s chip is not present but is tested for an FF fill (pull-up resistors on the PCB's data bus presumably accomplish this)
65106439
6511   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6440   _315_5881_UNUSED_OR_UNKNOWN
65126441
65136442   // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes
65146443   ROM_REGION(0x84, "some_eeprom", 0)
r243114r243115
65296458   ROM_LOAD( "mpr-23280.ic6",  0x5800000, 0x1000000, CRC(b1c8daa2) SHA1(a05fb374156ea013e35502abccc92f5117c39daa) )
65306459   ROM_LOAD( "mpr-23281.ic7",  0x6800000, 0x0800000, CRC(c0378369) SHA1(c728a181eddb01b9f8574669d4550baed559a5a4) )
65316460
6532   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6461   _315_5881_UNUSED_OR_UNKNOWN
65336462
65346463   // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes
65356464   ROM_REGION(0x84, "some_eeprom", 0)
r243114r243115
65516480   ROM_LOAD( "mpr-24128.ic6",   0x5800000, 0x1000000, CRC(bfdbb853) SHA1(bfbeb6ab634201af68d1427dea4f50163673fc2c) )
65526481   ROM_LOAD( "mpr-24129.ic7",   0x6800000, 0x1000000, CRC(c3f0f06a) SHA1(152324f2dbbde5560ae3adb1f9394a273fedbe9c) )
65536482
6554   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
6483   _315_5881_UNUSED_OR_UNKNOWN
65556484ROM_END
65566485
65576486/* prototype cartridges for games released on GD-ROM */
r243114r243115
77987727   ROM_LOAD( "mpr-23661.ic10", 0x9800000, 0x1000000, CRC(7d44dc74) SHA1(cfd6253eab3c1a039629b4873946c9dbc7ed6872) )
77997728   ROM_LOAD( "mpr-23662.ic11", 0xa800000, 0x0800000, CRC(d6ef7d68) SHA1(4ee396af6c5caf4c5af6e9ad0e03a7ac2c5039f4) )
78007729
7801   // 840-0061    2001     317-0310-COM   Naomi 2
7802   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0cee834a" )
7730   _315_5881_KEYFILE("vstrik2c-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
78037731ROM_END
78047732
78057733ROM_START( vstrik3cb )
r243114r243115
78207748   ROM_LOAD( "mpr-23661.ic10", 0x9800000, 0x1000000, CRC(7d44dc74) SHA1(cfd6253eab3c1a039629b4873946c9dbc7ed6872) )
78217749   ROM_LOAD( "mpr-23662.ic11", 0xa800000, 0x0800000, CRC(d6ef7d68) SHA1(4ee396af6c5caf4c5af6e9ad0e03a7ac2c5039f4) )
78227750
7823   // 840-0061    2001     317-0310-COM   Naomi 2
7824   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0cee834a" )
7751   _315_5881_KEYFILE("vstrik3c-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
78257752ROM_END
78267753
78277754ROM_START( wldrider )
r243114r243115
78417768   ROM_LOAD( "mpr-23619.ic9",  0x8800000, 0x1000000, CRC(a5f4f6af) SHA1(bb89d3f0f5bbaf7c40fa43680c7e51ef93f7ed26) )
78427769   ROM_LOAD( "mpr-23620.ic10", 0x9800000, 0x1000000, CRC(67aa15a9) SHA1(42c24cbf7069c27430a71509a872cd1c4224aaeb) )
78437770
7844   // 840-0046    2001     317-0301-COM   Naomi 2
7845   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7a703" )
7771   _315_5881_KEYFILE("wldridr-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
78467772ROM_END
78477773
78487774ROM_START( vf4cart )
r243114r243115
78637789   ROM_LOAD( "mpr-23783.ic10", 0x9800000, 0x1000000, CRC(c8d4f6f9) SHA1(9e9df605c050b3780d7df34bd5041d30bc084d2d) )
78647790   ROM_LOAD( "mpr-23784.ic11", 0xa800000, 0x1000000, CRC(f74f2fee) SHA1(84b07baa6d116727e66ef27e24ba6484c3393891) )
78657791
7866   // 840-0080    2002     317-0324-COM   Naomi 2
7867   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0eef2f96" )
7792   _315_5881_KEYFILE("vf4cart-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
78687793ROM_END
78697794
78707795// There is also a development cart (171-7885A) with 20x 64Mb FlashROMs instead of 10x 128Mb MaskROMs. Content is the same.
r243114r243115
78857810   ROM_LOAD("mpr-23816.ic9",  0x08800000,  0x01000000, CRC(bbaf0765) SHA1(3b79a4eff504b2156bea8b86c6cdd8e41e7bf268) )
78867811   ROM_LOAD("mpr-23817.ic10", 0x09800000,  0x01000000, CRC(e179cfb6) SHA1(1120036238439f8ac1041150396e4b60e4a243bc) )
78877812
7888   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
7813   _315_5881_UNUSED_OR_UNKNOWN
78897814ROM_END
78907815
78917816ROM_START( soulsurf )
r243114r243115
79177842   ROM_LOAD( "ic20s.bin", 0xa000000, 0x800000, CRC(c90b960d) SHA1(66e9f09d1f7f6a991371574a2e095c0e22fb7031) )
79187843   ROM_LOAD( "ic21s.bin", 0xa800000, 0x800000, CRC(1477c064) SHA1(87fb8d8a91d6bed70b246a8df88fa77fbf3db443) )
79197844
7920   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0") // Unused or unknown
7845   _315_5881_UNUSED_OR_UNKNOWN
79217846ROM_END
79227847
79237848ROM_START( vf4evoct )
r243114r243115
79497874
79507875   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
79517876
7952   _NAOMI_M1_KEYFILE( "vf4evoct-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111) )
7877   _315_5881_KEYFILE("vf4evoct-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
79537878ROM_END
79547879
79557880ROM_START( hopper )
r243114r243115
79857910   ROM_LOAD( "mpr-23702.ic10", 0x9800000, 0x1000000, CRC(e302b582) SHA1(787192ed9f9a08541eecc3128855485cad802a42) )
79867911   ROM_LOAD( "mpr-23703.ic11", 0xa800000, 0x1000000, CRC(702b8b4a) SHA1(3a8dfde458f341e7db20664382b9fce2b6e5d462) )
79877912
7988   // 840-0062    2001     317-0313-COM   Naomi 2
7989   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
7913   _315_5881_KEYFILE("clubkrte-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
79907914ROM_END
79917915
79927916ROM_START( clubkrtd )
r243114r243115
80077931   ROM_LOAD( "mpr-23702.ic10", 0x9800000, 0x1000000, CRC(e302b582) SHA1(787192ed9f9a08541eecc3128855485cad802a42) )
80087932   ROM_LOAD( "mpr-23703.ic11", 0xa800000, 0x1000000, CRC(702b8b4a) SHA1(3a8dfde458f341e7db20664382b9fce2b6e5d462) )
80097933
8010   // 840-0062    2001     317-0313-COM   Naomi 2
8011   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
7934   _315_5881_KEYFILE("clubkrte-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
80127935ROM_END
80137936
80147937ROM_START( clubkrtc )
r243114r243115
80297952   ROM_LOAD( "mpr-23702.ic10", 0x9800000, 0x1000000, CRC(e302b582) SHA1(787192ed9f9a08541eecc3128855485cad802a42) )
80307953   ROM_LOAD( "mpr-23703.ic11", 0xa800000, 0x1000000, CRC(702b8b4a) SHA1(3a8dfde458f341e7db20664382b9fce2b6e5d462) )
80317954
8032   // 840-0062    2001     317-0313-COM   Naomi 2
8033   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
7955   _315_5881_KEYFILE("clubkrte-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
80347956ROM_END
80357957
80367958ROM_START( clubkprz )
r243114r243115
80627984   ROM_REGION(0x84, "some_eeprom", 0)
80637985   ROM_LOAD( "at25010.ic3s", 0x000000, 0x000084, CRC(0142d8be) SHA1(5922b6c47b12b19e1fa7bbe9aae391905038a7ff) )
80647986
8065   // 840-0062    2001     317-0313-COM   Naomi 2
8066   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
7987   _315_5881_KEYFILE("clubkprz-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
80677988ROM_END
80687989
80697990ROM_START( clubkpzb )
r243114r243115
80918012
80928013   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
80938014
8094   // 840-0062    2001     317-0313-COM   Naomi 2
8095   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
8015   _315_5881_KEYFILE("clubkprz-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
80968016
80978017   // this dump can't be used as main_eeprom, because that's exactly 0x80 bytes
80988018   ROM_REGION(0x84, "some_eeprom", 0)
r243114r243115
81268046
81278047   ROM_COPY( "rom_board", 0x1000000, 0x400000, 0xc00000 )
81288048
8129   // 840-0062    2001     317-0313-COM   Naomi 2
8130   ROM_PARAMETER( ":rom_board:segam2crypt:key", "0ce7d742" )
8049   _315_5881_KEYFILE("clubk2k3-key.bin", CRC(11111111) SHA1(1111111111111111111111111111111111111111))
81318050ROM_END
81328051
81338052// uses the same mask roms data as clubk2k3, but not in 32bit dissected form, EPR doesn't have checksumms for them, so rom test shows all roms as BAD
trunk/src/mame/drivers/segajw.c
r243114r243115
368368
369369void segajw_state::machine_start()
370370{
371   save_item(NAME(m_coin_start_cycles));
372   save_item(NAME(m_hopper_start_cycles));
373   save_item(NAME(m_coin_counter));
374   save_item(NAME(m_coin_lockout));
375   save_item(NAME(m_hopper_ctrl));
376   save_item(NAME(m_lamps));
377371}
378372
379373
r243114r243115
444438ROM_END
445439
446440
447GAMEL( 1991, segajw,  0,   segajw,  segajw, driver_device,  0, ROT0, "Sega", "Golden Poker Series \"Joker's Wild\" (Rev. B)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_segajw ) // TODO: correct title
441GAMEL( 1991, segajw,  0,   segajw,  segajw, driver_device,  0, ROT0, "Sega", "Golden Poker Series \"Joker's Wild\" (Rev. B)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS, layout_segajw ) // TODO: correct title
trunk/src/mame/drivers/stv.c
r243114r243115
18241824   ROM_LOAD16_WORD_SWAP( "mpr20826.1",     0x1800000, 0x0400000, CRC(bdc4b941) SHA1(c5e8b1b186324c2ccab617915f7bdbfe6897ca9f) ) // good (was .17)
18251825   ROM_LOAD16_WORD_SWAP( "mpr20832.8",     0x1c00000, 0x0400000, CRC(af1b0985) SHA1(d7a0e4e0a8b0556915f924bdde8c3d14e5b3423e) ) // good (was .18s)
18261826   ROM_LOAD16_WORD_SWAP( "mpr20833.9",     0x2000000, 0x0400000, CRC(cb6af231) SHA1(4a2e5d7c2fd6179c19cdefa84a03f9a34fbb9e70) ) // good (was .19s)
1827
1828   // 25349801    1998     317-5040-COM   ST-V      (yes, the 317-5040-COM chip was reused for 3 different games and on both Naomi and ST-V!)
1829   ROM_PARAMETER( ":315_5881:key", "052e2901" )
18301827ROM_END
18311828
18321829ROM_START( bakubaku )
r243114r243115
19711968   ROM_LOAD16_WORD_SWAP( "mpr21305.6",    0x1400000, 0x0400000, CRC(46cfc2a2) SHA1(8ca26bf8fa5ced040e815c125c13dd06d599e189) ) // good (was .16)
19721969   ROM_LOAD16_WORD_SWAP( "mpr21306.1",    0x1800000, 0x0400000, CRC(87a5929c) SHA1(b259341d7b0e1fa98959bf52d23db5c308a8efdd) ) // good (was .17)
19731970   ROM_LOAD16_WORD_SWAP( "mpr21308.8",    0x1c00000, 0x0400000, CRC(336ec1a4) SHA1(20d1fce050cf6132d284b91853a4dd5626372ef0) ) // good (was .18s)
1974
1975   //             1998     317-5043-COM   ST-V
1976   ROM_PARAMETER( ":315_5881:key", "05226d41" )
19771971ROM_END
19781972
19791973ROM_START( ffreveng )
r243114r243115
19871981   ROM_LOAD16_WORD_SWAP( "mpr21876.5",   0x1000000, 0x0400000, CRC(bb92a7fc) SHA1(d9e0fab1104a46adeb0a0cfc0d070d4c63a28d55) ) // good (was .15)
19881982   ROM_LOAD16_WORD_SWAP( "mpr21877.6",   0x1400000, 0x0400000, CRC(c22a4a75) SHA1(3276bc0628e71b432f21ba9a4f5ff7ccc8769cd9) ) // good (was .16)
19891983   ROM_LOAD16_WORD_SWAP( "opr21878.1",   0x1800000, 0x0200000, CRC(2ea4a64d) SHA1(928a973dce5eba0a1628d61ba56a530de990a946) ) // good (was .17)
1990
1991   //             1998     317-5049-COM   ST-V
1992   ROM_PARAMETER( ":315_5881:key", "0524ac01" )
19931984ROM_END
19941985
19951986/* set system to 1 player to test rom */
r243114r243115
22462237   ROM_LOAD16_WORD_SWAP( "mpr20960.3",   0x0800000, 0x0400000, CRC(b5ab9053) SHA1(87c5d077eb1219c35fa65b4e11d5b62e826f5236) ) // good (was .13)
22472238   ROM_LOAD16_WORD_SWAP( "mpr20961.4",   0x0c00000, 0x0400000, CRC(0e06295c) SHA1(0ec2842622f3e9dc5689abd58aeddc7e5603b97a) ) // good (was .14)
22482239   ROM_LOAD16_WORD_SWAP( "mpr20962.5",   0x1000000, 0x0400000, CRC(f1e6c7fc) SHA1(0ba0972f1bc7c56f4e0589d3e363523cea988bb0) ) // good (was .15)
2249
2250   //             1998     317-5041-COM   ST-V
2251   ROM_PARAMETER( ":315_5881:key", "05272d01" )
22522240ROM_END
22532241
22542242ROM_START( sandor )
r243114r243115
24372425
24382426   ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
24392427   ROM_LOAD( "sss.nv", 0x0000, 0x0080, CRC(3473b2f3) SHA1(6480b4b321af8ee6e967710e74f2556c17bfca97) )
2440
2441   //             1998     317-5042-COM   ST-V
2442   ROM_PARAMETER( ":315_5881:key", "052b6901" )
24432428ROM_END
24442429
24452430ROM_START( suikoenb )
r243114r243115
24702455   ROM_LOAD16_WORD_SWAP( "mpr20822.3",    0x0800000, 0x0400000, CRC(8b33a5e2) SHA1(d5689ac8aad63509febe9aa4077351be09b2d8d4) ) // ic3 good (was .13)
24712456   ROM_LOAD16_WORD_SWAP( "mpr20823.4",    0x0c00000, 0x0400000, CRC(6e6d4e95) SHA1(c387d03ba27580c62ac0bf780915fdf41552df6f) ) // ic4 good (was .14)
24722457   ROM_LOAD16_WORD_SWAP( "mpr20824.5",    0x1000000, 0x0400000, CRC(4cf18a25) SHA1(310961a5f114fea8938a3f514dffd5231e910a5a) ) // ic5 good (was .15)
2473
2474   // 25209801    1998     317-5039-COM   ST-V
2475   ROM_PARAMETER( ":315_5881:key", "05200913" )
24762458ROM_END
24772459
24782460ROM_START( vfkids )
trunk/src/mame/machine/315-5881_crypt.c
r243114r243115
4545   save_item(NAME(line_buffer_pos));
4646   save_item(NAME(line_buffer_size));
4747
48   astring skey = parameter("key");
49   if(skey)
50      key = strtoll(skey.cstr(), 0, 16);
51   else
52   {
53      logerror("%s: Warning: key not provided\n", tag());
54      key = 0;
55   }
5648}
5749
5850void sega_315_5881_crypt_device::device_reset()
r243114r243115
120112   enc_ready = false;
121113}
122114
115void sega_315_5881_crypt_device::set_key(UINT32 data)
116{
117   key = data;
118   enc_ready = false;
119}
120
123121/***************************************************************************
124122    DECRYPTION EMULATION
125123
trunk/src/mame/machine/315-5881_crypt.h
r243114r243115
44#ifndef __SEGA315_5881_CRYPT__
55#define __SEGA315_5881_CRYPT__
66
7#include "315-5881_helper.h"
8
79typedef device_delegate<UINT16 (UINT32)> sega_m2_read_delegate;
810
911extern const device_type SEGA315_5881_CRYPT;
r243114r243115
2325   void set_addr_low(UINT16 data);
2426   void set_addr_high(UINT16 data);
2527   void set_subkey(UINT16 data);
28   void set_key(UINT32 data);
2629
2730   sega_m2_read_delegate m_read;
2831
trunk/src/mame/machine/315-5881_helper.c
r0r243115
1
2/* Sega 315-5881 support file
3
4  This encryption chip was used on various games running on
5  ST-V
6  Naomi
7  Naomi 2
8  Hikaru
9  Model 2
10  Model 3
11  (more?)
12
13  As the encryption isn't fully understood yet this file holds the current keys, these are subject to change.
14 */
15
16
17#include "emu.h"
18#include "315-5881_helper.h"
19
20struct game_keys
21{
22   const char *name;             /* game driver name */
23   const INT64 key; // INT64 so we can use -1 for unknown keys
24
25};
26
27// chip numbers based on Guru's list at
28// http://members.iinet.net.au/~lantra9jp1/gurudumps/sega-security/sega_security.html
29// (todo , complete it )
30
31
32static const struct game_keys keys_table[] =
33{
34   // name              key              gameid #    year     chip label     platform
35   { "twcup98",         0x05200913 }, // 25209801    1998     317-5039-COM   ST-V
36   { "astrass",         0x052e2901 }, // 25349801    1998     317-5040-COM   ST-V      (yes, the 317-5040-COM chip was reused for 3 different games and on both Naomi and ST-V!)
37   { "rsgun",           0x05272d01 }, //             1998     317-5041-COM   ST-V
38   { "sss",             0x052b6901 }, //             1998     317-5042-COM   ST-V
39   { "elandore",        0x05226d41 }, //             1998     317-5043-COM   ST-V
40   { "ffreveng",        0x0524ac01 }, //             1998     317-5049-COM   ST-V
41
42   { "dybbnao",         0x080e6ae1 }, // 840-0001    1998     317-0246-JPN   Naomi
43   { "crzytaxi",        0x080d2f45 }, // 840-0002    1999     317-0248-COM   Naomi
44   { "zombrvn",         0x08012b41 }, // 840-0003    1999     317-0249-COM   Naomi
45   { "ringout",         0x080b1e40 }, // 840-0004    1999     317-0250-COM   Naomi
46   { "alpilota",        0x08070e41 }, // 840-0005    1999     317-0251-COM   Naomi
47   { "alpiltdx",        0x08070e41 }, // 834-?????   1999     317-0251-COM   Naomi
48   { "ggram2",          0x08074a61 }, // 840-0007    1999     317-0253-JPN   Naomi
49   { "f355",            0x080e8f84 }, // 834-13842   1999     317-0254-COM   Naomi
50   { "tduno",           0x08028ea5 }, // 840-0008    1999     317-0255-JPN   Naomi
51   { "toyfight",        0x0802ca85 }, // 840-0011    1999     317-0257-COM   Naomi
52   { "vs2_2k",          0x08088b08 }, // 840-0010    1999     317-0258-COM   Naomi
53   { "smlg99",          0x08048a01 }, // 840-0012    1999     317-0259-COM   Naomi
54   { "derbyoc",         0x080fee35 }, // 840-0016    1999     317-0262-JPN   Naomi
55   { "vtennis",         0x0803eb15 }, // 840-0015    1999     317-0263-COM   Naomi
56   { "jambo",           0x080fab95 }, // 840-0013    1999     317-0264-COM   Naomi
57   { "mazan",           0x080fea94 }, // 25869812    2002     317-0266-COM   Naomi
58   { "mazana",          0x080fea94 }, // 25869812    2002     317-0266-COM   Naomi
59   { "otrigger",        0x080fea94 }, // 840-0017    1999     317-0266-COM   Naomi
60   { "f355twin",        0x0806efd4 }, // 834-13950   1999     317-0267-COM   Naomi
61   { "sgtetris",        0x0808ae51 }, // 840-0018    1999     317-0268-COM   Naomi
62   { "dybb99",          0x0804ae71 }, // 840-0019    1999     317-0269-JPN   Naomi
63   { "samba",           0x080a8b5d }, // 840-0020    1999     317-0270-COM   Naomi
64   { "sambap",          0x080a8b5d }, // 840-0020    1999     317-0270-COM   Naomi
65   { "virnbao",         0x08068b58 }, // 840-0021    2000     317-0271-COM   Naomi
66   { "virnbap",         0x08068b58 }, // 840-0021    2000     317-0271-COM   Naomi
67   { "18wheelr",        0x0807cf54 }, // 840-0023    2000     317-0273-COM   Naomi
68   { "18wheels",        0x0807cf54 }, // 840-0036    2000     317-0273-COM   Naomi
69   { "18wheelu",        0x0807cf54 }, // 840-0037    2000     317-0273-COM   Naomi
70   { "marstv",          0x080b8ef5 }, // 840-0025    1999     317-0274-JPN   Naomi
71   { "vonot",           0x08010715 }, // 840-0028    2000     317-0279-COM   Naomi
72   { "sstrkfgt",        0x08132303 }, // 840-0035    2000     317-0281-COM   Naomi
73   { "sstrkfgta",       0x08132303 }, // 840-0035    2000     317-0281-COM   Naomi
74   { "wwfroyal",        0x081627c3 }, // 840-0040    2000     317-0285-COM   Naomi
75   { "slasho",          0x081a66ca }, // 840-0041    2000     317-0286-COM   Naomi
76   { "f355twn2",        0x081666c6 }, // 840-0042    2001     317-0287-COM   Naomi
77   { "crackndj",        0x081c2347 }, // 840-0043    2000     317-0288-COM   Naomi
78   { "csmash",          0x08103347 }, // 840-0044    2000     317-0289-COM   Naomi
79   { "csmasho",         0x08103347 }, // 840-0044    2000     317-0289-COM   Naomi
80   { "alienfnt",        0x08174343 }, // 840-0048    2001     317-0293-COM   Naomi
81   { "alienfnta",       0x08174343 }, // 840-0048    2001     317-0293-COM   Naomi
82   { "samba2k",         0x081702cf }, // 840-0047    2000     317-0295-COM   Naomi
83   { "wldrider",        0x0ce7a703 }, // 840-0046    2001     317-0301-COM   Naomi 2
84   { "vstrik3c",        0x0cee834a }, // 840-0061    2001     317-0310-COM   Naomi 2
85   { "vstrik3cb",       0x0cee834a }, // 840-0061    2001     317-0310-COM   Naomi 2
86   { "crackdj2",        0x08428247 }, // 840-0068    2001     317-0311-COM   Naomi
87   { "clubkrtc",        0x0ce7d742 }, // 840-0062    2001     317-0313-COM   Naomi 2
88   { "clubkrtd",        0x0ce7d742 }, // 840-0062    2001     317-0313-COM   Naomi 2
89   { "clubkrte",        0x0ce7d742 }, // 840-0062    2001     317-0313-COM   Naomi 2
90   { "inunoos",         0x094bc3e3 }, // 840-0073    2001     317-0316-JPN   Naomi
91   { "vf4cart",         0x0eef2f96 }, // 840-0080    2002     317-0324-COM   Naomi 2
92   { "toukon4",         0x052e2901 }, // 25349801    2000     317-5040-COM   Naomi
93   { "wldkicks",        0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
94   { "wldkicksa",       0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
95   { "wldkicksb",       0x052e2901 }, // 25209801    2000     317-5040-COM   Naomi
96   { "pstone",          0x000e69c1 }, // 841-0001    1999     317-5046-COM   Naomi
97   { "suchie3",         0x000368e1 }, // 841-0002    1999     317-5047-JPN   Naomi
98   { "doa2",            0x0008ad01 }, // 841-0003    1999     317-5048-COM   Naomi
99   { "doa2m",           0x0008ad01 }, // 841-0003    1999     317-5048-COM   Naomi
100   { "shangril",        -1         }, // 841-0004    1999     317-5050-JPN   Naomi     seems not used by game
101   { "spawn",           0x00078d01 }, // 841-0005    1999     317-5051-COM   Naomi
102   { "puyoda",          0x000acd40 }, // 841-0006    1999     317-5052-COM   Naomi
103   { "pstone2",         0x000b8dc0 }, // 841-0008    2000     317-5054-COM   Naomi
104   { "capsnk",          0x00000000 }, // 841-0011    2000     317-5059-COM   Naomi
105   { "capsnka",         0x00000000 }, // 841-0011    2000     317-5059-COM   Naomi
106   { "capsnkb",         0x00000000 }, // 841-0011    2000     317-5059-COM   Naomi
107   { "cspike",          0x000e2010 }, // 841-0012    2000     317-5060-COM   Naomi
108   { "ggx",             0x00076110 }, // 841-0013    2000     317-5063-COM   Naomi
109   { "gwing2",          0x000b25d0 }, // 841-0014    2000     317-5064-COM   Naomi
110   { "pjustic",         0x000725d0 }, // 841-0015    2000     317-5065-COM   Naomi
111   { "deathcox",        0x000b64d0 }, // 841-0016    2000     317-5066-COM   Naomi
112   { "ninjaslt",        0x000ca510 }, // 25469801    2000     317-5068-COM   Naomi
113   { "ninjaslt1",       0x000ca510 }, // 25469801    2000     317-5068-COM   Naomi
114   { "ninjaslt2",       0x000ca510 }, // 25469801    2000     317-5068-COM   Naomi
115   { "ninjaslt4",       0x000ca510 }, // 25469801    2000     317-5068-COM   Naomi
116   { "gundmct",         0x000e8010 }, // 841-0017    2001     317-5070-COM   Naomi
117   { "hmgeo",           0x00038510 }, // HMG016007   2001     317-5071-COM   Naomi
118   { "zerogu2",         0x0007c010 }, // 841-0020    2001     317-5073-COM   Naomi
119   { "gunsur2",         0x000680d0 }, // 25709801    2001     317-5075-COM   Naomi
120   { "gunsur2e",        0x000680d0 }, // 25709801    2001     317-5075-COM   Naomi
121
122   { "podrace",         0x0903dad5 }, // 834-14002   2001     317-0277-COM   Hikaru
123   { "airtrix",         0x091b02c7 }, // 834-14149   2000     317-0294-COM   Hikaru
124   { "pharrier",        0x0912c68a }, // 834-14144   2001     317-0297-COM   Hikaru
125
126   { "dynamcop",        0x0c2a4a93 }, //             1998     317-0236-COM   Model 2
127   { "dyndeka2",        0x0c2a4a93 }, //             1998     317-0236-COM   Model 2
128   { "dynamcopb",       0x0c2a4a93 }, //             1998     317-0236-COM   Model 2
129   { "dyndeka2b",       0x0c2a4a93 }, //             1998     317-0236-COM   Model 2
130   { "dynamcopc",       0x0c2a4a93 }, //             1998     317-0236-COM   Model 2
131   { "zerogun",         0x042c0d13 }, //             1997     317-5038-COM   Model 2
132   { "zerogunj",        0x042c0d13 }, //             1997     317-5038-COM   Model 2
133   { "zeroguna",        0x042c0d13 }, //             1997     317-5038-COM   Model 2
134   { "zerogunaj",       0x042c0d13 }, //             1997     317-5038-COM   Model 2
135   { "pltkids",         0x042e2dc1 }, //             1998     317-5044-COM   Model 2
136   { "pltkidsa",        0x042e2dc1 }, //             1998     317-5044-COM   Model 2
137
138   { "von2",            0x092a0e97 }, //             ????     317-0234-COM   Model 3
139   { "von254g",         0x092a0e97 }, //             ????     317-0234-COM   Model 3
140   { "fvipers2",        0x09260e96 }, //             ????     317-0235-COM   Model 3
141   { "vs298",           0x09234e96 }, //             ????     317-0237-COM   Model 3
142   { "dirtdvls",        0x09290f17 }, //             ????     317-0238-COM   Model 3
143   { "dirtdvlsa",       0x09290f17 }, //             ????     317-0238-COM   Model 3
144   { "daytona2",        0x09250e16 }, //             ????     317-0239-COM   Model 3
145   { "spikeout",        0x092f2b04 }, //             ????     317-0240-COM   Model 3
146   { "swtrilgy",        0x11272a01 }, //             ????     317-0241-COM   Model 3
147   { "swtrilgya",       0x11272a01 }, //             ????     317-0241-COM   Model 3
148   { "oceanhun",        0x092b6a01 }, //             ????     317-0242-COM   Model 3
149   { "magtruck",        0x09266e45 }, //             ????     317-0243-COM   Model 3
150   { "lamachin",        0x092a2bc5 }, //             ????     317-0244-COM   Model 3
151   { "vs299",           0x09222ac8 }, //             ????     317-0245-COM   Model 3
152   { "vs2v991",         0x09222ac8 }, //             ????     317-0245-COM   Model 3
153   { "vs299b",          0x09222ac8 }, //             ????     317-0245-COM   Model 3
154   { "vs299a",          0x09222ac8 }, //             ????     317-0245-COM   Model 3
155   { "spikeofe",        0x09236fc8 }, //             ????     317-0247-COM   Model 3
156   { "eca",             0x0923aa91 }, //             ????     317-0265-COM   Model 3
157   { "ecax",            0x0923aa91 }, //             ????     317-0265-COM   Model 3
158   { "ecap",            0x0923aa91 }, //             ????     317-0265-COM   Model 3
159   { "dayto2pe",        -1         }, //             ????     317-5045-COM   Model 3
160   
161   { NULL, 0 }    // end of table
162};
163
164
165INT64 get_315_5881_key(running_machine &machine)
166{
167   const char *gamename = machine.system().name;
168   const struct game_keys *k = &keys_table[0];
169
170   while (k->name)
171   {
172      if (strcmp(k->name, gamename) == 0)
173      {
174         // we have a proper key so return it
175         return k->key;
176      }
177      ++k;
178   }
179
180   printf("get_naomi_key : KEY NOT FOUND\n");
181
182   return 0;
183}
trunk/src/mame/machine/315-5881_helper.h
r0r243115
1
2// use the internal key list, or external files?
3#define USE_315_5881_HELPER 1
4
5INT64 get_315_5881_key(running_machine &machine);
6
7#if USE_315_5881_HELPER
8
9#define _315_5881_KEYFILE(name,hash) \
10   /* nothing */
11
12#define _315_5881_UNUSED_OR_UNKNOWN \
13   /* nothing */
14
15#define _315_5881_UNUSED \
16   /* nothing */
17
18
19#else
20
21#define _315_5881_KEYFILE(name,hash) \
22   ROM_REGION( 4, "315_5881key", 0 ) \
23   ROM_LOAD( name, 0, 4, hash )
24
25#define _315_5881_UNUSED_OR_UNKNOWN \
26   ROM_REGION( 4, "315_5881key", ROMREGION_ERASE00 )
27
28#define _315_5881_UNUSED \
29   ROM_REGION( 4, "315_5881key", ROMREGION_ERASE00 )
30
31
32
33#endif
No newline at end of file
trunk/src/mame/machine/naomim2.c
r243114r243115
108108   : naomi_board(mconfig, NAOMI_M2_BOARD, "Sega NAOMI M2 Board", tag, owner, clock, "naomi_m2_board", __FILE__),
109109   m_cryptdevice(*this, "segam2crypt")
110110{
111   key_tag = 0;
111112}
112113
114void naomi_m2_board::static_set_tags(device_t &device, const char *_key_tag)
115{
116   naomi_m2_board &dev = downcast<naomi_m2_board &>(device);
117   dev.key_tag = _key_tag;
118}
119
113120void naomi_m2_board::device_start()
114121{
115122   naomi_board::device_start();
r243114r243115
127134   memset(ram, 0, RAM_SIZE);
128135
129136   rom_cur_address = 0;
137
138#if USE_315_5881_HELPER
139   m_cryptdevice->set_key(get_315_5881_key(machine()));
140#else
141   const UINT8 *key_data = memregion(key_tag)->base();
142   m_cryptdevice->set_key((key_data[0] << 24) | (key_data[1] << 16) | (key_data[2] << 8) | key_data[3]);
143#endif
130144}
131145
132146void naomi_m2_board::board_setup_address(UINT32 address, bool is_dma)
trunk/src/mame/machine/naomim2.h
r243114r243115
55#include "315-5881_crypt.h"
66
77
8#define MCFG_NAOMI_M2_BOARD_ADD(_tag, _eeprom_tag, _actel_tag, _irq_cb) \
9   MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M2_BOARD, _eeprom_tag, _actel_tag, _irq_cb)
8#define MCFG_NAOMI_M2_BOARD_ADD(_tag, _key_tag, _eeprom_tag, _actel_tag, _irq_cb) \
9   MCFG_NAOMI_BOARD_ADD(_tag, NAOMI_M2_BOARD, _eeprom_tag, _actel_tag, _irq_cb) \
10   naomi_m2_board::static_set_tags(*device, _key_tag);
1011
1112class naomi_m2_board : public naomi_board
1213{
r243114r243115
1617   static const int RAM_SIZE = 65536;
1718   UINT8* ram;
1819
20   static void static_set_tags(device_t &device, const char *_key_tag);
1921   UINT16 read_callback(UINT32 addr);
2022
2123protected:
r243114r243115
2931   virtual void board_write(offs_t offset, UINT16 data);
3032
3133private:
34
35
36   const char *key_tag;
37
38
3239   required_device<sega_315_5881_crypt_device> m_cryptdevice;
3340};
3441
trunk/src/mame/machine/stvprot.c
r243114r243115
8383void stv_state::install_common_protection()
8484{
8585   m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x4fffff0, 0x4ffffff, read32_delegate(FUNC(stv_state::common_prot_r), this), write32_delegate(FUNC(stv_state::common_prot_w), this));
86
87   INT64 key = get_315_5881_key(machine());
88   m_cryptdevice->set_key(key);
8689}
8790
8891void stv_state::stv_register_protection_savestates()
trunk/src/mame/mame.mak
r243114r243115
17231723   $(MACHINE)/naomig1.o $(MACHINE)/naomibd.o $(MACHINE)/naomirom.o $(MACHINE)/naomigd.o \
17241724   $(MACHINE)/naomicrypt.o $(MACHINE)/naomim1.o $(MACHINE)/naomim2.o $(MACHINE)/naomim4.o \
17251725   $(MACHINE)/315-5881_crypt.o \
1726   $(MACHINE)/315-5881_helper.o \
17261727   $(MACHINE)/awboard.o \
17271728   $(MACHINE)/mie.o $(MACHINE)/maple-dc.o $(MACHINE)/mapledev.o $(MACHINE)/dc-ctrl.o $(MACHINE)/jvs13551.o \
17281729   $(DRIVERS)/triforce.o \
trunk/src/mess/drivers/slicer.c
r243114r243115
1// Slicer Computers Slicer 80186 SBC
2// The bios makefile refers to a "exe3bin" utility, this can be substituted with FreeDOS exe2bin and the /l=0xf800 option
3// which will fixup the relocations
4
5#include "emu.h"
6#include "cpu/i86/i186.h"
7#include "machine/wd_fdc.h"
8#include "machine/mc68681.h"
9#include "bus/rs232/rs232.h"
10#include "bus/isa/isa.h"
11#include "bus/scsi/scsi.h"
12
13class slicer_state : public driver_device
14{
15public:
16   slicer_state(const machine_config &mconfig, device_type type, const char *tag) :
17   driver_device(mconfig, type, tag),
18   m_fdc(*this, "fdc"),
19   m_sasi(*this, "sasi")
20   {}
21
22   required_device<fd1797_t> m_fdc;
23   required_device<SCSI_PORT_DEVICE> m_sasi;
24
25   DECLARE_WRITE8_MEMBER(sio_out_w);
26   DECLARE_WRITE8_MEMBER(drive_sel_w);
27};
28
29WRITE8_MEMBER(slicer_state::sio_out_w)
30{
31   floppy_image_device *floppy;
32   int state = (data & 0x80) ? 0 : 1;
33   char devname[8];
34
35   for(int i = 0; i < 4; i++)
36   {
37      sprintf(devname, "%d", i);
38      floppy = m_fdc->subdevice<floppy_connector>(devname)->get_device();
39      if(floppy)
40         floppy->mon_w(state);
41   }
42}
43
44WRITE8_MEMBER(slicer_state::drive_sel_w)
45{
46   data &= 1;
47   switch(offset)
48   {
49      case 0:
50         m_sasi->write_sel(data);
51         break;
52      case 1:
53         m_sasi->write_rst(data);
54         break;
55      case 7:
56         m_fdc->dden_w(data);
57         break;
58
59      default:
60      {
61         floppy_image_device *floppy;
62         char devname[8];
63         unsigned int drive = 3 - (offset - 2);
64         if((drive > 3) || !data)
65            break;
66
67         sprintf(devname, "%d", drive);
68         floppy = m_fdc->subdevice<floppy_connector>(devname)->get_device();
69         m_fdc->set_floppy(floppy);
70         break;
71      }
72   }
73}
74
75static ADDRESS_MAP_START( slicer_map, AS_PROGRAM, 16, slicer_state )
76   AM_RANGE(0x00000, 0x3ffff) AM_RAM // fixed 256k for now
77   AM_RANGE(0xf8000, 0xfffff) AM_ROM AM_REGION("bios", 0)
78ADDRESS_MAP_END
79
80static ADDRESS_MAP_START( slicer_io, AS_IO, 16, slicer_state )
81   ADDRESS_MAP_UNMAP_HIGH
82   AM_RANGE(0x0000, 0x007f) AM_DEVREADWRITE8("fdc", fd1797_t, read, write, 0x00ff) //PCS0
83   AM_RANGE(0x0080, 0x00ff) AM_DEVREADWRITE8("sc2681", mc68681_device, read, write, 0x00ff) //PCS1
84   AM_RANGE(0x0100, 0x017f) AM_WRITE8(drive_sel_w, 0x00ff) //PCS2
85   // TODO: 0x180 sets ack
86   AM_RANGE(0x0180, 0x0181) AM_DEVREAD8("sasi_data_in", input_buffer_device, read, 0x00ff) AM_DEVWRITE8("sasi_data_out", output_latch_device, write, 0x00ff) //PCS3
87   AM_RANGE(0x0180, 0x0181) AM_DEVREAD8("sasi_ctrl_in", input_buffer_device, read, 0xff00)
88   AM_RANGE(0x0184, 0x0185) AM_DEVREAD8("sasi_data_in", input_buffer_device, read, 0x00ff) AM_DEVWRITE8("sasi_data_out", output_latch_device, write, 0x00ff)
89   AM_RANGE(0x0184, 0x0185) AM_DEVREAD8("sasi_ctrl_in", input_buffer_device, read, 0xff00)
90ADDRESS_MAP_END
91
92static SLOT_INTERFACE_START( slicer_floppies )
93   SLOT_INTERFACE("525dd", FLOPPY_525_DD)
94   SLOT_INTERFACE("8dsdd", FLOPPY_8_DSDD)
95SLOT_INTERFACE_END
96
97static MACHINE_CONFIG_START( slicer, slicer_state )
98   MCFG_CPU_ADD("maincpu", I80186, XTAL_16MHz / 2)
99   MCFG_CPU_PROGRAM_MAP(slicer_map)
100   MCFG_CPU_IO_MAP(slicer_io)
101
102   MCFG_MC68681_ADD("sc2681", XTAL_3_6864MHz)
103   MCFG_MC68681_IRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, int0_w))
104   MCFG_MC68681_A_TX_CALLBACK(DEVWRITELINE("rs232_1", rs232_port_device, write_txd))
105   MCFG_MC68681_B_TX_CALLBACK(DEVWRITELINE("rs232_2", rs232_port_device, write_txd))
106   MCFG_MC68681_OUTPORT_CALLBACK(WRITE8(slicer_state, sio_out_w))
107
108   MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, "terminal")
109   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("sc2681", mc68681_device, rx_a_w))
110   MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, NULL)
111   MCFG_RS232_RXD_HANDLER(DEVWRITELINE("sc2681", mc68681_device, rx_b_w))
112
113   MCFG_FD1797x_ADD("fdc", XTAL_16MHz/2/8)
114   MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, int1_w))
115   MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq0_w))
116   MCFG_FLOPPY_DRIVE_ADD("fdc:0", slicer_floppies, "525dd", floppy_image_device::default_floppy_formats)
117   MCFG_FLOPPY_DRIVE_ADD("fdc:1", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
118   MCFG_FLOPPY_DRIVE_ADD("fdc:2", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
119   MCFG_FLOPPY_DRIVE_ADD("fdc:3", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
120
121   MCFG_DEVICE_ADD("sasi", SCSI_PORT, 0)
122   MCFG_SCSI_DATA_INPUT_BUFFER("sasi_data_in")
123   MCFG_SCSI_BSY_HANDLER(DEVWRITELINE("sasi_ctrl_in", input_buffer_device, write_bit3))
124   MCFG_SCSI_MSG_HANDLER(DEVWRITELINE("sasi_ctrl_in", input_buffer_device, write_bit4))
125   MCFG_SCSI_CD_HANDLER(DEVWRITELINE("sasi_ctrl_in", input_buffer_device, write_bit5))
126   MCFG_SCSI_REQ_HANDLER(DEVWRITELINE("sasi_ctrl_in", input_buffer_device, write_bit6))
127   MCFG_SCSI_IO_HANDLER(DEVWRITELINE("sasi_ctrl_in", input_buffer_device, write_bit7))
128
129   MCFG_SCSI_OUTPUT_LATCH_ADD("sasi_data_out", "sasi")
130   MCFG_DEVICE_ADD("sasi_data_in", INPUT_BUFFER, 0)
131   MCFG_DEVICE_ADD("sasi_ctrl_in", INPUT_BUFFER, 0)
132MACHINE_CONFIG_END
133
134ROM_START( slicer )
135   ROM_REGION(0x8001, "bios", 0)
136   // built from sources, reset.asm adds an extra byte
137   ROM_LOAD("epbios.bin", 0x0000, 0x8001, CRC(96fe9dd4) SHA1(5fc43454fe7d51f2ae97aef822155dcd28eb7f23))
138ROM_END
139
140COMP( 1983, slicer, 0, 0, slicer, 0, driver_device, 0, "Slicer Computers", "Slicer", GAME_NOT_WORKING | GAME_NO_SOUND)
trunk/src/mess/mess.lst
r243114r243115
771771compc1  // 1984 Commodore PC-1
772772pc10iii // 1987 Commodore PC-10 III
773773pc7000  // 1985 Sharp PC-7000
774pcd     // Siemens PC-D
774775olypeopl // Olympia People PC
775776sx16    // Sanyo SX-16
776777mbc16   // Sanyo MBC-16
777778ataripc3
778779ssam88s
779780
780// Non-PC msdos
781pcd     // Siemens PC-D
782slicer  // 1983 Slicer Computers
783
784781// PC Junior
785782ibmpcjr   // 1984 IBM PC Jr
786783ibmpcjx   // 1985 IBM PC JX
trunk/src/mess/mess.mak
r243114r243115
796796   $(MESSOBJ)/siemens.a \
797797   $(MESSOBJ)/sinclair.a \
798798   $(MESSOBJ)/skeleton.a \
799   $(MESSOBJ)/slicer.a \
800799   $(MESSOBJ)/snk.a \
801800   $(MESSOBJ)/sony.a \
802801   $(MESSOBJ)/sord.a \
r243114r243115
16491648$(MESSOBJ)/siemens.a:           \
16501649   $(MESS_DRIVERS)/pcd.o       \
16511650
1652$(MESSOBJ)/slicer.a:           \
1653   $(MESS_DRIVERS)/slicer.o   \
1654
16551651$(MESSOBJ)/snk.a:               \
16561652   $(MESS_DRIVERS)/ng_aes.o    \
16571653   $(MESS_DRIVERS)/ngp.o $(MESS_VIDEO)/k1ge.o \
trunk/src/osd/modules/lib/osdlib_macosx.c
r243114r243115
1// This file is a placeholder.
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
211
312#include <sys/types.h>
413#include <signal.h>
r243114r243115
1827#include "sdlinc.h"
1928
2029//============================================================
30//  osd_getenv
31//============================================================
32
33char *osd_getenv(const char *name)
34{
35    return getenv(name);
36}
37
38//============================================================
39//  osd_setenv
40//============================================================
41
42int osd_setenv(const char *name, const char *value, int overwrite)
43{
44    return setenv(name, value, overwrite);
45}
46
47//============================================================
2148//  osd_process_kill
2249//============================================================
2350
r243114r243115
91118#endif
92119}
93120
121
94122//============================================================
95//  osd_getenv
123//  osd_alloc_executable
124//
125//  allocates "size" bytes of executable memory.  this must take
126//  things like NX support into account.
96127//============================================================
97128
98char *osd_getenv(const char *name)
129void *osd_alloc_executable(size_t size)
99130{
100    return getenv(name);
131#if defined(SDLMAME_BSD) || defined(SDLMAME_MACOSX)
132    return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
133#elif defined(SDLMAME_UNIX)
134    return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
135#endif
101136}
102137
103138//============================================================
104//  osd_setenv
139//  osd_free_executable
140//
141//  frees memory allocated with osd_alloc_executable
105142//============================================================
106143
107int osd_setenv(const char *name, const char *value, int overwrite)
144void osd_free_executable(void *ptr, size_t size)
108145{
109    return setenv(name, value, overwrite);
146#ifdef SDLMAME_SOLARIS
147    munmap((char *)ptr, size);
148#else
149    munmap(ptr, size);
150#endif
110151}
111152
112153//============================================================
154//  osd_break_into_debugger
155//============================================================
156
157void osd_break_into_debugger(const char *message)
158{
159    #ifdef MAME_DEBUG
160    printf("MAME exception: %s\n", message);
161    printf("Attempting to fall into debugger\n");
162    kill(getpid(), SIGTRAP);
163    #else
164    printf("Ignoring MAME exception: %s\n", message);
165    #endif
166}
167
168
169//============================================================
113170//  PROTOTYPES
114171//============================================================
115172
r243114r243115
177234}
178235
179236//============================================================
180//   osd_cycles
237//   osd_ticks
181238//============================================================
182239
183240osd_ticks_t osd_ticks(void)
r243114r243115
225282        usleep(msec*1000);
226283    }
227284}
228
trunk/src/osd/modules/lib/osdlib_os2.c
r243114r243115
1// This file is a placeholder.
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
211
12// standard sdl header
13#include "sdlinc.h"
14#include <unistd.h>
15#include <stdio.h>
16#include <string.h>
17#include <ctype.h>
18#include <stdlib.h>
19#include <sys/stat.h>
20
21#define INCL_DOS
22#include <os2.h>
23
324// MAME headers
25#include "osdcore.h"
426#include "osdlib.h"
27
28//============================================================
29//  osd_getenv
30//============================================================
31
32char *osd_getenv(const char *name)
33{
34    return getenv(name);
35}
36
37//============================================================
38//  osd_setenv
39//============================================================
40
41int osd_setenv(const char *name, const char *value, int overwrite)
42{
43    return setenv(name, value, overwrite);
44}
45
46//============================================================
47//  osd_process_kill
48//============================================================
49
50void osd_process_kill(void)
51{
52    fprintf(stderr,"osd_process_kill missing in OS/2 build\n");
53}
54
55//============================================================
56//  osd_num_processors
57//============================================================
58
59int osd_get_num_processors(void)
60{
61    ULONG numprocs = 1;
62
63    DosQuerySysInfo(QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numprocs, sizeof(numprocs));
64
65    return numprocs;
66}
67
68//============================================================
69//  osd_malloc
70//============================================================
71
72void *osd_malloc(size_t size)
73{
74#ifndef MALLOC_DEBUG
75    return malloc(size);
76#else
77#error "MALLOC_DEBUG not yet supported"
78#endif
79}
80
81
82//============================================================
83//  osd_malloc_array
84//============================================================
85
86void *osd_malloc_array(size_t size)
87{
88#ifndef MALLOC_DEBUG
89    return malloc(size);
90#else
91#error "MALLOC_DEBUG not yet supported"
92#endif
93}
94
95
96//============================================================
97//  osd_free
98//============================================================
99
100void osd_free(void *ptr)
101{
102#ifndef MALLOC_DEBUG
103    free(ptr);
104#else
105#error "MALLOC_DEBUG not yet supported"
106#endif
107}
108
109
110//============================================================
111//  osd_alloc_executable
112//
113//  allocates "size" bytes of executable memory.  this must take
114//  things like NX support into account.
115//============================================================
116
117void *osd_alloc_executable(size_t size)
118{
119    void *p;
120
121    DosAllocMem( &p, size, fALLOC );
122    return p;
123}
124
125//============================================================
126//  osd_free_executable
127//
128//  frees memory allocated with osd_alloc_executable
129//============================================================
130
131void osd_free_executable(void *ptr, size_t size)
132{
133    DosFreeMem( ptr );
134}
135
136//============================================================
137//  osd_break_into_debugger
138//============================================================
139
140void osd_break_into_debugger(const char *message)
141{
142    printf("Ignoring MAME exception: %s\n", message);
143}
144
145//============================================================
146//  PROTOTYPES
147//============================================================
148
149
150static osd_ticks_t init_cycle_counter(void);
151static osd_ticks_t performance_cycle_counter(void);
152
153//============================================================
154//  STATIC VARIABLES
155//============================================================
156
157// global cycle_counter function and divider
158static osd_ticks_t      (*cycle_counter)(void) = init_cycle_counter;
159static osd_ticks_t      (*ticks_counter)(void) = init_cycle_counter;
160static osd_ticks_t      ticks_per_second;
161
162//============================================================
163//  init_cycle_counter
164//
165//  to avoid total grossness, this function is split by subarch
166//============================================================
167
168static osd_ticks_t init_cycle_counter(void)
169{
170    osd_ticks_t start, end;
171    osd_ticks_t a, b;
172
173    ULONG  frequency;
174    PTIB   ptib;
175    ULONG  ulClass;
176    ULONG  ulDelta;
177
178    DosGetInfoBlocks( &ptib, NULL );
179    ulClass = HIBYTE( ptib->tib_ptib2->tib2_ulpri );
180    ulDelta = LOBYTE( ptib->tib_ptib2->tib2_ulpri );
181
182    if ( DosTmrQueryFreq( &frequency ) == 0 )
183    {
184        // use performance counter if available as it is constant
185        cycle_counter = performance_cycle_counter;
186        ticks_counter = performance_cycle_counter;
187
188        ticks_per_second = frequency;
189
190        // return the current cycle count
191        return (*cycle_counter)();
192    }
193    else
194    {
195        fprintf(stderr, "No Timer available!\n");
196        exit(-1);
197    }
198
199    // temporarily set our priority higher
200    DosSetPriority( PRTYS_THREAD, PRTYC_TIMECRITICAL, PRTYD_MAXIMUM, 0 );
201
202    // wait for an edge on the timeGetTime call
203    a = SDL_GetTicks();
204    do
205    {
206        b = SDL_GetTicks();
207    } while (a == b);
208
209    // get the starting cycle count
210    start = (*cycle_counter)();
211
212    // now wait for 1/4 second total
213    do
214    {
215        a = SDL_GetTicks();
216    } while (a - b < 250);
217
218    // get the ending cycle count
219    end = (*cycle_counter)();
220
221    // compute ticks_per_sec
222    ticks_per_second = (end - start) * 4;
223
224    // restore our priority
225    DosSetPriority( PRTYS_THREAD, ulClass, ulDelta, 0 );
226
227    // return the current cycle count
228    return (*cycle_counter)();
229}
230
231//============================================================
232//  performance_cycle_counter
233//============================================================
234
235static osd_ticks_t performance_cycle_counter(void)
236{
237    QWORD qwTime;
238
239    DosTmrQueryTime( &qwTime );
240    return (osd_ticks_t)qwTime.ulLo;
241}
242
243//============================================================
244//   osd_ticks
245//============================================================
246
247osd_ticks_t osd_ticks(void)
248{
249    return (*cycle_counter)();
250}
251
252
253//============================================================
254//  osd_ticks_per_second
255//============================================================
256
257osd_ticks_t osd_ticks_per_second(void)
258{
259    if (ticks_per_second == 0)
260    {
261        // if we haven't computed the value yet, there's no time like the present
262        init_cycle_counter();
263    }
264    return ticks_per_second;
265}
266
267
268//============================================================
269//  osd_sleep
270//============================================================
271
272void osd_sleep(osd_ticks_t duration)
273{
274    UINT32 msec;
275
276    // make sure we've computed ticks_per_second
277    if (ticks_per_second == 0)
278        (void)osd_ticks();
279
280    // convert to milliseconds, rounding down
281    msec = (UINT32)(duration * 1000 / ticks_per_second);
282
283    // only sleep if at least 2 full milliseconds
284    if (msec >= 2)
285    {
286        // take a couple of msecs off the top for good measure
287        msec -= 2;
288        usleep(msec*1000);
289    }
290}
291
trunk/src/osd/modules/lib/osdlib_unix.c
r243114r243115
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
111
212#include <stdlib.h>
313#include <unistd.h>
r243114r243115
3343}
3444
3545//============================================================
46//  osd_process_kill
47//============================================================
48
49void osd_process_kill(void)
50{
51    kill(getpid(), SIGKILL);
52}
53
54//============================================================
3655//  osd_num_processors
3756//============================================================
3857
r243114r243115
4766}
4867
4968//============================================================
50//  osd_process_kill
51//============================================================
52
53void osd_process_kill(void)
54{
55    kill(getpid(), SIGKILL);
56}
57
58//============================================================
5969//  osd_malloc
6070//============================================================
6171
r243114r243115
97107}
98108
99109//============================================================
100//   osd_cycles
110//  osd_alloc_executable
111//
112//  allocates "size" bytes of executable memory.  this must take
113//  things like NX support into account.
101114//============================================================
102115
116void *osd_alloc_executable(size_t size)
117{
118#if defined(SDLMAME_BSD) || defined(SDLMAME_MACOSX)
119    return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
120#elif defined(SDLMAME_UNIX)
121    return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
122#endif
123}
124
125//============================================================
126//  osd_free_executable
127//
128//  frees memory allocated with osd_alloc_executable
129//============================================================
130
131void osd_free_executable(void *ptr, size_t size)
132{
133#ifdef SDLMAME_SOLARIS
134    munmap((char *)ptr, size);
135#else
136    munmap(ptr, size);
137#endif
138}
139
140//============================================================
141//  osd_break_into_debugger
142//============================================================
143
144void osd_break_into_debugger(const char *message)
145{
146    #ifdef MAME_DEBUG
147    printf("MAME exception: %s\n", message);
148    printf("Attempting to fall into debugger\n");
149    kill(getpid(), SIGTRAP);
150    #else
151    printf("Ignoring MAME exception: %s\n", message);
152    #endif
153}
154
155
156//============================================================
157//   osd_ticks
158//============================================================
159
103160osd_ticks_t osd_ticks(void)
104161{
105162#ifdef SDLMAME_EMSCRIPTEN
r243114r243115
115172#endif
116173}
117174
175
176//============================================================
177//  osd_ticks_per_second
178//============================================================
179
118180osd_ticks_t osd_ticks_per_second(void)
119181{
120182    return (osd_ticks_t) 1000000;
trunk/src/osd/modules/lib/osdlib_win32.c
r243114r243115
11//============================================================
22//
3//  winos.c - Win32 OS specific low level code
3//  sdlos_*.c - OS specific low level code
44//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
510//============================================================
611
712#define WIN32_LEAN_AND_MEAN
r243114r243115
1823#include "osdcomm.h"
1924#include "osdcore.h"
2025
26#include "winutf8.h"
27
2128//============================================================
2229//  MACROS
2330//============================================================
r243114r243115
2835// align allocations to start or end of the page?
2936#define GUARD_ALIGN_START   0
3037
38
3139//============================================================
32//  osd_num_processors
40//  GLOBAL VARIABLES
3341//============================================================
3442
35int osd_get_num_processors(void)
36{
37    SYSTEM_INFO info;
43#ifdef OSD_WINDOWS
44void (*s_debugger_stack_crawler)() = NULL;
45#endif
3846
39    // otherwise, fetch the info from the system
40    GetSystemInfo(&info);
4147
42    // max out at 4 for now since scaling above that seems to do poorly
43    return MIN(info.dwNumberOfProcessors, 4);
44}
45
4648//============================================================
4749//  osd_getenv
4850//============================================================
r243114r243115
5254    return getenv(name);
5355}
5456
57
5558//============================================================
5659//  osd_setenv
5760//============================================================
r243114r243115
8790}
8891
8992//============================================================
93//  osd_num_processors
94//============================================================
95
96int osd_get_num_processors(void)
97{
98    SYSTEM_INFO info;
99
100    // otherwise, fetch the info from the system
101    GetSystemInfo(&info);
102
103    // max out at 4 for now since scaling above that seems to do poorly
104    return MIN(info.dwNumberOfProcessors, 4);
105}
106
107//============================================================
90108//  osd_malloc
91109//============================================================
92110
r243114r243115
169187
170188
171189//============================================================
190//  osd_alloc_executable
191//
192//  allocates "size" bytes of executable memory.  this must take
193//  things like NX support into account.
194//============================================================
195
196void *osd_alloc_executable(size_t size)
197{
198    return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
199}
200
201
202//============================================================
203//  osd_free_executable
204//
205//  frees memory allocated with osd_alloc_executable
206//============================================================
207
208void osd_free_executable(void *ptr, size_t size)
209{
210    VirtualFree(ptr, 0, MEM_RELEASE);
211}
212
213
214//============================================================
215//  osd_break_into_debugger
216//============================================================
217
218void osd_break_into_debugger(const char *message)
219{
220#ifdef OSD_WINDOWS
221    if (IsDebuggerPresent())
222    {
223        win_output_debug_string_utf8(message);
224        DebugBreak();
225    }
226    else if (s_debugger_stack_crawler != NULL)
227        (*s_debugger_stack_crawler)();
228#else
229    if (IsDebuggerPresent())
230    {
231        OutputDebugStringA(message);
232        DebugBreak();
233    }
234#endif
235}
236
237//============================================================
172238//  GLOBAL VARIABLES
173239//============================================================
174240
r243114r243115
228294    return ticks_per_second;
229295}
230296
231
232297//============================================================
233298//  osd_sleep
234299//============================================================
trunk/src/osd/sdl/sdl.mak
r243114r243115
411411   $(SDLOBJ)/sdlfile.o     \
412412   $(SDLOBJ)/sdlptty_$(BASE_TARGETOS).o    \
413413   $(SDLOBJ)/sdlsocket.o   \
414   $(SDLOBJ)/sdlmisc_$(BASE_TARGETOS).o    \
415414   $(SDLOBJ)/sdlos_$(SDLOS_TARGETOS).o \
416415   $(OSDOBJ)/modules/lib/osdlib_$(SDLOS_TARGETOS).o \
417416   $(OSDOBJ)/modules/sync/sync_$(SYNC_IMPLEMENTATION).o \
trunk/src/osd/sdl/sdlmisc_os2.c
r243114r243115
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
11
12// standard sdl header
13#include "sdlinc.h"
14#include <unistd.h>
15#include <stdio.h>
16#include <string.h>
17#include <ctype.h>
18#include <stdlib.h>
19
20#define INCL_DOS
21#include <os2.h>
22
23// MAME headers
24#include "osdcore.h"
25
26//============================================================
27//  osd_alloc_executable
28//
29//  allocates "size" bytes of executable memory.  this must take
30//  things like NX support into account.
31//============================================================
32
33void *osd_alloc_executable(size_t size)
34{
35   void *p;
36
37   DosAllocMem( &p, size, fALLOC );
38   return p;
39}
40
41//============================================================
42//  osd_free_executable
43//
44//  frees memory allocated with osd_alloc_executable
45//============================================================
46
47void osd_free_executable(void *ptr, size_t size)
48{
49   DosFreeMem( ptr );
50}
51
52//============================================================
53//  osd_break_into_debugger
54//============================================================
55
56void osd_break_into_debugger(const char *message)
57{
58   printf("Ignoring MAME exception: %s\n", message);
59}
trunk/src/osd/sdl/sdlmisc_unix.c
r243114r243115
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
11
12#include <sys/mman.h>
13#include <signal.h>
14#ifdef MAME_DEBUG
15#include <unistd.h>
16#endif
17
18// MAME headers
19#include "osdcore.h"
20
21
22//============================================================
23//  osd_alloc_executable
24//
25//  allocates "size" bytes of executable memory.  this must take
26//  things like NX support into account.
27//============================================================
28
29void *osd_alloc_executable(size_t size)
30{
31#if defined(SDLMAME_BSD) || defined(SDLMAME_MACOSX)
32   return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
33#elif defined(SDLMAME_UNIX)
34   return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
35#endif
36}
37
38//============================================================
39//  osd_free_executable
40//
41//  frees memory allocated with osd_alloc_executable
42//============================================================
43
44void osd_free_executable(void *ptr, size_t size)
45{
46#ifdef SDLMAME_SOLARIS
47   munmap((char *)ptr, size);
48#else
49   munmap(ptr, size);
50#endif
51}
52
53//============================================================
54//  osd_break_into_debugger
55//============================================================
56
57void osd_break_into_debugger(const char *message)
58{
59   #ifdef MAME_DEBUG
60   printf("MAME exception: %s\n", message);
61   printf("Attempting to fall into debugger\n");
62   kill(getpid(), SIGTRAP);
63   #else
64   printf("Ignoring MAME exception: %s\n", message);
65   #endif
66}
trunk/src/osd/sdl/sdlmisc_win32.c
r243114r243115
1//============================================================
2//
3//  sdlos_*.c - OS specific low level code
4//
5//  Copyright (c) 1996-2010, Nicola Salmoria and the MAME Team.
6//  Visit http://mamedev.org for licensing and usage restrictions.
7//
8//  SDLMAME by Olivier Galibert and R. Belmont
9//
10//============================================================
11
12// standard sdl header
13#include "sdlinc.h"
14
15
16#define WIN32_LEAN_AND_MEAN
17#include <windows.h>
18
19// MAME headers
20#include "osdcore.h"
21
22//============================================================
23//  osd_alloc_executable
24//
25//  allocates "size" bytes of executable memory.  this must take
26//  things like NX support into account.
27//============================================================
28
29void *osd_alloc_executable(size_t size)
30{
31   return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
32}
33
34//============================================================
35//  osd_free_executable
36//
37//  frees memory allocated with osd_alloc_executable
38//============================================================
39
40void osd_free_executable(void *ptr, size_t size)
41{
42   VirtualFree(ptr, 0, MEM_RELEASE);
43}
44
45//============================================================
46//  osd_break_into_debugger
47//============================================================
48
49void osd_break_into_debugger(const char *message)
50{
51   if (IsDebuggerPresent())
52   {
53      OutputDebugStringA(message);
54      DebugBreak();
55   }
56}
trunk/src/osd/sdl/sdlos_os2.c
r243114r243115
2323
2424// MAME headers
2525#include "osdcore.h"
26#include "osdlib.h"
2627
27
2828//============================================================
29//  PROTOTYPES
30//============================================================
31
32
33static osd_ticks_t init_cycle_counter(void);
34static osd_ticks_t performance_cycle_counter(void);
35
36//============================================================
37//  STATIC VARIABLES
38//============================================================
39
40// global cycle_counter function and divider
41static osd_ticks_t      (*cycle_counter)(void) = init_cycle_counter;
42static osd_ticks_t      (*ticks_counter)(void) = init_cycle_counter;
43static osd_ticks_t      ticks_per_second;
44
45//============================================================
46//  init_cycle_counter
47//
48//  to avoid total grossness, this function is split by subarch
49//============================================================
50
51static osd_ticks_t init_cycle_counter(void)
52{
53   osd_ticks_t start, end;
54   osd_ticks_t a, b;
55
56   ULONG  frequency;
57   PTIB   ptib;
58   ULONG  ulClass;
59   ULONG  ulDelta;
60
61   DosGetInfoBlocks( &ptib, NULL );
62   ulClass = HIBYTE( ptib->tib_ptib2->tib2_ulpri );
63   ulDelta = LOBYTE( ptib->tib_ptib2->tib2_ulpri );
64
65   if ( DosTmrQueryFreq( &frequency ) == 0 )
66   {
67      // use performance counter if available as it is constant
68      cycle_counter = performance_cycle_counter;
69      ticks_counter = performance_cycle_counter;
70
71      ticks_per_second = frequency;
72
73      // return the current cycle count
74      return (*cycle_counter)();
75   }
76   else
77   {
78      fprintf(stderr, "No Timer available!\n");
79      exit(-1);
80   }
81
82   // temporarily set our priority higher
83   DosSetPriority( PRTYS_THREAD, PRTYC_TIMECRITICAL, PRTYD_MAXIMUM, 0 );
84
85   // wait for an edge on the timeGetTime call
86   a = SDL_GetTicks();
87   do
88   {
89      b = SDL_GetTicks();
90   } while (a == b);
91
92   // get the starting cycle count
93   start = (*cycle_counter)();
94
95   // now wait for 1/4 second total
96   do
97   {
98      a = SDL_GetTicks();
99   } while (a - b < 250);
100
101   // get the ending cycle count
102   end = (*cycle_counter)();
103
104   // compute ticks_per_sec
105   ticks_per_second = (end - start) * 4;
106
107   // restore our priority
108   DosSetPriority( PRTYS_THREAD, ulClass, ulDelta, 0 );
109
110   // return the current cycle count
111   return (*cycle_counter)();
112}
113
114//============================================================
115//  performance_cycle_counter
116//============================================================
117
118static osd_ticks_t performance_cycle_counter(void)
119{
120   QWORD qwTime;
121
122   DosTmrQueryTime( &qwTime );
123   return (osd_ticks_t)qwTime.ulLo;
124}
125
126//============================================================
127//   osd_cycles
128//============================================================
129
130osd_ticks_t osd_ticks(void)
131{
132   return (*cycle_counter)();
133}
134
135
136//============================================================
137//  osd_ticks_per_second
138//============================================================
139
140osd_ticks_t osd_ticks_per_second(void)
141{
142   if (ticks_per_second == 0)
143   {
144      // if we haven't computed the value yet, there's no time like the present
145      init_cycle_counter();
146   }
147   return ticks_per_second;
148}
149
150
151//============================================================
152//  osd_sleep
153//============================================================
154
155void osd_sleep(osd_ticks_t duration)
156{
157   UINT32 msec;
158
159   // make sure we've computed ticks_per_second
160   if (ticks_per_second == 0)
161      (void)osd_ticks();
162
163   // convert to milliseconds, rounding down
164   msec = (UINT32)(duration * 1000 / ticks_per_second);
165
166   // only sleep if at least 2 full milliseconds
167   if (msec >= 2)
168   {
169      // take a couple of msecs off the top for good measure
170      msec -= 2;
171      usleep(msec*1000);
172   }
173}
174
175//============================================================
176//  osd_num_processors
177//============================================================
178
179int osd_get_num_processors(void)
180{
181   ULONG numprocs = 1;
182
183   DosQuerySysInfo(QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numprocs, sizeof(numprocs));
184
185   return numprocs;
186}
187
188//============================================================
189//  osd_malloc
190//============================================================
191
192void *osd_malloc(size_t size)
193{
194#ifndef MALLOC_DEBUG
195   return malloc(size);
196#else
197#error "MALLOC_DEBUG not yet supported"
198#endif
199}
200
201
202//============================================================
203//  osd_malloc_array
204//============================================================
205
206void *osd_malloc_array(size_t size)
207{
208#ifndef MALLOC_DEBUG
209   return malloc(size);
210#else
211#error "MALLOC_DEBUG not yet supported"
212#endif
213}
214
215
216//============================================================
217//  osd_free
218//============================================================
219
220void osd_free(void *ptr)
221{
222#ifndef MALLOC_DEBUG
223   free(ptr);
224#else
225#error "MALLOC_DEBUG not yet supported"
226#endif
227}
228
229//============================================================
230//  osd_getenv
231//============================================================
232
233char *osd_getenv(const char *name)
234{
235   return getenv(name);
236}
237
238//============================================================
239//  osd_setenv
240//============================================================
241
242int osd_setenv(const char *name, const char *value, int overwrite)
243{
244   return setenv(name, value, overwrite);
245}
246
247
248//============================================================
24929//  osd_get_clipboard_text
25030//    - used in MESS
25131//============================================================
trunk/src/osd/windows/windows.mak
r243114r243115
349349   $(WINOBJ)/strconv.o \
350350   $(WINOBJ)/windir.o \
351351   $(WINOBJ)/winfile.o \
352   $(WINOBJ)/winmisc.o \
353352   $(OSDOBJ)/modules/sync/sync_windows.o \
354353   $(WINOBJ)/winutf8.o \
355354   $(WINOBJ)/winutil.o \
trunk/src/osd/windows/winmisc.c
r243114r243115
1// license:BSD-3-Clause
2// copyright-holders:Aaron Giles
3//============================================================
4//
5//  winmisc.c - Win32 OSD core miscellaneous functions
6//
7//============================================================
8
9// standard windows headers
10#define WIN32_LEAN_AND_MEAN
11#include <windows.h>
12#include <tchar.h>
13
14// MAME headers
15#include "osdcore.h"
16
17// MAMEOS headers
18#include "winutf8.h"
19#include "strconv.h"
20#include "strconv.h"
21
22
23//============================================================
24//  GLOBAL VARIABLES
25//============================================================
26
27void (*s_debugger_stack_crawler)() = NULL;
28
29
30//============================================================
31//  osd_alloc_executable
32//============================================================
33
34void *osd_alloc_executable(size_t size)
35{
36   return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
37}
38
39
40//============================================================
41//  osd_free_executable
42//============================================================
43
44void osd_free_executable(void *ptr, size_t size)
45{
46   VirtualFree(ptr, 0, MEM_RELEASE);
47}
48
49
50//============================================================
51//  osd_break_into_debugger
52//============================================================
53
54void osd_break_into_debugger(const char *message)
55{
56   if (IsDebuggerPresent())
57   {
58      win_output_debug_string_utf8(message);
59      DebugBreak();
60   }
61   else if (s_debugger_stack_crawler != NULL)
62      (*s_debugger_stack_crawler)();
63}


Previous 199869 Revisions Next


© 1997-2024 The MAME Team