Previous 15994 Revisions Next

r14348 Sunday 5th February, 2012 at 08:31:42 UTC by Miodrag Milanović
Sync with MAME r15303 (nw)
[src/emu]audit.c drawgfx.c drawgfx.h ioport.c ioport.h rendlay.c tilemap.c tilemap.h uigfx.c
[src/emu/cpu/e132xs]32xsdasm.c
[src/emu/debug]debugcpu.c
[src/emu/machine]msm6242.c
[src/emu/sound]samples.c
[src/emu/video]tms9928a.c tms9928a.h
[src/mame]mame.lst mame.mak
[src/mame/audio]8080bw.c astrof.c blockade.c carnival.c cinemat.c circus.c depthch.c dkong.c dsbz80.c* dsbz80.h* gorf.c invinco.c mw8080bw.c pulsar.c segag80r.c snk6502.c spacefb.c targ.c triplhnt.c turbo.c vicdual.c wow.c zaxxon.c
[src/mame/drivers]actfancr.c aristmk4.c astinvad.c astrocde.c calchase.c cliffhgr.c cosmic.c dai3wksi.c equites.c galaga.c gaplus.c gottlieb.c gotya.c gridlee.c m10.c mcr.c meadows.c model1.c namcos12.c neodrvr.c rallyx.c safarir.c segag80v.c starcrus.c tankbatt.c thief.c truco.c vamphalf.c xmen.c
[src/mame/includes]model1.h
[src/mame/video]seta.c stvvdp2.c zaxxon.c

src/mame/mame.lst
r14347r14348
58755875xmen         // GX065 (c) 1992 (US)
58765876xmenj         // GX065 (c) 1992 (Japan)
58775877xmene         // GX065 (c) 1992 (Europe)
5878xmena         // GX065 (c) 1992 (Asia)
58785879xmen2pe         // GX065 (c) 1992 (World)
58795880xmen2pa         // GX065 (c) 1992 (Asia)
58805881xmen2pj         // GX065 (c) 1992 (Japan)
r14347r14348
1017110172quake         // (c) 19?? Lazer-Tron / iD Software
1017210173majorpkr      // (c) 1994 PAL System.
1017310174su2000         // (c) 1993 Virtuality
10175boonggab      // (c) 2001 Taff System
1017410176
1017510177// Nexus 3D
1017610178
src/mame/audio/spacefb.c
r14347r14348
7070static const char *const spacefb_sample_names[] =
7171{
7272   "*spacefb",
73   "ekilled.wav",
74   "shipfire.wav",
75   "explode1.wav",
76   "explode2.wav",
73   "ekilled",
74   "shipfire",
75   "explode1",
76   "explode2",
7777   0
7878};
7979
src/mame/audio/turbo.c
r14347r14348
172172static const char *const turbo_sample_names[] =
173173{
174174   "*turbo",
175   "01.wav",      /* 0: Trig1 */
176   "02.wav",      /* 1: Trig2 */
177   "03.wav",      /* 2: Trig3 */
178   "04.wav",      /* 3: Trig4 */
179   "05.wav",      /* 4: Screech */
180   "06.wav",      /* 5: Crash */
181   "skidding.wav",   /* 6: Spin */
182   "idle.wav",      /* 7: Idle */
183   "ambulanc.wav",   /* 8: Ambulance */
175   "01",      /* 0: Trig1 */
176   "02",      /* 1: Trig2 */
177   "03",      /* 2: Trig3 */
178   "04",      /* 3: Trig4 */
179   "05",      /* 4: Screech */
180   "06",      /* 5: Crash */
181   "skidding",   /* 6: Spin */
182   "idle",      /* 7: Idle */
183   "ambulanc",   /* 8: Ambulance */
184184   0
185185};
186186
r14347r14348
428428static const char *const subroc3d_sample_names[] =
429429{
430430   "*subroc3d",
431   "01.wav",   /*  0: enemy missile */
432   "02.wav",   /*  1: enemy torpedo */
433   "03.wav",   /*  2: enemy fighter */
434   "04.wav",   /*  3: explosion in sky */
435   "05.wav",   /*  4: explosion on sea */
436   "06.wav",   /*  5: missile shoot */
437   "07.wav",   /*  6: torpedo shoot */
438   "08.wav",   /*  7: my ship expl */
439   "09.wav",   /*  8: prolog sound */
440   "11.wav",   /*  9: alarm 0 */
441   "12.wav",   /* 10: alarm 1 */
431   "01",   /*  0: enemy missile */
432   "02",   /*  1: enemy torpedo */
433   "03",   /*  2: enemy fighter */
434   "04",   /*  3: explosion in sky */
435   "05",   /*  4: explosion on sea */
436   "06",   /*  5: missile shoot */
437   "07",   /*  6: torpedo shoot */
438   "08",   /*  7: my ship expl */
439   "09",   /*  8: prolog sound */
440   "11",   /*  9: alarm 0 */
441   "12",   /* 10: alarm 1 */
442442   0
443443};
444444
r14347r14348
583583static const char *const buckrog_sample_names[]=
584584{
585585   "*buckrog",
586   "alarm0.wav",   /* 0 */
587   "alarm1.wav",   /* 1 */
588   "alarm2.wav",   /* 2 */
589   "alarm3.wav",   /* 3 */
590   "exp.wav",      /* 4 */
591   "fire.wav",      /* 5 */
592   "rebound.wav",   /* 6 */
593   "hit.wav",      /* 7 */
594   "shipsnd1.wav",   /* 8 */
595   "shipsnd2.wav",   /* 9 */
596   "shipsnd3.wav",   /* 10 */
586   "alarm0",   /* 0 */
587   "alarm1",   /* 1 */
588   "alarm2",   /* 2 */
589   "alarm3",   /* 3 */
590   "exp",      /* 4 */
591   "fire",      /* 5 */
592   "rebound",   /* 6 */
593   "hit",      /* 7 */
594   "shipsnd1",   /* 8 */
595   "shipsnd2",   /* 9 */
596   "shipsnd3",   /* 10 */
597597   0
598598};
599599
src/mame/audio/gorf.c
r14347r14348
7979
8080const char *const gorf_sample_names[] =
8181{
82 "*gorf","a.wav","a.wav","again.wav","am.wav","am.wav","and.wav","anhilatn.wav",
83 "another.wav","another.wav","are.wav","are.wav",
84 "avenger.wav","bad.wav","bad.wav","be.wav",
85 "been.wav","but.wav","button.wav","cadet.wav",
86 "cannot.wav","captain.wav","chronicl.wav","coin.wav","coins.wav","colonel.wav",
87 "consciou.wav","defender.wav","destroy.wav","destroyd.wav",
88 "doom.wav","draws.wav","empire.wav","end.wav",
89 "enemy.wav","escape.wav","flagship.wav","for.wav","galactic.wav",
90 "general.wav","gorf.wav","gorphian.wav","gorphian.wav","gorphins.wav",
91 "hahahahu.wav","hahaher.wav","harder.wav","have.wav",
92 "hitting.wav","i.wav","i.wav","impossib.wav","in.wav","insert.wav",
93 "is.wav","live.wav","long.wav","meet.wav","move.wav",
94 "my.wav","my.wav",
95 "near.wav","next.wav","nice.wav","no.wav",
96 "now.wav","pause.wav","player.wav","prepare.wav","prisonrs.wav",
97 "promoted.wav","push.wav","robot.wav","robots.wav","robots.wav",
98 "seek.wav","ship.wav","shot.wav","some.wav","space.wav","spause.wav",
99 "survival.wav","take.wav","the.wav","the.wav","the.wav","time.wav",
100 "to.wav","to.wav","unbeatab.wav",
101 "warrior.wav","warriors.wav","will.wav",
102 "you.wav","you.wav","you.wav","you.wav","your.wav","your.wav","yourself.wav",
103 "s.wav","for.wav","for.wav","will.wav","gorph.wav",
82 "*gorf","a","a","again","am","am","and","anhilatn",
83 "another","another","are","are",
84 "avenger","bad","bad","be",
85 "been","but","button","cadet",
86 "cannot","captain","chronicl","coin","coins","colonel",
87 "consciou","defender","destroy","destroyd",
88 "doom","draws","empire","end",
89 "enemy","escape","flagship","for","galactic",
90 "general","gorf","gorphian","gorphian","gorphins",
91 "hahahahu","hahaher","harder","have",
92 "hitting","i","i","impossib","in","insert",
93 "is","live","long","meet","move",
94 "my","my",
95 "near","next","nice","no",
96 "now","pause","player","prepare","prisonrs",
97 "promoted","push","robot","robots","robots",
98 "seek","ship","shot","some","space","spause",
99 "survival","take","the","the","the","time",
100 "to","to","unbeatab",
101 "warrior","warriors","will",
102 "you","you","you","you","your","your","yourself",
103 "s","for","for","will","gorph",
104104// Missing Samples
105 "coin.wav", "attack.wav","bite.wav","conquer.wav","devour.wav","dust.wav",
106 "galaxy.wav","got.wav","power.wav","try.wav","supreme.wav","all.wav",
107 "hail.wav","emperor.wav",
105 "coin", "attack","bite","conquer","devour","dust",
106 "galaxy","got","power","try","supreme","all",
107 "hail","emperor",
108108 0
109109};
110110
src/mame/audio/depthch.c
r14347r14348
2121static const char *const depthch_sample_names[] =
2222{
2323   "*depthch",
24   "longex.wav",
25   "shortex.wav",
26   "spray.wav",
27   "sonar.wav",
24   "longex",
25   "shortex",
26   "spray",
27   "sonar",
2828   0
2929};
3030
src/mame/audio/carnival.c
r14347r14348
8383static const char *const carnival_sample_names[] =
8484{
8585   "*carnival",
86   "bear.wav",
87   "bonus1.wav",
88   "bonus2.wav",
89   "clang.wav",
90   "duck1.wav",
91   "duck2.wav",
92   "duck3.wav",
93   "pipehit.wav",
94   "ranking.wav",
95   "rifle.wav",
86   "bear",
87   "bonus1",
88   "bonus2",
89   "clang",
90   "duck1",
91   "duck2",
92   "duck3",
93   "pipehit",
94   "ranking",
95   "rifle",
9696   0
9797};
9898
src/mame/audio/blockade.c
r14347r14348
5959static const char *const blockade_sample_names[] =
6060{
6161   "*blockade",
62   "boom.wav",
62   "boom",
6363   0
6464};
6565
src/mame/audio/segag80r.c
r14347r14348
158158static const char *const astrob_sample_names[] =
159159{
160160   "*astrob",
161   "invadr1.wav",      /* 0 */
162   "winvadr1.wav",      /* 1 */
163   "invadr2.wav",      /* 2 */
164   "winvadr2.wav",      /* 3 */
165   "invadr3.wav",      /* 4 */
166   "winvadr3.wav",      /* 5 */
167   "invadr4.wav",      /* 6 */
168   "winvadr4.wav",      /* 7 */
169   "asteroid.wav",      /* 8 */
170   "refuel.wav",      /* 9 */
171   "pbullet.wav",      /* 10 */
172   "ebullet.wav",      /* 11 */
173   "eexplode.wav",      /* 12 */
174   "pexplode.wav",      /* 13 */
175   "deedle.wav",      /* 14 */
176   "sonar.wav",      /* 15 */
161   "invadr1",      /* 0 */
162   "winvadr1",      /* 1 */
163   "invadr2",      /* 2 */
164   "winvadr2",      /* 3 */
165   "invadr3",      /* 4 */
166   "winvadr3",      /* 5 */
167   "invadr4",      /* 6 */
168   "winvadr4",      /* 7 */
169   "asteroid",      /* 8 */
170   "refuel",      /* 9 */
171   "pbullet",      /* 10 */
172   "ebullet",      /* 11 */
173   "eexplode",      /* 12 */
174   "pexplode",      /* 13 */
175   "deedle",      /* 14 */
176   "sonar",      /* 15 */
177177   0
178178};
179179
r14347r14348
386386static const char *const sega005_sample_names[] =
387387{
388388   "*005",
389   "lexplode.wav",      /* 0 */
390   "sexplode.wav",      /* 1 */
391   "dropbomb.wav",      /* 2 */
392   "shoot.wav",      /* 3 */
393   "missile.wav",      /* 4 */
394   "helicopt.wav",      /* 5 */
395   "whistle.wav",      /* 6 */
389   "lexplode",      /* 0 */
390   "sexplode",      /* 1 */
391   "dropbomb",      /* 2 */
392   "shoot",      /* 3 */
393   "missile",      /* 4 */
394   "helicopt",      /* 5 */
395   "whistle",      /* 6 */
396396   0
397397};
398398
r14347r14348
637637static const char *const spaceod_sample_names[] =
638638{
639639   "*spaceod",
640   "fire.wav",         /* 0 */
641   "bomb.wav",         /* 1 */
642   "eexplode.wav",    /* 2 */
643   "pexplode.wav",      /* 3 */
644   "warp.wav",       /* 4 */
645   "birth.wav",      /* 5 */
646   "scoreup.wav",      /* 6 */
647   "ssound.wav",      /* 7 */
648   "accel.wav",      /* 8 */
649   "damaged.wav",      /* 9 */
650   "erocket.wav",      /* 10 */
640   "fire",         /* 0 */
641   "bomb",         /* 1 */
642   "eexplode",    /* 2 */
643   "pexplode",      /* 3 */
644   "warp",       /* 4 */
645   "birth",      /* 5 */
646   "scoreup",      /* 6 */
647   "ssound",      /* 7 */
648   "accel",      /* 8 */
649   "damaged",      /* 9 */
650   "erocket",      /* 10 */
651651   0
652652};
653653
r14347r14348
773773static const char *const monsterb_sample_names[] =
774774{
775775   "*monsterb",
776   "zap.wav",
777   "jumpdown.wav",
776   "zap",
777   "jumpdown",
778778   0
779779};
780780
src/mame/audio/dsbz80.c
r0r14348
1/***************************************************************************
2
3  Sega Z80 Digital Sound Board
4
5  used for Model 1/2/3
6
7***************************************************************************/
8
9#define ADDRESS_MAP_MODERN
10
11#include "emu.h"
12#include "audio/dsbz80.h"
13
14#define   Z80_TAG   "mpegcpu"
15#define YMZ770_TAG   "ymz770"
16
17static ADDRESS_MAP_START( dsbz80_map, AS_PROGRAM, 8, dsbz80_device )
18   AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION(":mpegcpu", 0)
19    AM_RANGE(0x8000, 0xffff) AM_RAM
20ADDRESS_MAP_END
21
22static ADDRESS_MAP_START( dsbz80io_map, AS_IO, 8, dsbz80_device )
23    AM_RANGE(0xe0, 0xe0) AM_MIRROR(0xff00) AM_WRITE(mpeg_trigger_w)
24    AM_RANGE(0xe2, 0xe4) AM_MIRROR(0xff00) AM_READWRITE(mpeg_pos_r, mpeg_start_w)
25    AM_RANGE(0xe5, 0xe7) AM_MIRROR(0xff00) AM_WRITE(mpeg_end_w)
26    AM_RANGE(0xe8, 0xe8) AM_MIRROR(0xff00) AM_WRITE(mpeg_volume_w)
27    AM_RANGE(0xe9, 0xe9) AM_MIRROR(0xff00) AM_WRITE(mpeg_stereo_w)
28    AM_RANGE(0xf0, 0xf0) AM_MIRROR(0xff00) AM_READ(latch_r)
29    AM_RANGE(0xf1, 0xf1) AM_MIRROR(0xff00) AM_READ(status_r)
30ADDRESS_MAP_END
31
32
33MACHINE_CONFIG_FRAGMENT( dsbz80 )
34    MCFG_CPU_ADD(Z80_TAG, Z80, 1000000)     /* unknown clock, but probably pretty slow considering the z80 does like nothing */
35   MCFG_CPU_PROGRAM_MAP(dsbz80_map)
36    MCFG_CPU_IO_MAP(dsbz80io_map)
37#if 0
38    MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
39    MCFG_YMZ770_ADD(YMZ770_TAG, 8000000)    /* clock ignored for this */
40   MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
41   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
42#endif
43MACHINE_CONFIG_END
44
45//**************************************************************************
46//  GLOBAL VARIABLES
47//**************************************************************************
48
49const device_type DSBZ80 = &device_creator<dsbz80_device>;
50
51
52//-------------------------------------------------
53//  machine_config_additions - device-specific
54//  machine configurations
55//-------------------------------------------------
56
57machine_config_constructor dsbz80_device::device_mconfig_additions() const
58{
59   return MACHINE_CONFIG_NAME( dsbz80 );
60}
61
62//**************************************************************************
63//  LIVE DEVICE
64//**************************************************************************
65
66//-------------------------------------------------
67//  dsbz80_device - constructor
68//-------------------------------------------------
69
70dsbz80_device::dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
71    device_t(mconfig, DSBZ80, "Sega Z80-based Digital Sound Board", tag, owner, clock),
72   m_ourcpu(*this, Z80_TAG),
73   m_ymz770(*this, YMZ770_TAG)
74{
75}
76
77//-------------------------------------------------
78//  device_start - device-specific startup
79//-------------------------------------------------
80
81void dsbz80_device::device_start()
82{
83}
84
85//-------------------------------------------------
86//  device_reset - device-specific reset
87//-------------------------------------------------
88
89void dsbz80_device::device_reset()
90{
91   m_dsb_latch = 0;
92   status = 1;
93    start = end = 0;
94}
95
96WRITE8_MEMBER(dsbz80_device::latch_w)
97{
98   device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, ASSERT_LINE);
99    m_dsb_latch = data;
100    status |= 2;
101//    printf("%02x to DSB latch\n", data);
102}
103
104READ8_MEMBER(dsbz80_device::latch_r)
105{
106   device_set_input_line(m_ourcpu, INPUT_LINE_IRQ0, CLEAR_LINE);
107//    printf("DSB Z80 read %02x\n", m_dsb_latch);
108   status &= ~2;
109    return m_dsb_latch;
110}
111
112WRITE8_MEMBER(dsbz80_device::mpeg_trigger_w)
113{
114   mp_state = data;
115
116   if (data == 0)   // stop
117   {
118//      MPEG_Stop_Playing();
119//        printf("MPEG stop\n");
120   }
121   else if (data == 1)   // play without loop
122   {
123//      MPEG_Set_Loop(NULL, 0);
124//      MPEG_Play_Memory(ROM + mp_start, mp_end-mp_start);
125//        printf("MPEG start, one-shot from %x\n", mp_start);
126   }
127   else if (data == 2)   // play with loop
128   {
129//      MPEG_Play_Memory(ROM + mp_start, mp_end-mp_start);
130//        printf("MPEG start, loop from %x\n", mp_start);
131   }
132}
133
134READ8_MEMBER(dsbz80_device::mpeg_pos_r)
135{
136   int mp_prg = 0; //MPEG_Get_Progress();   // returns the byte offset currently playing
137
138   mp_prg += mp_start;
139
140   switch (offset)
141   {
142      case 0:
143         return (mp_prg>>16)&0xff;
144         break;
145      case 1:
146         return (mp_prg>>8)&0xff;
147         break;
148      case 2:
149         return mp_prg&0xff;
150         break;
151   }
152
153   return 0;
154}
155
156/* NOTE: writes to the start and end while playback is already in progress
157   get latched.  When the current stream ends, the MPEG hardware starts playing
158   immediately from the latched start and end position.  In this way, the Z80
159   enforces looping where appropriate and multi-part songs in other cases
160   (song #16 is a good example)
161*/
162
163WRITE8_MEMBER(dsbz80_device::mpeg_start_w)
164{
165   switch (offset)
166   {
167      case 0:
168         start &= 0x00ffff;
169         start |= (int)data<<16;
170         break;
171      case 1:
172         start &= 0xff00ff;
173         start |= (int)data<<8;
174         break;
175      case 2:
176         start &= 0xffff00;
177         start |= data;
178
179         if (mp_state == 0)
180         {
181            mp_start = start;
182         }
183         else
184         {
185            lp_start = start;
186            // SWA: if loop end is zero, it means "keep previous end marker"
187            if (lp_end == 0)
188            {
189//               MPEG_Set_Loop(ROM + lp_start, mp_end-lp_start);
190            }
191            else
192            {
193//               MPEG_Set_Loop(ROM + lp_start, lp_end-lp_start);
194            }
195         }
196         break;
197   }
198}
199
200WRITE8_MEMBER(dsbz80_device::mpeg_end_w)
201{
202   switch (offset)
203   {
204      case 0:
205         end &= 0x00ffff;
206         end |= (int)data<<16;
207         break;
208      case 1:
209         end &= 0xff00ff;
210         end |= (int)data<<8;
211         break;
212      case 2:
213         end &= 0xffff00;
214         end |= data;
215
216         if (mp_state == 0)
217         {
218            mp_end = end;
219         }
220         else
221         {
222            lp_end = end;
223//            MPEG_Set_Loop(ROM + lp_start, lp_end-lp_start);
224         }
225         break;
226   }
227}
228
229WRITE8_MEMBER(dsbz80_device::mpeg_volume_w)
230{
231   mp_vol = 0x7f - data;
232}
233
234WRITE8_MEMBER(dsbz80_device::mpeg_stereo_w)
235{
236   mp_pan = data & 3;
237}
238
239READ8_MEMBER(dsbz80_device::status_r)
240{
241   // bit 0 = ??? (must be 1 for most games)
242   // bit 1 = command is pending (used by SWA instead of IRQ)
243   // other bits = ???
244   // SWA requires that status & 0x38 = 0 or else it loops endlessly...
245   return status;
246}
src/mame/audio/dsbz80.h
r0r14348
1#pragma once
2
3#ifndef __DSBZ80_H__
4#define __DSBZ80_H__
5
6#include "emu.h"
7#include "cpu/z80/z80.h"
8#include "sound/ymz770.h"
9
10#define DSBZ80_TAG "dsbz80"
11
12#define MCFG_DSBZ80_ADD(_tag) \
13    MCFG_DEVICE_ADD(_tag, DSBZ80, 0)
14
15//**************************************************************************
16//  TYPE DEFINITIONS
17//**************************************************************************
18
19class dsbz80_device : public device_t
20{
21public:
22    // construction/destruction
23    dsbz80_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
24
25    // optional information overrides
26    virtual machine_config_constructor device_mconfig_additions() const;
27
28    DECLARE_WRITE8_MEMBER(latch_w);
29
30    required_device<cpu_device> m_ourcpu;
31    optional_device<ymz770_device> m_ymz770;
32
33    DECLARE_WRITE8_MEMBER(mpeg_trigger_w);
34    DECLARE_WRITE8_MEMBER(mpeg_start_w);
35    DECLARE_WRITE8_MEMBER(mpeg_end_w);
36    DECLARE_WRITE8_MEMBER(mpeg_volume_w);
37    DECLARE_WRITE8_MEMBER(mpeg_stereo_w);
38    DECLARE_READ8_MEMBER(mpeg_pos_r);
39    DECLARE_READ8_MEMBER(latch_r);
40    DECLARE_READ8_MEMBER(status_r);
41
42protected:
43    // device-level overrides
44    virtual void device_start();
45    virtual void device_reset();
46
47private:
48    UINT8 m_dsb_latch;
49    UINT32 mp_start, mp_end, mp_vol, mp_pan, mp_state, lp_start, lp_end, start, end;
50    int status;
51};
52
53
54// device type definition
55extern const device_type DSBZ80;
56
57#endif  /* __DSBZ80_H__ */
src/mame/audio/8080bw.c
r14347r14348
107107static const char *const lrescue_sample_names[] =
108108{
109109   "*lrescue",
110   "alienexplosion.wav",
111   "rescueshipexplosion.wav",
112   "beamgun.wav",
113   "thrust.wav",
114   "bonus2.wav",
115   "bonus3.wav",
116   "shootingstar.wav",
117   "stepl.wav",
118   "steph.wav",
110   "alienexplosion",
111   "rescueshipexplosion",
112   "beamgun",
113   "thrust",
114   "bonus2",
115   "bonus3",
116   "shootingstar",
117   "stepl",
118   "steph",
119119   0
120120};
121121
src/mame/audio/targ.c
r14347r14348
136136static const char *const sample_names[] =
137137{
138138   "*targ",
139   "expl.wav",
140   "shot.wav",
141   "sexpl.wav",
142   "spslow.wav",
143   "spfast.wav",
139   "expl",
140   "shot",
141   "sexpl",
142   "spslow",
143   "spfast",
144144   0
145145};
146146
src/mame/audio/invinco.c
r14347r14348
2323static const char *const invinco_sample_names[] =
2424{
2525   "*invinco",
26   "saucer.wav",
27   "move1.wav",
28   "move2.wav",
29   "fire.wav",
30   "invhit.wav",
31   "shiphit.wav",
32   "move3.wav",   /* currently not used */
33   "move4.wav",   /* currently not used */
26   "saucer",
27   "move1",
28   "move2",
29   "fire",
30   "invhit",
31   "shiphit",
32   "move3",   /* currently not used */
33   "move4",   /* currently not used */
3434   0
3535};
3636
src/mame/audio/pulsar.c
r14347r14348
3636static const char *const pulsar_sample_names[] =
3737{
3838   "*pulsar",
39   "clang.wav",
40   "key.wav",
41   "alienhit.wav",
42   "phit.wav",
43   "ashoot.wav",
44   "pshoot.wav",
45   "bonus.wav",
46   "sizzle.wav",
47   "gate.wav",
48   "birth.wav",
49   "hbeat.wav",
50   "movmaze.wav",
39   "clang",
40   "key",
41   "alienhit",
42   "phit",
43   "ashoot",
44   "pshoot",
45   "bonus",
46   "sizzle",
47   "gate",
48   "birth",
49   "hbeat",
50   "movmaze",
5151   0
5252};
5353
src/mame/audio/wow.c
r14347r14348
4141 0
4242};
4343
44/* Missing samples : ready.wav from.wav one.wav bite.wav youl.wav explode.wav if.wav myself.wav back.wav
45   cant.wav do.wav wait.wav worlings.wav very.wav babies.wav breath.wav fire.wav beat.wav rest.wav
46   then.wav never.wav worlock.wav escape.wav door.wav try.wav any.wav harder.wav only.wav meet.wav with.wav
47   doom.wav pop.wav
44/* Missing samples : ready,  from,  one,  bite,  youl,  explode,  if,  myself,  back,
45   cant,  do,  wait,  worlings,  very,  babies,  breath,  fire,  beat,  rest,
46   then,  never,  worlock,  escape,  door,  try,  any,  harder,  only,  meet,  with,
47   doom,  pop,
4848   Problems with YOU and YOU'LL and YOU'DD */
4949
5050static const char *const wowWordTable[] =
r14347r14348
7777const char *const wow_sample_names[] =
7878{
7979   "*wow",
80   "a.wav", "again.wav", "ahh.wav", "am.wav", "and.wav",
81   "anew.wav", "another.wav", "any.wav", "anyone.wav", "appear.wav", "are.wav", "are.wav", "babies.wav", "back.wav",
82   "beat.wav", "become.wav", "best.wav", "better.wav", "bite.wav", "bones.wav", "breath.wav", "but.wav", "can.wav", "cant.wav",
83   "chance.wav", "chest.wav", "coin.wav", "dance.wav", "destroy.wav",
84   "develop.wav", "do.wav", "dont.wav", "doom.wav", "door.wav", "draw.wav", "dungeon.wav", "dungeons.wav",
85   "each.wav", "eaten.wav", "escape.wav", "explode.wav", "fear.wav", "find.wav", "find.wav", "fire.wav", "for.wav", "from.wav",
86   "garwor.wav", "get.wav", "get.wav", "get.wav", "getting.wav", "good.wav", "hahahaha.wav", "harder.wav",
87   "hasnt.wav", "have.wav", "heavyw.wav", "hey.wav", "hope.wav",
88   "hungry.wav", "hungry.wav", "hurry.wav", "i.wav", "i.wav", "if.wav", "if.wav", "im.wav", "i1.wav", "ill.wav", "in.wav",
89   "insert.wav", "invisibl.wav", "it.wav", "lie.wav", "magic.wav",
90   "magical.wav", "me.wav", "meet.wav", "months.wav",
91   "my.wav", "my.wav", "my.wav", "my.wav", "my.wav", "myself.wav", "near.wav", "never.wav",
92   "now.wav", "of.wav", "off.wav", "one.wav", "only.wav", "oven.wav", "pause.wav", "pets.wav", "powerful.wav", "pop.wav",
93   "radar.wav", "ready.wav",
94   "rest.wav", "say.wav", "science.wav", "see.wav", "spause.wav", "start.wav", "the.wav", "the.wav", "the.wav", "the.wav", "then.wav",
95   "through.wav", "thurwor.wav", "time.wav", "to.wav", "to.wav", "to.wav", "treasure.wav", "try.wav", "very.wav", "wait.wav",
96   "war.wav", "warrior.wav", "watch.wav", "we.wav", "welcome.wav",
97   "were.wav", "while.wav", "will.wav", "with.wav", "wizard.wav", "wont.wav",
98   "wor.wav", "world.wav", "worlings.wav", "worlock.wav",
99   "you.wav", "you.wav", "you.wav", "you.wav", "you.wav", "youl.wav", "youl.wav", "youd.wav", "your.wav",0
80   "a", "again", "ahh", "am", "and",
81   "anew", "another", "any", "anyone", "appear", "are", "are", "babies", "back",
82   "beat", "become", "best", "better", "bite", "bones", "breath", "but", "can", "cant",
83   "chance", "chest", "coin", "dance", "destroy",
84   "develop", "do", "dont", "doom", "door", "draw", "dungeon", "dungeons",
85   "each", "eaten", "escape", "explode", "fear", "find", "find", "fire", "for", "from",
86   "garwor", "get", "get", "get", "getting", "good", "hahahaha", "harder",
87   "hasnt", "have", "heavyw", "hey", "hope",
88   "hungry", "hungry", "hurry", "i", "i", "if", "if", "im", "i1", "ill", "in",
89   "insert", "invisibl", "it", "lie", "magic",
90   "magical", "me", "meet", "months",
91   "my", "my", "my", "my", "my", "myself", "near", "never",
92   "now", "of", "off", "one", "only", "oven", "pause", "pets", "powerful", "pop",
93   "radar", "ready",
94   "rest", "say", "science", "see", "spause", "start", "the", "the", "the", "the", "then",
95   "through", "thurwor", "time", "to", "to", "to", "treasure", "try", "very", "wait",
96   "war", "warrior", "watch", "we", "welcome",
97   "were", "while", "will", "with", "wizard", "wont",
98   "wor", "world", "worlings", "worlock",
99   "you", "you", "you", "you", "you", "youl", "youl", "youd", "your",0
100100};
101101
102102
src/mame/audio/cinemat.c
r14347r14348
124124static const char *const spacewar_sample_names[] =
125125{
126126   "*spacewar",
127   "explode1.wav",
128   "fire1.wav",
129   "idle.wav",
130   "thrust1.wav",
131   "thrust2.wav",
132   "pop.wav",
133   "explode2.wav",
134   "fire2.wav",
127   "explode1",
128   "fire1",
129   "idle",
130   "thrust1",
131   "thrust2",
132   "pop",
133   "explode2",
134   "fire2",
135135    0
136136};
137137
r14347r14348
209209static const char *const barrier_sample_names[] =
210210{
211211   "*barrier",
212   "playrdie.wav",
213   "playmove.wav",
214   "enemmove.wav",
212   "playrdie",
213   "playmove",
214   "enemmove",
215215    0
216216};
217217
r14347r14348
265265static const char *const speedfrk_sample_names[] =
266266{
267267   "*speedfrk",
268   "offroad.wav",
268   "offroad",
269269    NULL
270270};
271271
r14347r14348
327327static const char *const starhawk_sample_names[] =
328328{
329329   "*starhawk",
330   "explode.wav",
331   "rlaser.wav",
332   "llaser.wav",
333   "k.wav",
334   "master.wav",
335   "kexit.wav",
330   "explode",
331   "rlaser",
332   "llaser",
333   "k",
334   "master",
335   "kexit",
336336    NULL
337337};
338338
r14347r14348
404404static const char *const sundance_sample_names[] =
405405{
406406   "*sundance",
407   "bong.wav",
408   "whoosh.wav",
409   "explsion.wav",
410   "ping1.wav",
411   "ping2.wav",
412   "hatch.wav",
407   "bong",
408   "whoosh",
409   "explsion",
410   "ping1",
411   "ping2",
412   "hatch",
413413    0
414414};
415415
r14347r14348
475475static const char *const tailg_sample_names[] =
476476{
477477   "*tailg",
478   "sexplode.wav",
479   "thrust1.wav",
480   "slaser.wav",
481   "shield.wav",
482   "bounce.wav",
483   "hypersp.wav",
478   "sexplode",
479   "thrust1",
480   "slaser",
481   "shield",
482   "bounce",
483   "hypersp",
484484    NULL
485485};
486486
r14347r14348
566566static const char *const warrior_sample_names[] =
567567{
568568   "*warrior",
569   "bgmhum1.wav",
570   "bgmhum2.wav",
571   "killed.wav",
572   "fall.wav",
573   "appear.wav",
569   "bgmhum1",
570   "bgmhum2",
571   "killed",
572   "fall",
573   "appear",
574574    NULL
575575};
576576
r14347r14348
636636static const char *const armora_sample_names[] =
637637{
638638   "*armora",
639    "loexp.wav",
640    "jeepfire.wav",
641   "hiexp.wav",
642   "tankfire.wav",
643   "tankeng.wav",
644   "beep.wav",
645   "chopper.wav",
639    "loexp",
640    "jeepfire",
641   "hiexp",
642   "tankfire",
643   "tankeng",
644   "beep",
645   "chopper",
646646    NULL
647647};
648648
r14347r14348
733733static const char *const ripoff_sample_names[] =
734734{
735735   "*ripoff",
736   "bonuslvl.wav",
737   "eattack.wav",
738   "shipfire.wav",
739    "efire.wav",
740   "explosn.wav",
741   "bg1.wav",
742   "bg2.wav",
743   "bg3.wav",
744   "bg4.wav",
745   "bg5.wav",
746   "bg6.wav",
747   "bg7.wav",
748   "bg8.wav",
736   "bonuslvl",
737   "eattack",
738   "shipfire",
739    "efire",
740   "explosn",
741   "bg1",
742   "bg2",
743   "bg3",
744   "bg4",
745   "bg5",
746   "bg6",
747   "bg7",
748   "bg8",
749749    NULL
750750};
751751
r14347r14348
827827static const char *const starcas_sample_names[] =
828828{
829829   "*starcas",
830   "cfire.wav",
831   "shield.wav",
832   "star.wav",
833   "thrust.wav",
834   "drone.wav",
835   "lexplode.wav",
836   "sexplode.wav",
837   "pfire.wav",
830   "cfire",
831   "shield",
832   "star",
833   "thrust",
834   "drone",
835   "lexplode",
836   "sexplode",
837   "pfire",
838838    0
839839};
840840
r14347r14348
942942static const char *const solarq_sample_names[] =
943943{
944944   "*solarq",
945    "bigexpl.wav",
946   "smexpl.wav",
947   "lthrust.wav",
948   "slaser.wav",
949   "pickup.wav",
950   "nuke2.wav",
951   "nuke1.wav",
952    "music.wav",
945    "bigexpl",
946   "smexpl",
947   "lthrust",
948   "slaser",
949   "pickup",
950   "nuke2",
951   "nuke1",
952    "music",
953953    NULL
954954};
955955
r14347r14348
10791079static const char *const boxingb_sample_names[] =
10801080{
10811081   "*boxingb",
1082    "softexpl.wav",
1083   "loudexpl.wav",
1084   "chirp.wav",
1085   "eggcrack.wav",
1086   "bugpusha.wav",
1087   "bugpushb.wav",
1088   "bugdie.wav",
1089    "beetle.wav",
1090    "music.wav",
1091    "cannon.wav",
1092    "bounce.wav",
1093    "bell.wav",
1082    "softexpl",
1083   "loudexpl",
1084   "chirp",
1085   "eggcrack",
1086   "bugpusha",
1087   "bugpushb",
1088   "bugdie",
1089    "beetle",
1090    "music",
1091    "cannon",
1092    "bounce",
1093    "bell",
10941094    NULL
10951095};
10961096
r14347r14348
12161216static const char *const wotw_sample_names[] =
12171217{
12181218   "*wotw",
1219   "cfire.wav",
1220   "shield.wav",
1221   "star.wav",
1222   "thrust.wav",
1223   "drone.wav",
1224   "lexplode.wav",
1225   "sexplode.wav",
1226   "pfire.wav",
1219   "cfire",
1220   "shield",
1221   "star",
1222   "thrust",
1223   "drone",
1224   "lexplode",
1225   "sexplode",
1226   "pfire",
12271227    0
12281228};
12291229
r14347r14348
13311331static const char *const wotwc_sample_names[] =
13321332{
13331333   "*wotwc",
1334   "cfire.wav",
1335   "shield.wav",
1336   "star.wav",
1337   "thrust.wav",
1338   "drone.wav",
1339   "lexplode.wav",
1340   "sexplode.wav",
1341   "pfire.wav",
1334   "cfire",
1335   "shield",
1336   "star",
1337   "thrust",
1338   "drone",
1339   "lexplode",
1340   "sexplode",
1341   "pfire",
13421342    0
13431343};
13441344
src/mame/audio/zaxxon.c
r14347r14348
7474static const char *const zaxxon_sample_names[] =
7575{
7676   "*zaxxon",
77   "03.wav",   /* 0 - Homing Missile */
78   "02.wav",   /* 1 - Base Missile */
79   "01.wav",   /* 2 - Laser (force field) */
80   "00.wav",   /* 3 - Battleship (end of level boss) */
81   "11.wav",   /* 4 - S-Exp (enemy explosion) */
82   "10.wav",   /* 5 - M-Exp (ship explosion) */
83   "08.wav",   /* 6 - Cannon (ship fire) */
84   "23.wav",   /* 7 - Shot (enemy fire) */
85   "21.wav",   /* 8 - Alarm 2 (target lock) */
86   "20.wav",   /* 9 - Alarm 3 (low fuel) */
87   "05.wav",   /* 10 - initial background noise */
88   "04.wav",   /* 11 - looped asteroid noise */
77   "03",   /* 0 - Homing Missile */
78   "02",   /* 1 - Base Missile */
79   "01",   /* 2 - Laser (force field) */
80   "00",   /* 3 - Battleship (end of level boss) */
81   "11",   /* 4 - S-Exp (enemy explosion) */
82   "10",   /* 5 - M-Exp (ship explosion) */
83   "08",   /* 6 - Cannon (ship fire) */
84   "23",   /* 7 - Shot (enemy fire) */
85   "21",   /* 8 - Alarm 2 (target lock) */
86   "20",   /* 9 - Alarm 3 (low fuel) */
87   "05",   /* 10 - initial background noise */
88   "04",   /* 11 - looped asteroid noise */
8989   0
9090};
9191
r14347r14348
193193static const char *const congo_sample_names[] =
194194{
195195   "*congo",
196   "gorilla.wav",   /* 0 */
197   "bass.wav",      /* 1 */
198   "congal.wav",   /* 2 */
199   "congah.wav",   /* 3 */
200   "rim.wav",      /* 4 */
196   "gorilla",   /* 0 */
197   "bass",      /* 1 */
198   "congal",   /* 2 */
199   "congah",   /* 3 */
200   "rim",      /* 4 */
201201   0
202202};
203203
src/mame/audio/circus.c
r14347r14348
55static const char *const circus_sample_names[] =
66{
77   "*circus",
8   "pop.wav",
9   "miss.wav",
10   "bounce.wav",
8   "pop",
9   "miss",
10   "bounce",
1111   0
1212};
1313
r14347r14348
2020static const char *const crash_sample_names[] =
2121{
2222   "*crash",
23   "crash.wav",
23   "crash",
2424   0
2525};
2626
r14347r14348
3333static const char *const ripcord_sample_names[] =
3434{
3535   "*ripcord",
36   "splash.wav",
37   "scream.wav",
38   "chute.wav",
39   "whistle.wav",
36   "splash",
37   "scream",
38   "chute",
39   "whistle",
4040   0
4141};
4242
r14347r14348
4949static const char *const robotbwl_sample_names[] =
5050{
5151   "*robotbwl",
52   "hit.wav",
53   "roll.wav",
54   "balldrop.wav",
55   "demerit.wav",
56   "reward.wav",
52   "hit",
53   "roll",
54   "balldrop",
55   "demerit",
56   "reward",
5757   0
5858};
5959
src/mame/audio/astrof.c
r14347r14348
126126static const char *const astrof_sample_names[] =
127127{
128128   "*astrof",
129   "fire.wav",
130   "ekilled.wav",
131   "wave1.wav",
132   "wave2.wav",
133   "wave3.wav",
134   "wave4.wav",
135   "bossfire.wav",
136   "fuel.wav",
137   "death.wav",
138   "bosshit.wav",
139   "bosskill.wav",
129   "fire",
130   "ekilled",
131   "wave1",
132   "wave2",
133   "wave3",
134   "wave4",
135   "bossfire",
136   "fuel",
137   "death",
138   "bosshit",
139   "bosskill",
140140   0
141141};
142142
src/mame/audio/snk6502.c
r14347r14348
6565   "*sasuke",
6666
6767   // SN76477 and discrete
68   "hit.wav",
69   "boss_start.wav",
70   "shot.wav",
71   "boss_attack.wav",
68   "hit",
69   "boss_start",
70   "shot",
71   "boss_attack",
7272
7373   0
7474};
r14347r14348
8484   "*vanguard",
8585
8686   // SN76477 and discrete
87   "fire.wav",
88   "explsion.wav",
87   "fire",
88   "explsion",
8989
9090   // HD38880 speech
91   "vg_voi-0.wav",
92   "vg_voi-1.wav",
93   "vg_voi-2.wav",
94   "vg_voi-3.wav",
95   "vg_voi-4.wav",
96   "vg_voi-5.wav",
97   "vg_voi-6.wav",
98   "vg_voi-7.wav",
99   "vg_voi-8.wav",
100   "vg_voi-9.wav",
101   "vg_voi-a.wav",
102   "vg_voi-b.wav",
103   "vg_voi-c.wav",
104   "vg_voi-d.wav",
105   "vg_voi-e.wav",
106   "vg_voi-f.wav",
91   "vg_voi-0",
92   "vg_voi-1",
93   "vg_voi-2",
94   "vg_voi-3",
95   "vg_voi-4",
96   "vg_voi-5",
97   "vg_voi-6",
98   "vg_voi-7",
99   "vg_voi-8",
100   "vg_voi-9",
101   "vg_voi-a",
102   "vg_voi-b",
103   "vg_voi-c",
104   "vg_voi-d",
105   "vg_voi-e",
106   "vg_voi-f",
107107
108108   0
109109};
r14347r14348
119119   "*fantasy",
120120
121121   // HD38880 speech
122   "ft_voi-0.wav",
123   "ft_voi-1.wav",
124   "ft_voi-2.wav",
125   "ft_voi-3.wav",
126   "ft_voi-4.wav",
127   "ft_voi-5.wav",
128   "ft_voi-6.wav",
129   "ft_voi-7.wav",
130   "ft_voi-8.wav",
131   "ft_voi-9.wav",
132   "ft_voi-a.wav",
133   "ft_voi-b.wav",
122   "ft_voi-0",
123   "ft_voi-1",
124   "ft_voi-2",
125   "ft_voi-3",
126   "ft_voi-4",
127   "ft_voi-5",
128   "ft_voi-6",
129   "ft_voi-7",
130   "ft_voi-8",
131   "ft_voi-9",
132   "ft_voi-a",
133   "ft_voi-b",
134134
135135   0
136136};
src/mame/audio/vicdual.c
r14347r14348
103103static const char *const frogs_sample_names[] =
104104{
105105   "*frogs",
106   "boing.wav",
107   "buzzz.wav",
108   "croak.wav",
109   "hop.wav",
110   "splash.wav",
111   "zip.wav",
106   "boing",
107   "buzzz",
108   "croak",
109   "hop",
110   "splash",
111   "zip",
112112   0
113113};
114114
src/mame/audio/dkong.c
r14347r14348
11921192    static const char *const radarscp1_sample_names[] =
11931193    {
11941194        "*radarscp1",
1195        "10.wav",
1196        "12.wav",
1197        "14.wav",
1198        "16.wav",
1199        "18.wav",
1200        "1A.wav",
1201        "1C.wav",
1202        "1E.wav",
1203        "20.wav",
1195        "10",
1196        "12",
1197        "14",
1198        "16",
1199        "18",
1200        "1A",
1201        "1C",
1202        "1E",
1203        "20",
12041204        0
12051205    };
12061206
src/mame/audio/triplhnt.c
r14347r14348
1111static const char *const triplhnt_sample_names[] =
1212{
1313   "*triplhnt",
14   "bear_rac.wav",
15   "witch.wav",
14   "bear_rac",
15   "witch",
1616   0
1717};
1818
src/mame/audio/mw8080bw.c
r14347r14348
137137static const char *const seawolf_sample_names[] =
138138{
139139   "*seawolf",
140   "shiphit.wav",
141   "torpedo.wav",
142   "dive.wav",
143   "sonar.wav",
144   "minehit.wav",
140   "shiphit",
141   "torpedo",
142   "dive",
143   "sonar",
144   "minehit",
145145   0
146146};
147147
r14347r14348
201201static const char *const gunfight_sample_names[] =
202202{
203203   "*gunfight",
204   "gunshot.wav",
205   "killed.wav",
204   "gunshot",
205   "killed",
206206   0
207207};
208208
r14347r14348
15591559static const char *const gmissile_sample_names[] =
15601560{
15611561   "*gmissile",
1562   "1.wav",   /* missle */
1563   "2.wav",   /* explosion */
1562   "1",   /* missle */
1563   "2",   /* explosion */
15641564   0
15651565};
15661566
r14347r14348
16581658static const char *const m4_sample_names[] =
16591659{
16601660   "*m4",
1661   "1.wav",   /* missle */
1662   "2.wav",   /* explosion */
1661   "1",   /* missle */
1662   "2",   /* explosion */
16631663   0
16641664};
16651665
r14347r14348
19221922static const char *const clowns_sample_names[] =
19231923{
19241924   "*clowns",
1925   "miss.wav",
1925   "miss",
19261926   0
19271927};
19281928
r14347r14348
33243324static const char *const phantom2_sample_names[] =
33253325{
33263326   "*phantom2",
3327   "1.wav",   /* shot */
3328   "2.wav",   /* explosion */
3327   "1",   /* shot */
3328   "2",   /* explosion */
33293329   0
33303330};
33313331
r14347r14348
35983598static const char *const invaders_sample_names[] =
35993599{
36003600   "*invaders",
3601   "1.wav",      /* shot/missle */
3602   "2.wav",      /* base hit/explosion */
3603   "3.wav",      /* invader hit */
3604   "4.wav",      /* fleet move 1 */
3605   "5.wav",      /* fleet move 2 */
3606   "6.wav",      /* fleet move 3 */
3607   "7.wav",      /* fleet move 4 */
3608   "8.wav",      /* UFO/saucer hit */
3609   "9.wav",      /* bonus base */
3601   "1",      /* shot/missle */
3602   "2",      /* base hit/explosion */
3603   "3",      /* invader hit */
3604   "4",      /* fleet move 1 */
3605   "5",      /* fleet move 2 */
3606   "6",      /* fleet move 3 */
3607   "7",      /* fleet move 4 */
3608   "8",      /* UFO/saucer hit */
3609   "9",      /* bonus base */
36103610   0
36113611};
36123612
src/mame/includes/model1.h
r14347r14348
1#include "audio/dsbz80.h"
2
13typedef void (*tgp_func)(running_machine &machine);
24
35enum {FIFO_SIZE = 256};
r14347r14348
79{
810public:
911   model1_state(const machine_config &mconfig, device_type type, const char *tag)
10      : driver_device(mconfig, type, tag) { }
12      : driver_device(mconfig, type, tag),
13        m_maincpu(*this, "maincpu"),
14        m_audiocpu(*this, "maincpu"),
15        m_dsbz80(*this, DSBZ80_TAG)
16        { }
1117
18    required_device<cpu_device> m_maincpu;      // V60
19    required_device<cpu_device> m_audiocpu;     // sound 68000
20    optional_device<dsbz80_device> m_dsbz80;    // Digital Sound Board
21
1222   struct view *m_view;
1323   struct point *m_pointdb;
1424   struct point *m_pointpt;
src/mame/mame.mak
r14347r14348
11981198   $(DRIVERS)/megaplay.o \
11991199   $(DRIVERS)/megatech.o \
12001200   $(DRIVERS)/model1.o $(MACHINE)/model1.o $(VIDEO)/model1.o \
1201    $(AUDIO)/dsbz80.o \
12011202   $(DRIVERS)/model2.o $(VIDEO)/model2.o \
12021203   $(DRIVERS)/model3.o $(VIDEO)/model3.o $(MACHINE)/model3.o \
12031204   $(DRIVERS)/naomi.o $(MACHINE)/dc.o $(VIDEO)/dc.o $(MACHINE)/naomi.o \
r14347r14348
21742175         $(MAMESRC)/machine/nes_unif.c
21752176$(VIDEO)/jaguar.o:   $(MAMESRC)/video/jagobj.c \
21762177         $(MAMESRC)/video/jagblit.c
2178$(DRIVERS)/model1.o: $(MAMESRC)/includes/model1.h $(MAMESRC)/audio/dsbz80.h
2179$(VIDEO)/model1.o: $(MAMESRC)/includes/model1.h $(MAMESRC)/audio/dsbz80.h
2180$(MACHINE)/model1.o: $(MAMESRC)/includes/model1.h $(MAMESRC)/audio/dsbz80.h
21772181$(VIDEO)/model2.o:   $(MAMESRC)/video/model2rd.c
21782182$(VIDEO)/model3.o:   $(MAMESRC)/video/m3raster.c
21792183$(VIDEO)/n64.o:      $(MAMESRC)/video/rdpfiltr.c
src/mame/video/stvvdp2.c
r14347r14348
40944094   int x,y;
40954095   UINT8* gfxdata = state->m_vdp2.gfx_decode;
40964096   UINT32 base_offs,base_mask;
4097   UINT16 pix;
4097   UINT32 pix;
40984098   UINT8 interlace;
40994099
41004100   interlace = (STV_VDP2_LSMD == 3)+1;
r14347r14348
65886588               {
65896589                  if ( pix & ~sprite_shadow )
65906590                  {
6591                     bitmap_line[x] = (bitmap_line[x] & ~0x421) >> 1;
6591                     bitmap_line[x] = (bitmap_line[x] & ~0x010101) >> 1;
65926592                  }
65936593               }
65946594               else
r14347r14348
65996599                     /*shadow - in reality, we should check from what layer pixel beneath comes...*/
66006600                     if ( STV_VDP2_SDCTL & 0x3f )
66016601                     {
6602                        bitmap_line[x] = (bitmap_line[x] & ~0x421) >> 1;
6602                        bitmap_line[x] = (bitmap_line[x] & ~0x010101) >> 1;
66036603                     }
66046604                     /* note that when shadows are disabled, "shadow" palette entries are not drawn */
66056605                  } else if ( pix )
src/mame/video/zaxxon.c
r14347r14348
359359         srcy = vf + ((state->m_bg_position << 1) ^ 0xfff) + 1;
360360         src = &pixmap.pix16(srcy & ymask);
361361
362         /* loop over visible colums */
362         /* loop over visible columns */
363363         for (x = cliprect.min_x; x <= cliprect.max_x; x++)
364364         {
365365            /* start with HF = flipped H signals */
src/mame/video/seta.c
r14347r14348
6969
7070                            [ Floating Tilemap ]
7171
72    There's a floating tilemap made of vertical colums composed of 2x16
72    There's a floating tilemap made of vertical columns composed of 2x16
7373    "sprites". Each 32 consecutive "sprites" define a column.
7474
7575    For column I:
src/mame/drivers/thief.c
r14347r14348
384384static const char *const sharkatt_sample_names[] =
385385{
386386   "*sharkatt",
387   "talk.wav",
388   "crash.wav",
387   "talk",
388   "crash",
389389   0   /* end of array */
390390};
391391
r14347r14348
400400static const char *const thief_sample_names[] =
401401{
402402   "*thief",
403   "talk.wav",
404   "crash.wav",
403   "talk",
404   "crash",
405405   0   /* end of array */
406406};
407407
r14347r14348
416416static const char *const natodef_sample_names[] =
417417{
418418   "*natodef",
419   "talk.wav",
420   "crash.wav",
419   "talk",
420   "crash",
421421   0   /* end of array */
422422};
423423
src/mame/drivers/gaplus.c
r14347r14348
504504static const char *const gaplus_sample_names[] =
505505{
506506   "*gaplus",
507   "bang.wav",
507   "bang",
508508   0
509509};
510510
src/mame/drivers/cosmic.c
r14347r14348
886886static const char *const cosmica_sample_names[] =
887887{
888888   "*cosmica",
889   "backgr.wav",
890   "extend.wav",
891   "divea.wav",
892   "diveb1.wav",
893   "diveb2.wav",
894   "diveb3.wav",
895   "diveb4.wav",
896   "diveb5.wav",
897   "diveb6.wav",
898   "fire.wav",
899   "loudexp.wav",
900   "smallexp.wav",
901   "coin.wav",
889   "backgr",
890   "extend",
891   "divea",
892   "diveb1",
893   "diveb2",
894   "diveb3",
895   "diveb4",
896   "diveb5",
897   "diveb6",
898   "fire",
899   "loudexp",
900   "smallexp",
901   "coin",
902902   0       /* end of array */
903903};
904904
r14347r14348
913913static const char *const panic_sample_names[] =
914914{
915915   "*panic",
916   "walk.wav",
917   "upordown.wav",
918   "trapped.wav",
919   "falling.wav",
920   "escaping.wav",
921   "ekilled.wav",
922   "death.wav",
923   "elaugh.wav",
924   "extral.wav",
925   "oxygen.wav",
926   "coin.wav",
916   "walk",
917   "upordown",
918   "trapped",
919   "falling",
920   "escaping",
921   "ekilled",
922   "death",
923   "elaugh",
924   "extral",
925   "oxygen",
926   "coin",
927927   0
928928};
929929
r14347r14348
936936static const char *const cosmicg_sample_names[] =
937937{
938938   "*cosmicg",
939   "cg_m0.wav",   /* 8 Different pitches of March Sound */
940   "cg_m1.wav",
941   "cg_m2.wav",
942   "cg_m3.wav",
943   "cg_m4.wav",
944   "cg_m5.wav",
945   "cg_m6.wav",
946   "cg_m7.wav",
947   "cg_att.wav",   /* Killer Attack */
948   "cg_chnc.wav",   /* Bonus Chance  */
949   "cg_gotb.wav",   /* Got Bonus - have not got correct sound for */
950   "cg_dest.wav",   /* Gun Destroy */
951   "cg_gun.wav",   /* Gun Shot */
952   "cg_gotm.wav",   /* Got Monster */
953   "cg_ext.wav",   /* Coin Extend */
939   "cg_m0",   /* 8 Different pitches of March Sound */
940   "cg_m1",
941   "cg_m2",
942   "cg_m3",
943   "cg_m4",
944   "cg_m5",
945   "cg_m6",
946   "cg_m7",
947   "cg_att",   /* Killer Attack */
948   "cg_chnc",   /* Bonus Chance  */
949   "cg_gotb",   /* Got Bonus - have not got correct sound for */
950   "cg_dest",   /* Gun Destroy */
951   "cg_gun",   /* Gun Shot */
952   "cg_gotm",   /* Got Monster */
953   "cg_ext",   /* Coin Extend */
954954   0
955955};
956956
src/mame/drivers/namcos12.c
r14347r14348
26472647
26482648ROM_START( tektagtac )
26492649   ROM_REGION32_LE( 0x00400000, "user1", 0 ) /* main prg */
2650   ROM_LOAD16_BYTE( "teg2verc.2e",  0x0000000, 0x200000, CRC(c6da0717) SHA1(9e01ae64710d85eb9899d6fa6fd0a2152aee8c11) ) /* Modified to work with alt romboard? */
2651   ROM_LOAD16_BYTE( "teg2verc.2j",  0x0000001, 0x200000, CRC(25a1d2ff) SHA1(529a11a1bbb8655534d7ec371f1c09e9e387ed11) )
2650   ROM_LOAD16_BYTE( "teg2verc1.2e",  0x0000000, 0x200000, CRC(c6da0717) SHA1(9e01ae64710d85eb9899d6fa6fd0a2152aee8c11) ) /* Modified to work with alt romboard? */
2651   ROM_LOAD16_BYTE( "teg2verc1.2j",  0x0000001, 0x200000, CRC(25a1d2ff) SHA1(529a11a1bbb8655534d7ec371f1c09e9e387ed11) )
26522652
26532653   ROM_REGION32_LE( 0x3800000, "user2", 0 ) /* main data */
26542654   ROM_LOAD32_WORD( "teg1rom0e.9",  0x0000000, 0x800000, CRC(c962a373) SHA1(d662dbd89ef62c5ac3150a018fc2d35ef2ee94ac) )
src/mame/drivers/truco.c
r14347r14348
1/*
1/******************************************************************************************************
22
3  Truco-Tron - (c) 198? Playtronic SRL, Argentina
3  Truco-Tron - (c) 198? Playtronic SRL, Argentina.
44
55  Written by Ernesto Corvi
6  Additional work by Roberto Fresca.
67
8
79  Notes:
10
811  - The board uses a battery backed ram for protection, mapped at $7c00-$7fff.
912  - If the battery backup data is corrupt, it comes up with some sort of code entry screen.
1013    As far as I can tell, you can't do anything with it.
r14347r14348
1316  - System clock is 12 Mhz. The CPU clock is unknown.
1417  - The Alternate Gfx mode is funky. Not only it has different bitmaps, but also the strings with the
1518    game options are truncated. Title is also truncated.
16*/
1719
20
21*******************************************************************************************************
22
23  Mini-board (6"x 7") silkscreened 8901 REV.C
24  JAMMA connector.
25
26  1x Xtal 12 MHz.
27  1x 3.6V. Lithium Battery (QTC85).
28
29  2 rows of 6 holes for jumpers (JP1, JP2).
30  No DIP switches banks.
31
32  All IC's are scratched to avoid the identification.
33
34
35  PCB layout:
36  .--------------------------------------------------.
37  |S T  .---. .---. .---. .-.    .-.     .---. .-.   |
38  |E R  |   | | U | | U | |U|    |U|     | U | |U|   |
39  |R U  |   | | 2 | | 3 | |1|    |5|     | 1 | |1|   |
40  |I C  | U | |   | |   | |5|    | |     | 0 | |4|   |
41  |E O  | 1 | |   | |   | '-'    '-'     |   | '-'   |
42  |     |   | '---' '---'        .-.     '---' .-.   |
43  |0 T  |   |                    |U| .-------. |U|   |
44  |0 R  |   |                    |1| |BATTERY| |1|   |
45  |0 O  |   |                    |2| | -   + | |9|   |
46  |0 N  '---'                    '-' '-------' '-'   |
47  | .-. .-,   .---. .-.   .---.  .-.   .-.     .-.   |
48  | |U| |U|   |   | |U|   |   |  |U|   |U|     |U|   |
49  | |1| |1|   |   | |1|   |   |  |6|   |7|     |1|   |
50  | |7| |8|   | U | |6|   | U |  | |   | |     |3|  P|
51  | '-' '-'   | 4 | '-'   | 9 |  '-'   '-'     | |  L|
52  | .----.    |   |       |   |  .-.   .-.     '-'  A|
53  | |Xtal|    |   |       |   |  |U|   |U|          Y|
54  | '----'    |   |       |   |  |1|   |8|          T|
55  | .-.       |   |       |   |  |1|   | |          R|
56  | |U|       '---'       '---'  '-'   '-'          O|
57  | |2|.---.                                        N|
58  | |0||pot|                                        I|
59  | '-''---'          JAMMA                         C|
60  '----+++++++++++++++++++++++++++++-----------------'
61       |||||||||||||||||||||||||||||
62       '---------------------------'
63
64
65  IC's Reverse Engineering....
66
67  MARKED   PINS     ID    TYPE        DETAILS
68 
69  - U1 : 40-pin IC  YES   CPU         MOTOROLA M6809
70  - U2 : 28-pin IC  YES   ROM U2      M27128A
71  - U3 : 28-pin IC  YES   ROM U3      M27128A
72  - U4 : 40-pin IC  YES   PIA         ST EF6821P
73  - U5 : 16-pin IC  NO
74  - U6 : 16-pin IC  NO
75  - U7 : 16-pin IC  NO
76  - U8 : 16-pin IC  NO
77  - U9 : 40-pin IC  YES   CRTC        HD6845 / UM6845
78  - U10: 28-pin IC  YES   RAM         ???? (Battery NVR)
79  - U11: 14-pin IC  NO
80  - U12: 14-pin IC  NO
81  - U13: 20-pin IC  NO
82  - U14: 20-pin IC  NO
83  - U15: 20-pin IC  NO
84  - U16: 20-pin IC  NO
85  - U17: 14-pin IC  NO
86  - U18: 14-pin IC  NO
87  - U19: 16-pin IC  YES   WATCHDOG    MAXIM MAX691
88  - U20: 16-pin IC  YES   DARLINGTON  ULN2003
89
90
91                             M6809
92                           +---\/---+
93                    GND   1|        |40 !HALT <--
94                --> !NMI  2|        |39 ETAL  <--
95  PIA /IRQA & B --> !IRQ  3|        |38 EXTAL <--
96                --> !FIRQ 4|        |37 !RES  <-- PIA /RES & U19(15) MAX691
97                <-- BS    5|        |36 MRDY  <--
98                <-- BA    6|        |35 Q     <--
99                    Vcc   7|   U1   |34 E     <-- PIA E (25)
100  PIA /RS0 (36) <-- A0    8|        |33 !DMA  <--
101  PIA /RS1 (35) <-- A1    9|Motorola|32 R/!W  --> PIA R/W (21)
102                <-- A2   10|  6809  |31 D0    <-> PIA D0 (33)
103                <-- A3   11|        |30 D1    <-> PIA D1 (32)
104                <-- A4   12|        |29 D2    <-> PIA D2 (31)
105                <-- A5   13|        |28 D3    <-> PIA D3 (30)
106                <-- A6   14|        |27 D4    <-> PIA D4 (29)
107                <-- A7   15|        |26 D5    <-> PIA D5 (28)
108                <-- A8   16|        |25 D6    <-> PIA D6 (27)
109                <-- A9   17|        |24 D7    <-> PIA D7 (26)
110                <-- A10  18|        |23 A15   -->
111                <-- A11  19|        |22 A14   -->
112                <-- A12  20|        |21 A13   -->
113                           +--------+
114
115                            PIA 6821
116                          +----\/----+
117                      VSS |01      40| CA1 --- PIA CB1 (*)
118  JAMMA S17 (2P_ST) - PA0 |02      39| CA2 --- U19(11). Watchdog/RESET
119  JAMMA S14 (SRVSW) - PA1 |03      38| /IRQA - CPU M6809 !IRQ (03)
120  JAMMA C26 (2P_SL) - PA2 |04      37| /IRQB - CPU M6809 !IRQ (03)
121  JAMMA S16 (COIN2) - PA3 |05  U4  36| /RS0 -- CPU M6809 A0 (08)
122  JAMMA S15 (TLTSW) - PA4 |06      35| /RS1 -- CPU M6809 A1 (09)
123  JAMMA C22 (P1_B1) - PA5 |07      34| /RES -- CPU M6809 !RES (37) & U19(15) MAX691
124  JAMMA C18/21(U-R) - PA6 |08      33| D0 ---- CPU M6809 D0 (31)
125  JAMMA C19/20(D-L) - PA7 |09      32| D1 ---- CPU M6809 D1 (30)
126             JP2(4) - PB0 |10      31| D2 ---- CPU M6809 D2 (29)
127             JP2(2) - PB1 |11      30| D3 ---- CPU M6809 D3 (28)
128            U20(04) - PB2 |12      29| D4 ---- CPU M6809 D4 (27)
129            U20(05) - PB3 |13      28| D5 ---- CPU M6809 D5 (26)
130             JP1(6) - PB4 |14      27| D6 ---- CPU M6809 D6 (25)
131             JP1(4) - PB5 |15      26| D7 ---- CPU M6809 D7 (24)
132             JP1(2) - PB6 |16      25| E ----- CPU M6809 E (34)
133            U20(07) - PB7 |17      24| CS1
134        PIA CA1 (*) - CB1 |18      23| /CS2
135            U20(06) - CB2 |19      22| CS0
136                      VCC |20      21| R/W
137                          +----------+
138
139    (*) Lines CA1 and CB1 are tied together, being both IN.
140        They are connected to JAMMA C16 (COIN1).
141
142
143  U19:   *** MAX691 ***  Maxim MAX691 Microprocessor Supervisory Circuit.
144                         (for battery backup power switching and watchdog).
145  leg 01 [VBATT] ---->
146  leg 02 [VOUT] ----->
147  leg 03 [VCC] ------> VCC
148  leg 04 [GND] ------> GND
149  leg 05 [BATT ON] -->
150  leg 06 [/LOWLINE] ->
151  leg 07 [OSC IN] ---> N/C \  Set 1.6 seconds as WD timeout.
152  leg 08 [OSC SEL] --> N/C /
153  leg 09 [PFI] ------>
154  leg 10 [/PFO] ----->
155  leg 11 [WDI] ------> PIA CA2
156  leg 12 [/CE OUT] -->
157  leg 13 [/CE IN] ---> GND
158  leg 14 [/WDO] ----->
159  leg 15 [/RESET] ---> CPU /RES (37)
160  leg 16 [RESET] ---->
161
162
163  U20:   *** ULN2003 ***
164
165  leg 01 --> N/C
166  leg 02 --> N/C
167  leg 03 --> N/C
168  leg 04 --> PIA PB2 (12)
169  leg 05 --> PIA PB3 (13)
170  leg 06 --> PIA CB2 (19)
171  leg 07 --> PIA PB7 (17)
172  leg 08 --> GND
173  leg 09 --> VCC
174  leg 10 --> CAP --> JAMMA(S10) +Speaker
175  leg 11 --> JAMMA(S26)
176  leg 12 --> JAMMA(C08) Coin Counter 1
177  leg 13 --> JAMMA(S08) Coin Counter 2
178  leg 14 --> N/C
179  leg 15 --> N/C
180  leg 16 --> N/C
181
182
183  JP1:
184  01 --> GND
185  02 --> PIA PB6 (16) & R5(1K) --> VCC
186  03 --> GND
187  04 --> PIA PB5 (15) & R7(1K) --> VCC
188  05 --> GND
189  06 --> PIA PB4 (14) & R8(1K) --> VCC
190
191  JP2:
192  01 --> GND
193  02 --> PIA PB1 (11) & R9(1K) --> VCC
194  03 --> GND
195  04 --> PIA PB0 (10) & R10(1K) -> VCC
196  05 --> GND
197  06 --> Seems N/C
198
199
200*******************************************************************************************************/
201
202
203#define MASTER_CLOCK   XTAL_12MHz         /* confirmed */
204#define CPU_CLOCK      (MASTER_CLOCK/16)   /* guess */
205#define CRTC_CLOCK      (MASTER_CLOCK/8)   /* guess */
206
18207#include "emu.h"
19208#include "cpu/m6809/m6809.h"
209#include "video/mc6845.h"
210#include "machine/6821pia.h"
20211#include "sound/dac.h"
21212#include "includes/truco.h"
22213
23214
24/***************************************************************************/
215/*******************************************
216*           Read/Write Handlers            *
217*******************************************/
25218
219static WRITE8_DEVICE_HANDLER( porta_w )
220{
221   logerror("Port A writes: %2x\n", data);
222}
26223
224static WRITE8_DEVICE_HANDLER( pia_ca2_w )
225{
226/*  PIA CA2 line is connected to IC U19, leg 11.
227    The IC was successfully identified as MAX691.
228    The leg 11 is WDI...
229
230    The code toggles 0's & 1's on this line.
231    Legs 07 [OSC IN] and 08 [OSC SEL] aren't connected,
232    setting 1.6 seconds as WD timeout.
233*/
234   watchdog_reset(device->machine());
235}
236
237static WRITE8_DEVICE_HANDLER( portb_w )
238{
239   if ((data & 0x80) | (data == 0))
240   {
241      dac_data_w(device->machine().device("dac"), data & 0x80);   /* Isolated the bit for Delta-Sigma DAC */
242   }
243   else
244      logerror("Port B writes: %2x\n", data);
245}
246
247static WRITE8_DEVICE_HANDLER( pia_irqa_w )
248{
249      logerror("PIA irq A: %2x\n", data);
250}
251
252static WRITE8_DEVICE_HANDLER( pia_irqb_w )
253{
254      logerror("PIA irq B: %2x\n", data);
255}
256
257
258/*******************************************
259*                Memory Map                *
260*******************************************/
261
27262static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8 )
28   AM_RANGE(0x0000, 0x17ff) AM_RAM                              /* general purpose ram */
29   AM_RANGE(0x1800, 0x7bff) AM_RAM AM_BASE_MEMBER(truco_state, m_videoram)               /* video ram */
30   AM_RANGE(0x7c00, 0x7fff) AM_RAM AM_BASE_MEMBER(truco_state, m_battery_ram)            /* battery backed ram */
31   AM_RANGE(0x8000, 0x8000) AM_READ_PORT("P1") AM_WRITENOP            /* controls (and irq ack?) */
32   AM_RANGE(0x8001, 0x8001) AM_NOP            /* unknown */
33   AM_RANGE(0x8002, 0x8002) AM_READ_PORT("DSW") AM_DEVWRITE("dac", dac_w)   /* dipswitches */
34   AM_RANGE(0x8003, 0x8007) AM_NOP            /* unknown */
263   AM_RANGE(0x0000, 0x17ff) AM_RAM                                          /* General purpose RAM */
264   AM_RANGE(0x1800, 0x7bff) AM_RAM AM_BASE_MEMBER(truco_state, m_videoram)            /* Video RAM */
265   AM_RANGE(0x7c00, 0x7fff) AM_RAM AM_BASE_MEMBER(truco_state, m_battery_ram)         /* Battery backed RAM */
266   AM_RANGE(0x8000, 0x8003) AM_DEVREADWRITE_MODERN("pia0", pia6821_device, read, write)
267   AM_RANGE(0x8004, 0x8004) AM_DEVWRITE_MODERN("crtc", mc6845_device, address_w)
268   AM_RANGE(0x8005, 0x8005) AM_DEVREADWRITE_MODERN("crtc", mc6845_device, register_r, register_w)
35269   AM_RANGE(0x8008, 0xffff) AM_ROM
36270ADDRESS_MAP_END
271/*
272CRTC:
37273
27400: 5f
27501: 40
27602: 4d
27703: 06
27804: 0f
27905: 04
28006: 0c
28107: 0e
28208: 00
28309: 0f
2840a: 00
2850b: 00
2860c: 00
2870d: c0
288*/
289
290/*******************************************
291*         Input Ports Definition           *
292*******************************************/
293
38294static INPUT_PORTS_START( truco )
39295   PORT_START("P1")   /* IN0 */
40   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
41   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
42   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
43   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
44   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
45   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
46   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
47   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
296   PORT_DIPNAME( 0x01, 0x01, "IN0-1 (P2 START)" )
297   PORT_DIPSETTING (   0x01, DEF_STR( Off ) )
298   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
299   PORT_DIPNAME( 0x02, 0x02, "IN0-2 (SERVICE SW)" )
300   PORT_DIPSETTING (   0x02, DEF_STR( Off ) )
301   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
302   PORT_DIPNAME( 0x04, 0x04, "IN0-3 (P2 SELECT)" )
303   PORT_DIPSETTING (   0x04, DEF_STR( Off ) )
304   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
305   PORT_DIPNAME( 0x08, 0x08, "IN0-4 (COIN2)" )
306   PORT_DIPSETTING (   0x08, DEF_STR( Off ) )
307   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
308   PORT_DIPNAME( 0x10, 0x10, "IN0-5 (TILT SW)" )
309   PORT_DIPSETTING (   0x10, DEF_STR( Off ) )
310   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
311//   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )      /* Connected to JAMMA S17 (P2 START) */
312//   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )      /* Connected to JAMMA S14 (SERVICE SW) */
313//   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )      /* Connected to JAMMA C26 (P2 SELECT) */
314//   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )      /* Connected to JAMMA S16 (COIN2) */
315//   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )      /* Connected to JAMMA S15 (TILT SW) */
316   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )      /* Connected to JAMMA C22 (P1 BUTTON1) */
317   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )   /* Connected to JAMMA C18/21 (JOY UP & JOY RIGHT) */
318   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )   /* Connected to JAMMA C19/20 (JOY DOWN & JOY LEFT) */
48319
49   PORT_START("DSW")   /* DSW1 */
320   PORT_START("JMPRS")   /* JP1-2 */
50321   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
51322   PORT_DIPSETTING (   0x01, DEF_STR( Off ) )
52323   PORT_DIPSETTING (   0x00, DEF_STR( On ) )
r14347r14348
83354   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
84355INPUT_PORTS_END
85356
357
358/*******************************************
359*       Machine Reset & Interrupts         *
360*******************************************/
361
86362static MACHINE_RESET( truco )
87363{
88364   truco_state *state = machine.driver_data<truco_state>();
r14347r14348
131407}
132408
133409
410/*******************************************
411*              PIA Interfaces              *
412*******************************************/
413/*
414
415*/
416static const pia6821_interface pia0_intf =
417{
418   DEVCB_INPUT_PORT("P1"),      /* port A in */
419   DEVCB_INPUT_PORT("JMPRS"),   /* port B in */
420   DEVCB_NULL,               /* line CA1 in ??? */
421   DEVCB_NULL,               /* line CB1 in ??? */
422   DEVCB_NULL,               /* line CA2 in */
423   DEVCB_NULL,               /* line CB2 in */
424   DEVCB_HANDLER(porta_w),      /* port A out */
425   DEVCB_HANDLER(portb_w),      /* port B out */
426   DEVCB_HANDLER(pia_ca2_w),   /* line CA2 out */
427   DEVCB_NULL,               /* port CB2 out */
428   DEVCB_HANDLER(pia_irqa_w),   /* IRQA */
429   DEVCB_HANDLER(pia_irqb_w)   /* IRQB */
430};
431
432
433/*******************************************
434*              CRTC Interface              *
435*******************************************/
436
437static const mc6845_interface mc6845_intf =
438{
439   "screen",   /* screen we are acting on */
440   4,         /* number of pixels per video memory address */
441   NULL,      /* before pixel update callback */
442   NULL,      /* row update callback */
443   NULL,      /* after pixel update callback */
444   DEVCB_NULL,   /* callback for display state changes */
445   DEVCB_NULL,   /* callback for cursor state changes */
446   DEVCB_NULL,   /* HSYNC callback */
447   DEVCB_NULL,   /* VSYNC callback */
448   NULL      /* update address callback */
449};
450
451
452/*******************************************
453*              Machine Driver              *
454*******************************************/
455
134456static MACHINE_CONFIG_START( truco, truco_state )
135457
136458   /* basic machine hardware */
137   MCFG_CPU_ADD("maincpu", M6809, 750000)        /* ?? guess */
459   MCFG_CPU_ADD("maincpu", M6809, CPU_CLOCK)
138460   MCFG_CPU_PROGRAM_MAP(main_map)
139
140461   MCFG_CPU_VBLANK_INT("screen", truco_interrupt)
462    MCFG_WATCHDOG_TIME_INIT(attotime::from_seconds(1.6))   /* 1.6 seconds */
141463
464   MCFG_PIA6821_ADD("pia0", pia0_intf)
465
142466   MCFG_MACHINE_RESET(truco)
143467
144468   /* video hardware */
r14347r14348
152476   MCFG_PALETTE_LENGTH(16)
153477   MCFG_PALETTE_INIT(truco)
154478
479   MCFG_MC6845_ADD("crtc", MC6845, CRTC_CLOCK, mc6845_intf)   /* Identified as UM6845 */
480
155481   /* sound hardware */
156482   MCFG_SPEAKER_STANDARD_MONO("mono")
157483
r14347r14348
172498   ROM_LOAD( "truco.u2",   0x0c000, 0x4000, CRC(ff355750) SHA1(1538f20b1919928ffca439e4046a104ddfbc756c) )
173499ROM_END
174500
175GAME( 198?, truco,  0, truco, truco, 0, ROT0, "Playtronic SRL", "Truco-Tron", GAME_IMPERFECT_SOUND )
501/*    YEAR  NAME     PARENT  MACHINE  INPUT    INIT  ROT    COMPANY           FULLNAME     FLAGS  */
502GAME( 198?, truco,   0,      truco,   truco,   0,    ROT0, "Playtronic SRL", "Truco-Tron", 0 )
src/mame/drivers/vamphalf.c
r14347r14348
88 Games Supported:
99
1010
11    Minigame Cool Collection   (c) 1999 SemiCom
12    Jumping Break              (c) 1999 F2 System
13    Lup Lup Puzzle             (c) 1999 Omega System       (version 3.0 and 2.9)
14    Puzzle Bang Bang           (c) 1999 Omega System       (version 2.8)
15    Super Lup Lup Puzzle       (c) 1999 Omega System       (version 4.0)
16    Vamf 1/2                   (c) 1999 Danbi & F2 System  (Europe version)
17    Vamp 1/2                   (c) 1999 Danbi & F2 System  (Korea version)
18    Date Quiz Go Go Episode 2  (c) 2000 SemiCom
19    Mission Craft              (c) 2000 Sun                (version 2.4)
20    Mr. Dig                    (c) 2000 Sun
21    Final Godori               (c) 2001 SemiCom            (version 2.20.5915)
22    Wyvern Wings               (c) 2001 SemiCom
23    Mr. Kicker                 (c) 2001 SemiCom [1]
24    Toy Land Adventure         (c) 2001 SemiCom
25    Age Of Heroes - Silkroad 2 (c) 2001 Unico              (v0.63 - 2001/02/07)
11    Minigame Cool Collection         (c) 1999 SemiCom
12    Jumping Break                    (c) 1999 F2 System
13    Lup Lup Puzzle                   (c) 1999 Omega System       (version 3.0 and 2.9)
14    Puzzle Bang Bang                 (c) 1999 Omega System       (version 2.8)
15    Super Lup Lup Puzzle             (c) 1999 Omega System       (version 4.0)
16    Vamf 1/2                         (c) 1999 Danbi & F2 System  (Europe version)
17    Vamp 1/2                         (c) 1999 Danbi & F2 System  (Korea version)
18    Date Quiz Go Go Episode 2        (c) 2000 SemiCom
19    Mission Craft                    (c) 2000 Sun                (version 2.4)
20    Mr. Dig                          (c) 2000 Sun
21    Final Godori                     (c) 2001 SemiCom            (version 2.20.5915)
22    Wyvern Wings                     (c) 2001 SemiCom
23    Mr. Kicker                       (c) 2001 SemiCom [1]
24    Toy Land Adventure               (c) 2001 SemiCom
25    Age Of Heroes - Silkroad 2       (c) 2001 Unico              (v0.63 - 2001/02/07)
26   Boong-Ga Boong-Ga (Spank 'em)    (c) 2001 Taff System
2627
2728 Real games bugs:
2829 - dquizgo2: bugged video test
r14347r14348
3536 Mr Kicker is also known to exist (not dumped) on the F-E1-16-010 PCB that
3637   Semicom also used for Toy Land Adventure & SemiComDate Quiz Go Go Episode 2 game.
3738
39 Boong-Ga Boong-Ga: the test mode is usable with a standard input configuration like the "common" one
40   
3841 Undumped Semicom games on similar hardware:
3942   Wivern Wings - Semicom's orginal release with alt spelling of title
4043   Red Wyvern - A semi-sequel or update?
r14347r14348
4245   Gaia The last Choice of the Earth (c) 1998 (might be Byron Future Assault type hardware)
4346   Diet Family (c) 2001
4447   Choice III: Joker's Dream (c) 2001
48   
49TODO:
50- boonggab: simulate photo sensors with a "stroke strength"
51- boonggab: what are sensors bit used for? are they used in the japanese version?
4552
4653*********************************************************************/
4754
r14347r14348
5865{
5966public:
6067   vamphalf_state(const machine_config &mconfig, device_type type, const char *tag)
61      : driver_device(mconfig, type, tag) { }
68      : driver_device(mconfig, type, tag)
69      {
70         m_has_extra_gfx = 0;
71      }
6272
6373   UINT16 *m_tiles;
6474   UINT16 *m_wram;
r14347r14348
7282   UINT16 m_semicom_prot_data[2];
7383   UINT16 m_finalgdr_backupram_bank;
7484   UINT8 *m_finalgdr_backupram;
85   int m_has_extra_gfx;
7586};
7687
77
7888static READ16_DEVICE_HANDLER( eeprom_r )
7989{
8090   if(offset)
r14347r14348
123133
124134static WRITE16_HANDLER( flipscreen_w )
125135{
126   vamphalf_state *state = space->machine().driver_data<vamphalf_state>();
127136   if(offset)
128137   {
138      vamphalf_state *state = space->machine().driver_data<vamphalf_state>();
129139      state->m_flipscreen = data & state->m_flip_bit;
130140   }
131141}
r14347r14348
240250   downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x3));
241251}
242252
253static WRITE16_DEVICE_HANDLER( boonggab_oki_bank_w )
254{
255   if(offset)
256      downcast<okim6295_device *>(device)->set_bank_base(0x40000 * (data & 0x7));
257}
243258
259static WRITE16_HANDLER( boonggab_prize_w )
260{
261   if(offset)
262   {
263      // data & 0x01 == motor 1 on
264      // data & 0x02 == motor 2 on
265      // data & 0x04 == motor 3 on
266      // data & 0x08 == prize power 1 on
267      // data & 0x10 == prize lamp 1 off
268      // data & 0x20 == prize lamp 2 off
269      // data & 0x40 == prize lamp 3 off
270   }
271}
272
273static WRITE16_HANDLER( boonggab_lamps_w )
274{
275   if(offset == 1)
276   {
277      // data & 0x0001 == lamp  7 on (why is data & 0x8000 set too?)
278      // data & 0x0002 == lamp  8 on
279      // data & 0x0004 == lamp  9 on
280      // data & 0x0008 == lamp 10 on
281      // data & 0x0010 == lamp 11 on
282      // data & 0x0020 == lamp 12 on
283      // data & 0x0040 == lamp 13 on
284   }
285   else if(offset == 3)
286   {
287      // data & 0x0100 == lamp  0 on
288      // data & 0x0200 == lamp  1 on
289      // data & 0x0400 == lamp  2 on
290      // data & 0x0800 == lamp  3 on
291      // data & 0x1000 == lamp  4 on
292      // data & 0x2000 == lamp  5 on
293      // data & 0x4000 == lamp  6 on
294   }
295}
296
244297static ADDRESS_MAP_START( common_map, AS_PROGRAM, 16 )
245298   AM_RANGE(0x00000000, 0x001fffff) AM_RAM AM_BASE_MEMBER(vamphalf_state, m_wram)
246299   AM_RANGE(0x40000000, 0x4003ffff) AM_RAM AM_BASE_MEMBER(vamphalf_state, m_tiles)
r14347r14348
283336   AM_RANGE(0x4c0, 0x4c1) AM_NOP // return 0, when oki chip is read / written
284337   AM_RANGE(0x4c2, 0x4c3) AM_DEVREADWRITE8_MODERN("oki", okim6295_device, read, write, 0x00ff)
285338   AM_RANGE(0x540, 0x543) AM_DEVWRITE8("ymsnd", ym2151_register_port_w, 0x00ff)
286   AM_RANGE(0x546, 0x547) AM_DEVREADWRITE8("ymsnd", ym2151_status_port_r, ym2151_data_port_w, 0x00ff)
339   AM_RANGE(0x544, 0x547) AM_DEVREADWRITE8("ymsnd", ym2151_status_port_r, ym2151_data_port_w, 0x00ff)
287340   AM_RANGE(0x7c0, 0x7c3) AM_DEVREAD("eeprom", eeprom_r)
288341ADDRESS_MAP_END
289342
r14347r14348
339392   AM_RANGE(0x7c00, 0x7c03) AM_READ_PORT("SYSTEM")
340393ADDRESS_MAP_END
341394
342
343395static ADDRESS_MAP_START( jmpbreak_io, AS_IO, 16 )
344396   AM_RANGE(0x0c0, 0x0c3) AM_NOP // ?
345397   AM_RANGE(0x100, 0x103) AM_WRITENOP // ?
r14347r14348
381433   AM_RANGE(0x0680, 0x0683) AM_DEVWRITE("oki_2", aoh_oki_bank_w)
382434ADDRESS_MAP_END
383435
436static ADDRESS_MAP_START( boonggab_io, AS_IO, 16 )
437   AM_RANGE(0x0c0, 0x0c3) AM_DEVREAD("eeprom", eeprom_r)
438   AM_RANGE(0x200, 0x203) AM_NOP // seems unused
439   AM_RANGE(0x300, 0x303) AM_WRITE(flipscreen_w)
440   AM_RANGE(0x400, 0x403) AM_READ_PORT("SYSTEM")
441   AM_RANGE(0x404, 0x407) AM_READ_PORT("P1_P2")
442   AM_RANGE(0x408, 0x40b) AM_DEVWRITE("eeprom", eeprom_w)
443   AM_RANGE(0x410, 0x413) AM_WRITE(boonggab_prize_w)
444   AM_RANGE(0x414, 0x41b) AM_WRITE(boonggab_lamps_w)
445   AM_RANGE(0x600, 0x603) AM_DEVWRITE("oki", boonggab_oki_bank_w)
446   AM_RANGE(0x700, 0x701) AM_NOP // return 0, when oki chip is read / written
447   AM_RANGE(0x702, 0x703) AM_DEVREADWRITE8_MODERN("oki", okim6295_device, read, write, 0x00ff)
448   AM_RANGE(0x740, 0x743) AM_DEVWRITE8("ymsnd", ym2151_register_port_w, 0x00ff)
449   AM_RANGE(0x744, 0x747) AM_DEVREADWRITE8("ymsnd", ym2151_status_port_r, ym2151_data_port_w, 0x00ff)
450ADDRESS_MAP_END
451
384452/*
385453Sprite list:
386454
r14347r14348
437505
438506            code  = state->m_tiles[offs+1];
439507            color = (state->m_tiles[offs+2] >> state->m_palshift) & 0x7f;
508           
509            // boonggab
510            if(state->m_has_extra_gfx)
511            {
512               code  |= ((state->m_tiles[offs+2] & 0x100) << 8);
513            }
440514
441515            x = state->m_tiles[offs+3] & 0x01ff;
442516            y = 256 - (state->m_tiles[offs] & 0x00ff);
r14347r14348
544618   return 0;
545619}
546620
621static CUSTOM_INPUT( boonggab_photo_sensors_r )
622{
623   static const UINT16 photo_sensors_table[8] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 };
624   UINT8 res = input_port_read(field.machine(), "PHOTO_SENSORS");
625   
626   switch(res)
627   {
628      case 0x01:
629         return photo_sensors_table[1]; // 5 - 7 points
630         
631      case 0x02:
632         return photo_sensors_table[2]; // 8 - 10 points
633         
634      case 0x04:
635         return photo_sensors_table[3]; // 11 - 13 points
636         
637      case 0x08:
638         return photo_sensors_table[4]; // 14 - 16 points
639         
640      case 0x10:
641         return photo_sensors_table[5]; // 17 - 19 points
642         
643      case 0x20:
644         return photo_sensors_table[6]; // 20 - 22 points
645         
646      case 0x40:
647         return photo_sensors_table[7]; // 23 - 25 points
648   }
649   
650   return photo_sensors_table[0];
651}
547652
653
548654static INPUT_PORTS_START( common )
549655   PORT_START("P1_P2")
550656   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
r14347r14348
648754   PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
649755INPUT_PORTS_END
650756
757static INPUT_PORTS_START( boonggab )
758   PORT_START("P1_P2")
759   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 )
760   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
761   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
762   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
763   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED )
764   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED )
765   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
766   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
767   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 1
768   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 2
769   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) // sensor 3
770   PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(boonggab_photo_sensors_r, NULL) // photo sensors 1, 2 and 3
771   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
772   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
773
774   PORT_START("SYSTEM")
775   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
776   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
777   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
778   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE )
779   PORT_SERVICE_NO_TOGGLE( 0x0010, IP_ACTIVE_LOW )
780   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
781   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
782   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
783   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )   
784   
785   PORT_START("PHOTO_SENSORS")
786   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
787   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
788   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1)
789   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1)
790   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_PLAYER(1)
791   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_PLAYER(1)
792   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_PLAYER(1)   
793INPUT_PORTS_END
794
651795static const gfx_layout sprites_layout =
652796{
653797   16,16,
r14347r14348
835979   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
836980MACHINE_CONFIG_END
837981
982static MACHINE_CONFIG_DERIVED( boonggab, common )
983   MCFG_CPU_MODIFY("maincpu")
984   MCFG_CPU_IO_MAP(boonggab_io)
985
986   MCFG_FRAGMENT_ADD(sound_ym_oki)
987MACHINE_CONFIG_END
988
838989/*
839990
840991Vamp 1/2 (Semi Vamp)
r14347r14348
12001351   ROM_LOAD( "cm-vrom1.020", 0x00000, 0x40000, CRC(fcc28081) SHA1(44031df0ee28ca49df12bcb73c83299fac205e21) )
12011352ROM_END
12021353
1354
12031355/*
12041356
12051357Date Quiz Go Go Episode 2
r14347r14348
17321884   ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
17331885ROM_END
17341886
1887/*
1888
1889Boong-Ga Boong-Ga (Spank'em!)
1890Taff System, 2001
1891
1892*/
1893
1894ROM_START( boonggab )
1895   ROM_REGION16_BE( 0x100000, "user1", ROMREGION_ERASE00 ) /* Hyperstone CPU Code */
1896   /* rom2 empty */
1897   /* rom3 empty */
1898   ROM_LOAD( "2.rom0",       0x80000, 0x80000, CRC(3395541b) SHA1(4e822a52d6070bde232285e7ad8fbe74594bbf28) )
1899   ROM_LOAD( "1.rom1",       0x00000, 0x80000, CRC(50522da1) SHA1(28f92fc818513d7a4934b9f8e5d39243d720cc80) )
1900
1901   ROM_REGION( 0x2000000, "gfx1", ROMREGION_ERASE00 )  /* 16x16x8 Sprites */
1902   ROM_LOAD32_WORD( "boong-ga.roml00", 0x0000000, 0x200000, CRC(18be5f92) SHA1(abccc578e5e9652a7829165b485776671938b9d9) )
1903   ROM_LOAD32_WORD( "boong-ga.romu00", 0x0000002, 0x200000, CRC(0158ba9e) SHA1(b6cb699f0779b26d578043c42a0ce14a59fd8ac5) )
1904   ROM_LOAD32_WORD( "boong-ga.roml05", 0x0400000, 0x200000, CRC(76d60553) SHA1(13a47aed2e7213be98e55a938887a3c2fb314fbe) )
1905   ROM_LOAD32_WORD( "boong-ga.romu05", 0x0400002, 0x200000, CRC(35ee8fb5) SHA1(79bd1775087bfaf7624978cec4e912553ca1f027) )
1906   ROM_LOAD32_WORD( "boong-ga.roml01", 0x0800000, 0x200000, CRC(636e9d5d) SHA1(d478ec905d6e56e4c46889430d8c32de98e9dc14) )
1907   ROM_LOAD32_WORD( "boong-ga.romu01", 0x0800002, 0x200000, CRC(b8dcf6b7) SHA1(8ea590f92832e6b6a4c27fb1f2aa18bb000f41e0) )
1908   ROM_LOAD32_WORD( "boong-ga.roml06", 0x0c00000, 0x200000, CRC(8dc521b7) SHA1(37021bb05a582b80a4883bddf677c1d41e6777d2) )
1909   ROM_LOAD32_WORD( "boong-ga.romu06", 0x0c00002, 0x200000, CRC(f6b83270) SHA1(7971fdb99987ac701c76958a626b0cb75ba31451) )
1910   ROM_LOAD32_WORD( "boong-ga.roml02", 0x1000000, 0x200000, CRC(d0661c69) SHA1(94f95df19b448565642db8c5aafb2532c0febc37) )
1911   ROM_LOAD32_WORD( "boong-ga.romu02", 0x1000002, 0x200000, CRC(eac01eb8) SHA1(c730078d8422d566378d6a4b0deb42d2814f0dab) )
1912   ROM_LOAD32_WORD( "boong-ga.roml07", 0x1400000, 0x200000, CRC(3301813a) SHA1(61997f07ca516eb77c9d9478b42950fd6fc42ac5) )
1913   ROM_LOAD32_WORD( "boong-ga.romu07", 0x1400002, 0x200000, CRC(3f1c3682) SHA1(969491b0d3be054ddc199db2ced38c76c8f561ee) )
1914   ROM_LOAD32_WORD( "boong-ga.roml03", 0x1800000, 0x200000, CRC(4d4260b3) SHA1(11a5d0b472b783094d44a5c931ee1cbe816b2a05) )
1915   ROM_LOAD32_WORD( "boong-ga.romu03", 0x1800002, 0x200000, CRC(4ba00032) SHA1(de9e0640e80204f4906576b20eeaa17f03694b3f) )
1916   /* roml08 empty */
1917   /* romu08 empty */
1918   /* roml04 empty */
1919   /* romu04 empty */
1920   /* roml09 empty */
1921   /* romu09 empty */
1922   
1923   ROM_REGION( 0x100000, "user2", 0 ) /* Oki Samples */
1924   ROM_LOAD( "3.vrom1",      0x00000, 0x80000, CRC(0696bfcb) SHA1(bba61f3cae23271215bbbf8214ce3b73459d5da5) )
1925   ROM_LOAD( "4.vrom2",      0x80000, 0x80000, CRC(305c2b16) SHA1(fa199c4cd4ebb952d934e3863fca8740eeba9294) )
1926
1927   /* $00000-$20000 stays the same in all sound banks, */
1928   /* the second half of the bank is what gets switched */
1929   ROM_REGION( 0x200000, "oki", 0 ) /* Samples */
1930   ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
1931   ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
1932   ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
1933   ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
1934   ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
1935   ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
1936   ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
1937   ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
1938   ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
1939   ROM_COPY( "user2", 0x080000, 0x120000, 0x020000)
1940   ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
1941   ROM_COPY( "user2", 0x0a0000, 0x160000, 0x020000)
1942   ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
1943   ROM_COPY( "user2", 0x0c0000, 0x1a0000, 0x020000)
1944   ROM_COPY( "user2", 0x000000, 0x1c0000, 0x020000)
1945   ROM_COPY( "user2", 0x0e0000, 0x1e0000, 0x020000)
1946ROM_END
1947
17351948static int irq_active(address_space *space)
17361949{
17371950   UINT32 FCR = cpu_get_reg(&space->device(), 27);
r14347r14348
19662179
19672180}
19682181
2182static READ16_HANDLER( boonggab_speedup_r )
2183{
2184   vamphalf_state *state = space->machine().driver_data<vamphalf_state>();
2185   if(cpu_get_pc(&space->device()) == 0x13198)
2186   {
2187      if(irq_active(space))
2188         device_spin_until_interrupt(&space->device());
2189   }
2190
2191   return state->m_wram[(0xf1b7c / 2)+offset];
2192}
2193
19692194static DRIVER_INIT( vamphalf )
19702195{
19712196   vamphalf_state *state = machine.driver_data<vamphalf_state>();
r14347r14348
21292354   state->m_palshift = 0;
21302355}
21312356
2357
2358static DRIVER_INIT( boonggab )
2359{
2360   vamphalf_state *state = machine.driver_data<vamphalf_state>();
2361   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x000f1b7c, 0x000f1b7f, FUNC(boonggab_speedup_r) );
2362
2363   state->m_palshift = 0;
2364   state->m_has_extra_gfx = 1;
2365   state->m_flip_bit = 1;
2366}
2367
21322368GAME( 1999, coolmini, 0,        coolmini, common,   coolmini, ROT0,   "SemiCom",           "Cool Minigame Collection", 0 )
21332369GAME( 1999, jmpbreak, 0,        jmpbreak, common,   jmpbreak, ROT0,   "F2 System",         "Jumping Break" , 0 )
21342370GAME( 1999, suplup,   0,        suplup,   common,   suplup,   ROT0,   "Omega System",      "Super Lup Lup Puzzle / Zhuan Zhuan Puzzle (version 4.0 / 990518)" , 0 )
r14347r14348
21452381GAME( 2001, toyland,  0,        coolmini, common,   toyland,  ROT0,   "SemiCom",           "Toy Land Adventure", 0 )
21462382GAME( 2001, wyvernwg, 0,        wyvernwg, common,   wyvernwg, ROT270, "SemiCom (Game Vision license)", "Wyvern Wings", GAME_NO_SOUND )
21472383GAME( 2001, aoh,      0,        aoh,      aoh,      aoh,      ROT0,   "Unico",             "Age Of Heroes - Silkroad 2 (v0.63 - 2001/02/07)", 0 )
2384GAME( 2001, boonggab, 0,        boonggab, boonggab, boonggab, ROT270, "Taff System",       "Boong-Ga Boong-Ga (Spank'em!)", 0 )
src/mame/drivers/rallyx.c
r14347r14348
857857static const char *const rallyx_sample_names[] =
858858{
859859   "*rallyx",
860   "bang.wav",
860   "bang",
861861   0   /* end of array */
862862};
863863
src/mame/drivers/gridlee.c
r14347r14348
406406static const char *const sample_names[] =
407407{
408408   "*gridlee",
409   "bounce1.wav",
410   "bounce2.wav",
409   "bounce1",
410   "bounce2",
411411   0   /* end of array */
412412};
413413
src/mame/drivers/dai3wksi.c
r14347r14348
262262static const char *const dai3wksi_sample_names[] =
263263{
264264   "*dai3wksi",
265   "1.wav",
266   "2.wav",
267   "3.wav",
268   "3-2.wav",
269   "4.wav",
270   "5.wav",
271   "6.wav",
272   "6-2.wav",
265   "1",
266   "2",
267   "3",
268   "3-2",
269   "4",
270   "5",
271   "6",
272   "6-2",
273273   0
274274};
275275
src/mame/drivers/aristmk4.c
r14347r14348
587587static const char *const meter_sample_names[] =
588588{
589589   "*aristmk4",
590   "tick.wav",
590   "tick",
591591   0
592592};
593593
src/mame/drivers/astinvad.c
r14347r14348
558558static const char *const astinvad_sample_names[] =
559559{
560560   "*invaders",
561   "0.wav",
562   "1.wav",
563   "2.wav",
564   "3.wav",
565   "4.wav",
566   "5.wav",
567   "6.wav",
568   "7.wav",
569   "8.wav",
561   "0",
562   "1",
563   "2",
564   "3",
565   "4",
566   "5",
567   "6",
568   "7",
569   "8",
570570   0
571571};
572572
src/mame/drivers/neodrvr.c
r14347r14348
98619861   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x00200, 0x001fff, FUNC(sbp_lowerrom_r));
98629862   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x00200, 0x001fff, FUNC(sbp_lowerrom_w));
98639863
9864   /* the game code clears the text overlay used ingame immediately after writing it.. why? protection? sloppy code that the hw ignores? imperfect emulation? */
9865   {
9866      UINT16* rom = (UINT16*)machine.region("maincpu")->base();
98649867
9868      rom[0x2a6f8/2] = 0x4e71;
9869      rom[0x2a6fa/2] = 0x4e71;
9870      rom[0x2a6fc/2] = 0x4e71;
9871   }
9872
9873
98659874}
98669875
98679876
src/mame/drivers/gottlieb.c
r14347r14348
17461746static const char *const reactor_sample_names[] =
17471747{
17481748   "*reactor",
1749   "fx_53.wav", /* "8 left" */
1750   "fx_54.wav", /* "16 left" */
1751   "fx_55.wav", /* "24 left" */
1752   "fx_56.wav", /* "32 left" */
1753   "fx_57.wav", /* "40 left" */
1754   "fx_58.wav", /* "warning, core unstable" */
1755   "fx_59.wav", /* "bonus" */
1756   "fx_31.wav", /* "chamber activated" */
1757   "fx_39a.wav", /* "2000" */
1758   "fx_39b.wav", /* "5000" */
1759   "fx_39c.wav", /* "10000" */
1760   "fx_39d.wav", /* "15000" */
1761   "fx_39e.wav", /* "20000" */
1762   "fx_39f.wav", /* "25000" */
1763   "fx_39g.wav", /* "30000" */
1764   "fx_39h.wav", /* "35000" */
1765   "fx_39i.wav", /* "40000" */
1766   "fx_39j.wav", /* "45000" */
1767   "fx_39k.wav", /* "50000" */
1768   "fx_39l.wav", /* "55000" */
1749   "fx_53", /* "8 left" */
1750   "fx_54", /* "16 left" */
1751   "fx_55", /* "24 left" */
1752   "fx_56", /* "32 left" */
1753   "fx_57", /* "40 left" */
1754   "fx_58", /* "warning, core unstable" */
1755   "fx_59", /* "bonus" */
1756   "fx_31", /* "chamber activated" */
1757   "fx_39a", /* "2000" */
1758   "fx_39b", /* "5000" */
1759   "fx_39c", /* "10000" */
1760   "fx_39d", /* "15000" */
1761   "fx_39e", /* "20000" */
1762   "fx_39f", /* "25000" */
1763   "fx_39g", /* "30000" */
1764   "fx_39h", /* "35000" */
1765   "fx_39i", /* "40000" */
1766   "fx_39j", /* "45000" */
1767   "fx_39k", /* "50000" */
1768   "fx_39l", /* "55000" */
17691769     0   /* end of array */
17701770};
17711771
17721772static const char *const qbert_sample_names[] =
17731773{
17741774   "*qbert",
1775   "fx_17a.wav", /* random speech, voice clock 255 */
1776   "fx_17b.wav", /* random speech, voice clock 255 */
1777   "fx_17c.wav", /* random speech, voice clock 255 */
1778   "fx_17d.wav", /* random speech, voice clock 255 */
1779   "fx_17e.wav", /* random speech, voice clock 255 */
1780   "fx_17f.wav", /* random speech, voice clock 255 */
1781   "fx_17g.wav", /* random speech, voice clock 255 */
1782   "fx_17h.wav", /* random speech, voice clock 255 */
1783   "fx_18a.wav", /* random speech, voice clock 176 */
1784   "fx_18b.wav", /* random speech, voice clock 176 */
1785   "fx_18c.wav", /* random speech, voice clock 176 */
1786   "fx_18d.wav", /* random speech, voice clock 176 */
1787   "fx_18e.wav", /* random speech, voice clock 176 */
1788   "fx_18f.wav", /* random speech, voice clock 176 */
1789   "fx_18g.wav", /* random speech, voice clock 176 */
1790   "fx_18h.wav", /* random speech, voice clock 176 */
1791   "fx_19a.wav", /* random speech, voice clock 128 */
1792   "fx_19b.wav", /* random speech, voice clock 128 */
1793   "fx_19c.wav", /* random speech, voice clock 128 */
1794   "fx_19d.wav", /* random speech, voice clock 128 */
1795   "fx_19e.wav", /* random speech, voice clock 128 */
1796   "fx_19f.wav", /* random speech, voice clock 128 */
1797   "fx_19g.wav", /* random speech, voice clock 128 */
1798   "fx_19h.wav", /* random speech, voice clock 128 */
1799   "fx_20a.wav", /* random speech, voice clock 96 */
1800   "fx_20b.wav", /* random speech, voice clock 96 */
1801   "fx_20c.wav", /* random speech, voice clock 96 */
1802   "fx_20d.wav", /* random speech, voice clock 96 */
1803   "fx_20e.wav", /* random speech, voice clock 96 */
1804   "fx_20f.wav", /* random speech, voice clock 96 */
1805   "fx_20g.wav", /* random speech, voice clock 96 */
1806   "fx_20h.wav", /* random speech, voice clock 96 */
1807   "fx_21a.wav", /* random speech, voice clock 62 */
1808   "fx_21b.wav", /* random speech, voice clock 62 */
1809   "fx_21c.wav", /* random speech, voice clock 62 */
1810   "fx_21d.wav", /* random speech, voice clock 62 */
1811   "fx_21e.wav", /* random speech, voice clock 62 */
1812   "fx_21f.wav", /* random speech, voice clock 62 */
1813   "fx_21g.wav", /* random speech, voice clock 62 */
1814   "fx_21h.wav", /* random speech, voice clock 62 */
1815   "fx_22.wav", /* EH2 with decreasing voice clock */
1816   "fx_23.wav", /* O1 with varying voice clock */
1817   "fx_28.wav",
1818   "fx_36.wav",
1819   "knocker.wav",
1775   "fx_17a", /* random speech, voice clock 255 */
1776   "fx_17b", /* random speech, voice clock 255 */
1777   "fx_17c", /* random speech, voice clock 255 */
1778   "fx_17d", /* random speech, voice clock 255 */
1779   "fx_17e", /* random speech, voice clock 255 */
1780   "fx_17f", /* random speech, voice clock 255 */
1781   "fx_17g", /* random speech, voice clock 255 */
1782   "fx_17h", /* random speech, voice clock 255 */
1783   "fx_18a", /* random speech, voice clock 176 */
1784   "fx_18b", /* random speech, voice clock 176 */
1785   "fx_18c", /* random speech, voice clock 176 */
1786   "fx_18d", /* random speech, voice clock 176 */
1787   "fx_18e", /* random speech, voice clock 176 */
1788   "fx_18f", /* random speech, voice clock 176 */
1789   "fx_18g", /* random speech, voice clock 176 */
1790   "fx_18h", /* random speech, voice clock 176 */
1791   "fx_19a", /* random speech, voice clock 128 */
1792   "fx_19b", /* random speech, voice clock 128 */
1793   "fx_19c", /* random speech, voice clock 128 */
1794   "fx_19d", /* random speech, voice clock 128 */
1795   "fx_19e", /* random speech, voice clock 128 */
1796   "fx_19f", /* random speech, voice clock 128 */
1797   "fx_19g", /* random speech, voice clock 128 */
1798   "fx_19h", /* random speech, voice clock 128 */
1799   "fx_20a", /* random speech, voice clock 96 */
1800   "fx_20b", /* random speech, voice clock 96 */
1801   "fx_20c", /* random speech, voice clock 96 */
1802   "fx_20d", /* random speech, voice clock 96 */
1803   "fx_20e", /* random speech, voice clock 96 */
1804   "fx_20f", /* random speech, voice clock 96 */
1805   "fx_20g", /* random speech, voice clock 96 */
1806   "fx_20h", /* random speech, voice clock 96 */
1807   "fx_21a", /* random speech, voice clock 62 */
1808   "fx_21b", /* random speech, voice clock 62 */
1809   "fx_21c", /* random speech, voice clock 62 */
1810   "fx_21d", /* random speech, voice clock 62 */
1811   "fx_21e", /* random speech, voice clock 62 */
1812   "fx_21f", /* random speech, voice clock 62 */
1813   "fx_21g", /* random speech, voice clock 62 */
1814   "fx_21h", /* random speech, voice clock 62 */
1815   "fx_22", /* EH2 with decreasing voice clock */
1816   "fx_23", /* O1 with varying voice clock */
1817   "fx_28",
1818   "fx_36",
1819   "knocker",
18201820   0   /* end of array */
18211821};
18221822
src/mame/drivers/mcr.c
r14347r14348
15731573static const char *const journey_sample_names[] =
15741574{
15751575   "*journey",
1576   "sepways.wav",
1576   "sepways",
15771577   0
15781578};
15791579
r14347r14348
15871587static const char *const twotiger_sample_names[] =
15881588{
15891589   "*twotiger",
1590   "left.wav",
1591   "right.wav",
1590   "left",
1591   "right",
15921592   0
15931593};
15941594
src/mame/drivers/cliffhgr.c
r14347r14348
671671   DEVCB_LINE(vdp_interrupt)
672672};
673673
674static SCREEN_UPDATE_IND16( cliffhgr )
675{
676   tms9928a_device *tms9928a = screen.machine().device<tms9928a_device>( "tms9928a" );
677
678   tms9928a->screen_update( screen, bitmap, cliprect );
679   return 0;
680}
681
682674DISCRETE_SOUND_EXTERN( cliffhgr );
683675
684676
r14347r14348
701693   MCFG_NVRAM_ADD_0FILL("nvram")
702694
703695   MCFG_LASERDISC_PR8210_ADD("laserdisc")
704   MCFG_LASERDISC_OVERLAY_STATIC(TMS9928A_TOTAL_HORZ, TMS9928A_TOTAL_VERT_NTSC, cliffhgr)
696   MCFG_LASERDISC_OVERLAY_DEVICE(TMS9928A_TOTAL_HORZ, TMS9928A_TOTAL_VERT_NTSC, "tms9928a", tms9928a_device, screen_update)
705697   MCFG_LASERDISC_OVERLAY_CLIP(TMS9928A_HORZ_DISPLAY_START-12, TMS9928A_HORZ_DISPLAY_START+32*8+12-1, TMS9928A_VERT_DISPLAY_START_NTSC - 12, TMS9928A_VERT_DISPLAY_START_NTSC+24*8+12-1)
706698
707699   /* start with the TMS9928a video configuration */
src/mame/drivers/calchase.c
r14347r14348
55preliminary driver by Angelo Salese & Grull Osgo
66
77TODO:
8- Fix CPU core bugs;
98- get Win 98 to boot;
9- Various graphics bugs (title screen uses ROZ?);
10- fix 129 Hz refresh rate bug;
11- inputs (is there a service mode?)
1012
1113I/O Memo (http://bochs.sourceforge.net/techspec/PORTS.LST):
121446E8    ----    8514/A and compatible video cards (e.g. ATI Graphics Ultra)
r14347r14348
1719
182043c4 is a 83c4 mirror?
1921
2004D0-04D1 ---- EISA IRQ control
2100F0-00F5 ----  PCjr Disk Controller
22(or)
2300F0-00FF ----  coprocessor (8087..80387)
24
2522=====================================================================================
2623
2724California Chase
r14347r14348
124121#include "machine/pckeybrd.h"
125122#include "machine/idectrl.h"
126123#include "video/pc_vga.h"
124#include "sound/dac.h"
127125
128126
129
130127class calchase_state : public driver_device
131128{
132129public:
133130   calchase_state(const machine_config &mconfig, device_type type, const char *tag)
134      : driver_device(mconfig, type, tag) { }
131      : driver_device(mconfig, type, tag),
132        m_maincpu(*this, "maincpu")
133        { }
135134
136135   UINT32 *m_bios_ram;
137136   int m_dma_channel;
r14347r14348
145144   device_t   *m_pic8259_2;
146145   device_t   *m_dma8237_1;
147146   device_t   *m_dma8237_2;
147
148   UINT32 m_idle_skip_ram;
149   required_device<cpu_device> m_maincpu;
148150};
149151
150152
r14347r14348
377379static UINT32 intel82439tx_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask)
378380{
379381   UINT32 r = 0;
382
383   if(reg == 0)
384      return 0x05851106; // VT82C585VPX, VIA
385
380386   if (ACCESSING_BITS_24_31)
381387   {
382388      r |= mxtc_config_r(busdevice, device, function, reg + 3) << 24;
r14347r14348
436442static UINT32 intel82371ab_pci_r(device_t *busdevice, device_t *device, int function, int reg, UINT32 mem_mask)
437443{
438444   UINT32 r = 0;
445
446   if(reg == 0)
447      return 0x30401106; // VT82C586B, VIA
448
439449   if (ACCESSING_BITS_24_31)
440450   {
441451      r |= piix4_config_r(busdevice, device, function, reg + 3) << 24;
r14347r14348
485495   }
486496}
487497
498static READ16_HANDLER( calchase_iocard1_r )
499{
500   return input_port_read(space->machine(), "IOCARD1");
501}
502
503static READ16_HANDLER( calchase_iocard2_r )
504{
505   return input_port_read(space->machine(), "IOCARD2");
506}
507
508static READ16_HANDLER( calchase_iocard3_r )
509{
510   return input_port_read(space->machine(), "IOCARD3");
511}
512
513/* These two controls wheel pot or whatever this game uses ... */
514static READ16_HANDLER( calchase_iocard4_r )
515{
516   return input_port_read(space->machine(), "IOCARD4");
517}
518
519static READ16_HANDLER( calchase_iocard5_r )
520{
521   return input_port_read(space->machine(), "IOCARD5");
522}
523
524
525static WRITE16_DEVICE_HANDLER( calchase_dac_w )
526{
527   dac_data_16_w(device, ((data & 0xfff) << 4));
528}
529
488530static ADDRESS_MAP_START( calchase_map, AS_PROGRAM, 32 )
489531   AM_RANGE(0x00000000, 0x0009ffff) AM_RAM
490532   AM_RANGE(0x000a0000, 0x000bffff) AM_RAM // VGA VRAM
491533   AM_RANGE(0x000c0000, 0x000c7fff) AM_RAM AM_REGION("video_bios", 0)
492   AM_RANGE(0x000c8000, 0x000dffff) AM_NOP
534   AM_RANGE(0x000c8000, 0x000cffff) AM_NOP
535   //AM_RANGE(0x000d0000, 0x000d0003) AM_RAM  // XYLINX - Sincronus serial communication
536   AM_RANGE(0x000d0004, 0x000d0007) AM_READ16(calchase_iocard1_r, 0x0000ffff)
537   AM_RANGE(0x000d000c, 0x000d000f) AM_READ16(calchase_iocard2_r, 0x0000ffff)
538   AM_RANGE(0x000d0030, 0x000d0033) AM_READ16(calchase_iocard3_r, 0xffff0000)
539   AM_RANGE(0x000d0030, 0x000d0033) AM_READ16(calchase_iocard4_r, 0x0000ffff)
540   AM_RANGE(0x000d0034, 0x000d0037) AM_READ16(calchase_iocard5_r, 0x0000ffff)
541   AM_RANGE(0x000d0008, 0x000d000b) AM_WRITENOP // ???
542   AM_RANGE(0x000d0024, 0x000d0027) AM_DEVWRITE16("dac_l",calchase_dac_w,0x0000ffff)
543   AM_RANGE(0x000d0028, 0x000d002b) AM_DEVWRITE16("dac_r",calchase_dac_w,0x0000ffff)
544   AM_RANGE(0x000d0800, 0x000d0fff) AM_ROM AM_REGION("nvram",0) //
545   AM_RANGE(0x000d0800, 0x000d0fff) AM_RAM  // GAME_CMOS
546
493547   //GRULL AM_RANGE(0x000e0000, 0x000effff) AM_RAM
494548   //GRULL-AM_RANGE(0x000f0000, 0x000fffff) AM_ROMBANK("bank1")
495549   //GRULL AM_RANGE(0x000f0000, 0x000fffff) AM_WRITE(bios_ram_w)
496550   AM_RANGE(0x000e0000, 0x000fffff) AM_ROMBANK("bank1")
497551   AM_RANGE(0x000e0000, 0x000fffff) AM_WRITE(bios_ram_w)
498   AM_RANGE(0x00100000, 0x03ffffff) AM_RAM
499   AM_RANGE(0x04000000, 0x28ffffff) AM_NOP
552   AM_RANGE(0x00100000, 0x03ffffff) AM_RAM  // 64MB
553   AM_RANGE(0x02000000, 0x28ffffff) AM_NOP
500554   //AM_RANGE(0x04000000, 0x040001ff) AM_RAM
501555   //AM_RANGE(0x08000000, 0x080001ff) AM_RAM
502556   //AM_RANGE(0x0c000000, 0x0c0001ff) AM_RAM
r14347r14348
552606#define AT_KEYB_HELPER(bit, text, key1) \
553607   PORT_BIT( bit, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(text) PORT_CODE(key1)
554608
555#if 0
609
610
611#if 1
556612static INPUT_PORTS_START( calchase )
557613   PORT_START("pc_keyboard_0")
558614   PORT_BIT ( 0x0001, 0x0000, IPT_UNUSED )    /* unused scancode 0 */
559615   AT_KEYB_HELPER( 0x0002, "Esc",          KEYCODE_Q           ) /* Esc                         01  81 */
560616
561617   PORT_START("pc_keyboard_1")
618   AT_KEYB_HELPER( 0x0010, "T",            KEYCODE_T           ) /* T                           14  94 */
562619   AT_KEYB_HELPER( 0x0020, "Y",            KEYCODE_Y           ) /* Y                           15  95 */
620   AT_KEYB_HELPER( 0x0100, "O",            KEYCODE_O           ) /* O                           18  98 */
563621   AT_KEYB_HELPER( 0x1000, "Enter",        KEYCODE_ENTER       ) /* Enter                       1C  9C */
564622
565623   PORT_START("pc_keyboard_2")
566624
567625   PORT_START("pc_keyboard_3")
626   AT_KEYB_HELPER( 0x0001, "B",            KEYCODE_B           ) /* B                           30  B0 */
568627   AT_KEYB_HELPER( 0x0002, "N",            KEYCODE_N           ) /* N                           31  B1 */
569628   AT_KEYB_HELPER( 0x0800, "F1",           KEYCODE_S           ) /* F1                          3B  BB */
629//   AT_KEYB_HELPER( 0x8000, "F5",           KEYCODE_F5          )
570630
571631   PORT_START("pc_keyboard_4")
632//   AT_KEYB_HELPER( 0x0004, "F8",           KEYCODE_F8          )
572633
573634   PORT_START("pc_keyboard_5")
574635
r14347r14348
576637   AT_KEYB_HELPER( 0x0040, "(MF2)Cursor Up",      KEYCODE_UP          ) /* Up                          67  e7 */
577638   AT_KEYB_HELPER( 0x0080, "(MF2)Page Up",         KEYCODE_PGUP        ) /* Page Up                     68  e8 */
578639   AT_KEYB_HELPER( 0x0100, "(MF2)Cursor Left",      KEYCODE_LEFT        ) /* Left                        69  e9 */
579   AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right",   KEYCODE_RIGHT       ) /* Right                       6a  ea */
640   AT_KEYB_HELPER( 0x0200, "(MF2)Cursor Right",      KEYCODE_RIGHT       ) /* Right                       6a  ea */
580641   AT_KEYB_HELPER( 0x0800, "(MF2)Cursor Down",      KEYCODE_DOWN        ) /* Down                        6c  ec */
581642   AT_KEYB_HELPER( 0x1000, "(MF2)Page Down",      KEYCODE_PGDN        ) /* Page Down                   6d  ed */
582   AT_KEYB_HELPER( 0x4000, "Del",                KEYCODE_A           ) /* Delete                      6f  ef */
643   AT_KEYB_HELPER( 0x4000, "Del",                   KEYCODE_A           ) /* Delete                      6f  ef */
583644
584645   PORT_START("pc_keyboard_7")
646
647   PORT_START("IOCARD1")
648   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
649   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
650   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
651   PORT_DIPNAME( 0x0008, 0x0008, "1" )
652   PORT_DIPSETTING(    0x0008, DEF_STR( Off ) )
653   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
654   PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
655   PORT_DIPSETTING(    0x0010, DEF_STR( Off ) )
656   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
657   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
658   PORT_DIPSETTING(    0x0020, DEF_STR( Off ) )
659   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
660   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Accelerator")
661   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
662   PORT_DIPSETTING(    0x0080, DEF_STR( Off ) )
663   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
664   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
665   PORT_START("IOCARD2")
666   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SERVICE1 ) // guess
667   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset SW")
668   PORT_DIPNAME( 0x0004, 0x0004, "2" )
669   PORT_DIPSETTING(    0x0004, DEF_STR( Off ) )
670   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
671   PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
672   PORT_DIPSETTING(    0x0008, DEF_STR( Off ) )
673   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
674   PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
675   PORT_DIPSETTING(    0x0010, DEF_STR( Off ) )
676   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
677   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
678   PORT_DIPSETTING(    0x0020, DEF_STR( Off ) )
679   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
680   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Turbo")
681   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) // returns back to MS-DOS (likely to be unmapped and actually used as a lame protection check)
682   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
683   PORT_START("IOCARD3")
684   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_VBLANK )
685   PORT_BIT( 0xdfff, IP_ACTIVE_LOW, IPT_UNUSED )
686
687   PORT_START("IOCARD4")
688   PORT_DIPNAME( 0x01, 0x01, "DSWA" )
689   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
690   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
691   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
692   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
693   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
694   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
695   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
696   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
697   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
698   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
699   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
700   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
701   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
702   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
703   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
704   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
705   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
706   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
707   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
708   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
709   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
710   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
711   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
712   PORT_DIPNAME( 0x0100, 0x0100, "DSWA" )
713   PORT_DIPSETTING(    0x0100, DEF_STR( Off ) )
714   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
715   PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
716   PORT_DIPSETTING(    0x0200, DEF_STR( Off ) )
717   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
718   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
719   PORT_DIPSETTING(    0x0400, DEF_STR( Off ) )
720   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
721   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
722   PORT_DIPSETTING(    0x0800, DEF_STR( Off ) )
723   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
724   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
725   PORT_DIPSETTING(    0x1000, DEF_STR( Off ) )
726   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
727   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
728   PORT_DIPSETTING(    0x2000, DEF_STR( Off ) )
729   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
730   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
731   PORT_DIPSETTING(    0x4000, DEF_STR( Off ) )
732   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
733   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
734   PORT_DIPSETTING(    0x8000, DEF_STR( Off ) )
735   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
736   PORT_START("IOCARD5")
737   PORT_DIPNAME( 0x01, 0x01, "DSWA" )
738   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
739   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
740   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
741   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
742   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
743   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
744   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
745   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
746   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
747   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
748   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
749   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
750   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
751   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
752   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
753   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
754   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
755   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
756   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
757   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
758   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
759   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
760   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
761   PORT_DIPNAME( 0x0100, 0x0100, "DSWA" )
762   PORT_DIPSETTING(    0x0100, DEF_STR( Off ) )
763   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
764   PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) )
765   PORT_DIPSETTING(    0x0200, DEF_STR( Off ) )
766   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
767   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
768   PORT_DIPSETTING(    0x0400, DEF_STR( Off ) )
769   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
770   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
771   PORT_DIPSETTING(    0x0800, DEF_STR( Off ) )
772   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
773   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
774   PORT_DIPSETTING(    0x1000, DEF_STR( Off ) )
775   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
776   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
777   PORT_DIPSETTING(    0x2000, DEF_STR( Off ) )
778   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
779   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
780   PORT_DIPSETTING(    0x4000, DEF_STR( Off ) )
781   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
782   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
783   PORT_DIPSETTING(    0x8000, DEF_STR( Off ) )
784   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
585785INPUT_PORTS_END
586786#endif
587787
r14347r14348
619819static READ8_DEVICE_HANDLER( get_slave_ack )
620820{
621821   calchase_state *state = device->machine().driver_data<calchase_state>();
622   if (offset==2) { // IRQ = 2
623      logerror("pic8259_slave_ACK!\n");
822   if (offset==2) {
624823      return pic8259_acknowledge(state->m_pic8259_2);
625824   }
626825   return 0x00;
r14347r14348
708907   pic8259_ir1_w(drvstate->m_pic8259_1, state);
709908}
710909
711
712910static MACHINE_CONFIG_START( calchase, calchase_state )
713911   MCFG_CPU_ADD("maincpu", PENTIUM, 133000000) // Cyrix 686MX-PR200 CPU
714912   MCFG_CPU_PROGRAM_MAP(calchase_map)
r14347r14348
731929
732930   /* video hardware */
733931   MCFG_FRAGMENT_ADD( pcvideo_vga )
932
933   /* sound hardware */
934   MCFG_SPEAKER_STANDARD_STEREO("lspeaker","rspeaker")
935   MCFG_SOUND_ADD("dac_l", DAC, 0)
936   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
937
938   MCFG_SOUND_ADD("dac_r", DAC, 0)
939   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
940
734941MACHINE_CONFIG_END
735942
943
944static READ32_HANDLER( calchase_idle_skip_r )
945{
946   calchase_state *state = space->machine().driver_data<calchase_state>();
947
948   if(cpu_get_pc(&space->device())==0x1406f48)
949      device_spin_until_interrupt(state->m_maincpu);
950
951   return state->m_idle_skip_ram;
952}
953
954static WRITE32_HANDLER( calchase_idle_skip_w )
955{
956   calchase_state *state = space->machine().driver_data<calchase_state>();
957
958   COMBINE_DATA(&state->m_idle_skip_ram);
959}
960
736961static DRIVER_INIT( calchase )
737962{
738963   calchase_state *state = machine.driver_data<calchase_state>();
r14347r14348
740965
741966   pc_vga_init(machine, vga_setting, NULL);
742967   pc_svga_trident_io_init(machine, machine.device("maincpu")->memory().space(AS_PROGRAM), 0xa0000, machine.device("maincpu")->memory().space(AS_IO), 0x0000);
743
744968   init_pc_common(machine, PCCOMMON_KEYBOARD_AT, calchase_set_keyb_int);
745969
746970   intel82439tx_init(machine);
747971
748972   kbdc8042_init(machine, &at8042);
973
974   machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x3f0b160, 0x3f0b163, FUNC(calchase_idle_skip_r), FUNC(calchase_idle_skip_w));
749975}
750976
751
752977ROM_START( calchase )
753978   ROM_REGION( 0x40000, "bios", 0 )
754979   ROM_LOAD( "mb_bios.bin", 0x00000, 0x20000, CRC(dea7a51b) SHA1(e2028c00bfa6d12959fc88866baca8b06a1eab68) )
r14347r14348
764989   DISK_IMAGE_READONLY( "calchase", 0,SHA1(6ae51a9b3f31cf4166322328a98c0235b0874eb3) )
765990ROM_END
766991
767
768GAME( 1999, calchase,  0,    calchase, pc_keyboard,  calchase, ROT0, "The Game Room", "California Chase", GAME_NOT_WORKING|GAME_NO_SOUND )
992GAME( 1999, calchase,  0,    calchase, calchase,  calchase, ROT0, "The Game Room", "California Chase", GAME_NOT_WORKING|GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/actfancr.c
r14347r14348
355355   MCFG_PALETTE_LENGTH(768)
356356
357357   MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
358   deco_bac06_device::set_gfx_region_wide(*device, 2,2,1);
358   deco_bac06_device::set_gfx_region_wide(*device, 2,2,2);
359359   MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
360360   deco_bac06_device::set_gfx_region_wide(*device, 0,0,0);
361361
src/mame/drivers/model1.c
r14347r14348
634634#include "machine/nvram.h"
635635#include "includes/model1.h"
636636
637
638
639637static READ16_HANDLER( io_r )
640638{
641639   static const char *const analognames[] = { "AN0", "AN1", "AN2", "AN3", "AN4", "AN5", "AN6", "AN7" };
r14347r14348
860858   state->m_fifo_wptr++;
861859   if (state->m_fifo_wptr >= ARRAY_LENGTH(state->m_to_68k)) state->m_fifo_wptr = 0;
862860
861    if (state->m_dsbz80 != NULL)
862    {
863        state->m_dsbz80->latch_w(*space, 0, data);
864    }
865
863866   // signal the 68000 that there's data waiting
864867   cputag_set_input_line(space->machine(), "audiocpu", 2, HOLD_LINE);
865868   // give the 68k time to reply
r14347r14348
13341337        ROM_LOAD( "mpr-16484.bin", 0x000000, 0x200000, CRC(9d4c334d) SHA1(8b4d903f14559fed425d225bb23ccfe8da23cbd3) )
13351338        ROM_LOAD( "mpr-16485.bin", 0x200000, 0x200000, CRC(95aadcad) SHA1(4276db655db9834692c3843eb96a3e3a89cb7252) )
13361339
1337   ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 DSB code */
1338        ROM_LOAD( "epr-16471.bin", 0x000000, 0x020000, CRC(f4ee84a4) SHA1(f12b214e6f195b0e5f49ba9f41d8e54bfcea9acc) )
1340    ROM_REGION( 0x20000, "mpegcpu", 0 ) /* Z80 DSB code */
1341    ROM_LOAD( "epr-16471.bin", 0x000000, 0x020000, CRC(f4ee84a4) SHA1(f12b214e6f195b0e5f49ba9f41d8e54bfcea9acc) )
13391342
1340   ROM_REGION( 0x400000, "mpeg", 0 ) /* DSB MPEG data */
1341        ROM_LOAD( "mpr-16514.bin", 0x000000, 0x200000, CRC(3175b0be) SHA1(63649d053c8c17ce1746d16d0cc8202be20c302f) )
1342        ROM_LOAD( "mpr-16515.bin", 0x000000, 0x200000, CRC(3114d748) SHA1(9ef090623cdd2a1d06b5d1bc4b9a07ab4eff5b76) )
1343    ROM_REGION( 0x400000, "ymz770", 0 ) /* DSB MPEG data */
1344    ROM_LOAD( "mpr-16514.bin", 0x000000, 0x200000, CRC(3175b0be) SHA1(63649d053c8c17ce1746d16d0cc8202be20c302f) )
1345    ROM_LOAD( "mpr-16515.bin", 0x200000, 0x200000, CRC(3114d748) SHA1(9ef090623cdd2a1d06b5d1bc4b9a07ab4eff5b76) )
13431346
13441347   ROM_REGION32_LE( 0xc00000, "user1", 0 ) /* TGP model roms */
13451348   ROM_LOAD32_WORD( "mpr-16476.26", 0x000000, 0x200000, CRC(d48609ae) SHA1(8c8686a5c9ca4837447a7f70ed194e2f1882b66d) )
r14347r14348
15431546   MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
15441547MACHINE_CONFIG_END
15451548
1549static MACHINE_CONFIG_DERIVED(swa, model1)
1550    MCFG_DSBZ80_ADD(DSBZ80_TAG)
1551MACHINE_CONFIG_END
1552
15461553static MACHINE_CONFIG_START( model1_vr, model1_state )
15471554   MCFG_CPU_ADD("maincpu", V60, 16000000)
15481555   MCFG_CPU_PROGRAM_MAP(model1_vr_mem)
r14347r14348
15911598GAME( 1993, vf,       0,       model1,    vf,       0, ROT0, "Sega", "Virtua Fighter", GAME_IMPERFECT_GRAPHICS )
15921599GAME( 1992, vr,       0,       model1_vr, vr,       0, ROT0, "Sega", "Virtua Racing", GAME_IMPERFECT_GRAPHICS )
15931600GAME( 1993, vformula, vr,      model1_vr, vr,       0, ROT0, "Sega", "Virtua Formula", GAME_IMPERFECT_GRAPHICS )
1594GAME( 1993, swa,      0,       model1,    swa,      0, ROT0, "Sega", "Star Wars Arcade", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
1601GAME( 1993, swa,      0,       swa,       swa,      0, ROT0, "Sega", "Star Wars Arcade", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
15951602GAME( 1994, wingwar,  0,       model1,    wingwar,  0, ROT0, "Sega", "Wing War (World)", GAME_NOT_WORKING )
15961603GAME( 1994, wingwaru, wingwar, model1,    wingwar,  0, ROT0, "Sega", "Wing War (US)", GAME_NOT_WORKING )
15971604GAME( 1994, wingwarj, wingwar, model1,    wingwar,  0, ROT0, "Sega", "Wing War (Japan)", GAME_NOT_WORKING )
src/mame/drivers/starcrus.c
r14347r14348
120120static const char *const starcrus_sample_names[] =
121121{
122122    "*starcrus",
123    "engine.wav",   /* engine sound, channel 0 */
124    "explos1.wav",   /* explosion sound, first part, channel 1 */
125    "explos2.wav",   /* explosion sound, second part, channel 1 */
126    "launch.wav",   /* launch sound, channels 2 and 3 */
123    "engine",   /* engine sound, channel 0 */
124    "explos1",   /* explosion sound, first part, channel 1 */
125    "explos2",   /* explosion sound, second part, channel 1 */
126    "launch",   /* launch sound, channels 2 and 3 */
127127    0
128128};
129129
src/mame/drivers/segag80v.c
r14347r14348
808808static const char *const elim_sample_names[] =
809809{
810810   "*elim2",
811   "elim1.wav",
812   "elim2.wav",
813   "elim3.wav",
814   "elim4.wav",
815   "elim5.wav",
816   "elim6.wav",
817   "elim7.wav",
818   "elim8.wav",
819   "elim9.wav",
820   "elim10.wav",
821   "elim11.wav",
822   "elim12.wav",
811   "elim1",
812   "elim2",
813   "elim3",
814   "elim4",
815   "elim5",
816   "elim6",
817   "elim7",
818   "elim8",
819   "elim9",
820   "elim10",
821   "elim11",
822   "elim12",
823823   0   /* end of array */
824824};
825825
r14347r14348
841841{
842842   "*spacfury",
843843   /* Sound samples */
844   "sfury1.wav",
845   "sfury2.wav",
846   "sfury3.wav",
847   "sfury4.wav",
848   "sfury5.wav",
849   "sfury6.wav",
850   "sfury7.wav",
851   "sfury8.wav",
852   "sfury9.wav",
853   "sfury10.wav",
844   "sfury1",
845   "sfury2",
846   "sfury3",
847   "sfury4",
848   "sfury5",
849   "sfury6",
850   "sfury7",
851   "sfury8",
852   "sfury9",
853   "sfury10",
854854   0   /* end of array */
855855};
856856
r14347r14348
871871static const char *const zektor_sample_names[] =
872872{
873873   "*zektor",
874   "elim1.wav",  /*  0 fireball */
875   "elim2.wav",  /*  1 bounce */
876   "elim3.wav",  /*  2 Skitter */
877   "elim4.wav",  /*  3 Eliminator */
878   "elim5.wav",  /*  4 Electron */
879   "elim6.wav",  /*  5 fire */
880   "elim7.wav",  /*  6 thrust */
881   "elim8.wav",  /*  7 Electron */
882   "elim9.wav",  /*  8 small explosion */
883   "elim10.wav", /*  9 med explosion */
884   "elim11.wav", /* 10 big explosion */
874   "elim1",  /*  0 fireball */
875   "elim2",  /*  1 bounce */
876   "elim3",  /*  2 Skitter */
877   "elim4",  /*  3 Eliminator */
878   "elim5",  /*  4 Electron */
879   "elim6",  /*  5 fire */
880   "elim7",  /*  6 thrust */
881   "elim8",  /*  7 Electron */
882   "elim9",  /*  8 small explosion */
883   "elim10", /*  9 med explosion */
884   "elim11", /* 10 big explosion */
885885   0
886886};
887887
src/mame/drivers/astrocde.c
r14347r14348
12451245static const char *const seawolf_sample_names[] =
12461246{
12471247   "*seawolf",
1248   "shiphit.wav",
1249   "torpedo.wav",
1250   "dive.wav",
1251   "sonar.wav",
1252   "minehit.wav",
1248   "shiphit",
1249   "torpedo",
1250   "dive",
1251   "sonar",
1252   "minehit",
12531253   0
12541254};
12551255
src/mame/drivers/galaga.c
r14347r14348
16281628static const char *const battles_sample_names[] =
16291629{
16301630   "*battles",
1631   "explo1.wav",   /* ground target explosion */
1632   "explo2.wav",   /* Solvalou explosion */
1631   "explo1",   /* ground target explosion */
1632   "explo2",   /* Solvalou explosion */
16331633   0   /* end of array */
16341634};
16351635
src/mame/drivers/gotya.c
r14347r14348
134134static const char *const sample_names[] =
135135{                                    // Address triggered at
136136   "*thehand",
137   "01.wav",   /* game start tune */         // 075f
138   "02.wav",   /* coin in */               // 0074
139   "03.wav",   /* eat dot */               // 0e45
140   "05.wav",   /* eat dollar sign */         // 0e45
137   "01",   /* game start tune */         // 075f
138   "02",   /* coin in */               // 0074
139   "03",   /* eat dot */               // 0e45
140   "05",   /* eat dollar sign */         // 0e45
141141
142   "06.wav",   /* door open */               // 19e1
143   "07.wav",   /* door close */            // 1965
142   "06",   /* door open */               // 19e1
143   "07",   /* door close */            // 1965
144144
145   "08.wav",   /* theme song */            // 0821
146   //"09.wav"                                  // 1569
145   "08",   /* theme song */            // 0821
146   //"09"                                  // 1569
147147
148148   /* one of these two is played after eating the last dot */
149   "0a.wav",   /* piccolo */               // 17af
150   "0b.wav",   /* tune */                  // 17af
149   "0a",   /* piccolo */               // 17af
150   "0b",   /* tune */                  // 17af
151151
152   //"0f.wav"                                  // 08ee
153   "10.wav",   /* 'We're even. Bye Bye!' */   // 162a
154   "11.wav",   /* 'You got me!' */            // 1657
155   "12.wav",   /* 'You have lost out' */      // 085e
152   //"0f"                                  // 08ee
153   "10",   /* 'We're even. Bye Bye!' */   // 162a
154   "11",   /* 'You got me!' */            // 1657
155   "12",   /* 'You have lost out' */      // 085e
156156
157   "13.wav",   /* 'Rock' */               // 14de
158   "14.wav",   /* 'Scissors' */            // 14f3
159   "15.wav",   /* 'Paper' */               // 1508
157   "13",   /* 'Rock' */               // 14de
158   "14",   /* 'Scissors' */            // 14f3
159   "15",   /* 'Paper' */               // 1508
160160
161161   /* one of these is played when going by the girl between levels */
162   "16.wav",   /* 'Very good!' */            // 194a
163   "17.wav",   /* 'Wonderful!' */            // 194a
164   "18.wav",   /* 'Come on!' */            // 194a
165   "19.wav",   /* 'I love you!' */            // 194a
166   "1a.wav",   /* 'See you again!' */         // 194a
162   "16",   /* 'Very good!' */            // 194a
163   "17",   /* 'Wonderful!' */            // 194a
164   "18",   /* 'Come on!' */            // 194a
165   "19",   /* 'I love you!' */            // 194a
166   "1a",   /* 'See you again!' */         // 194a
167167   0
168168};
169169
src/mame/drivers/meadows.c
r14347r14348
611611static const char *const bowl3d_sample_names[] =
612612{
613613   "*bowl3d",
614   "roll.wav",     /* "roll" */
615   "rollback.wav", /* "roll back" */
616   "sweep.wav",    /* "sweep" */
617   "footstep.wav", /* "foot sweep" */
618   "crash.wav",    /* "crash" */
619   "cheering.wav", /* "cheering" */
614   "roll",     /* "roll" */
615   "rollback", /* "roll back" */
616   "sweep",    /* "sweep" */
617   "footstep", /* "foot sweep" */
618   "crash",    /* "crash" */
619   "cheering", /* "cheering" */
620620    0
621621};
622622
src/mame/drivers/xmen.c
r14347r14348
616616   ROM_LOAD( "xmen_eba.nv", 0x0000, 0x0080, CRC(37f8e77a) SHA1(0b92caba33486c6fd104806aa96f735743bb2221) )
617617ROM_END
618618
619
620ROM_START( xmena )
621   ROM_REGION( 0x100000, "maincpu", 0 )
622   ROM_LOAD16_BYTE( "065-ada.10d",  0x00000, 0x20000, CRC(b8276624) SHA1(5b601393faa4bf578d84b590eb2360ad400368a5) ) /* Asia 4 Player version */
623   ROM_LOAD16_BYTE( "065-ada.10f",  0x00001, 0x20000, CRC(c68582ad) SHA1(d2ca23cc0ad08e7f3d5c533f6fe43d4c215c114e) )
624   ROM_LOAD16_BYTE( "065-a02.9d",     0x80000, 0x40000, CRC(b31dc44c) SHA1(4bdac05826b4d6d4fe46686ede5190e2f73eefc5) )
625   ROM_LOAD16_BYTE( "065-a03.9f",     0x80001, 0x40000, CRC(13842fe6) SHA1(b61f094eb94336edb8708d3437ead9b853b2d6e6) )
626
627   ROM_REGION( 0x30000, "audiocpu", 0 )      /* 64k+128k for sound cpu */
628   ROM_LOAD( "065-a01.6f",   0x00000, 0x20000, CRC(147d3a4d) SHA1(a14409fe991e803b9e7812303e3a9ebd857d8b01) )
629   ROM_RELOAD(               0x10000, 0x20000 )
630
631   ROM_REGION( 0x200000, "gfx1", 0 )   /* graphics (addressable by the main CPU) */
632   ROM_LOAD( "065-a08.15l",   0x000000, 0x100000, CRC(6b649aca) SHA1(2595f314517738e8614facf578cc951a6c36a180) )   /* tiles */
633   ROM_LOAD( "065-a07.16l",   0x100000, 0x100000, CRC(c5dc8fc4) SHA1(9887cb002c8b72be7ce933cb397f00cdc5506c8c) )
634
635   ROM_REGION( 0x400000, "gfx2", 0 )   /* graphics (addressable by the main CPU) */
636   ROM_LOAD( "065-a09.2h",  0x000000, 0x100000, CRC(ea05d52f) SHA1(7f2c14f907355856fb94e3a67b73aa1919776835) )   /* sprites */
637   ROM_LOAD( "065-a10.2l",  0x100000, 0x100000, CRC(96b91802) SHA1(641943557b59b91f0edd49ec8a73cef7d9268b32) )
638   ROM_LOAD( "065-a12.1h",  0x200000, 0x100000, CRC(321ed07a) SHA1(5b00ed676daeea974bdce6701667cfe573099dad) )
639   ROM_LOAD( "065-a11.1l",  0x300000, 0x100000, CRC(46da948e) SHA1(168ac9178ee5bad5931557fb549e1237971d7839) )
640
641   ROM_REGION( 0x200000, "k054539", 0 )   /* samples for the 054539 */
642   ROM_LOAD( "065-a06.1f",  0x000000, 0x200000, CRC(5adbcee0) SHA1(435feda697193bc51db80eba46be474cbbc1de4b) )
643
644   ROM_REGION16_BE( 0x80, "eeprom", 0 )
645   ROM_LOAD( "xmen_ada.nv", 0x0000, 0x0080, CRC(a77a3891) SHA1(84ec257790d5c1859ffcbc9371a72ea99d7f8928) )
646ROM_END
647
619648ROM_START( xmen2pe )
620649   ROM_REGION( 0x100000, "maincpu", 0 )
621650   ROM_LOAD16_BYTE( "065-eaa04.10d",  0x00000, 0x20000, CRC(502861e7) SHA1(f96aab2d2006703065de5bd7e341f929d04f5f60) ) /* Europe 2 Player version */
r14347r14348
811840   ROM_LOAD( "xmen_ucb.nv", 0x0000, 0x0080, CRC(f3d0f682) SHA1(b0d4655c651238ae028ffb59a704acba798f93f8) )
812841ROM_END
813842
814GAME( 1992, xmen,    0,    xmen,   xmen,    0,   ROT0, "Konami", "X-Men (4 Players ver UBB)", GAME_SUPPORTS_SAVE ) /* Second "version" letter denotes players, A=2 players, B=4 players, C=6 players ??? */
843GAME( 1992, xmen,    0,    xmen,   xmen,    0,   ROT0, "Konami", "X-Men (4 Players ver UBB)", GAME_SUPPORTS_SAVE ) /* Second "version" letter denotes players, A=2 players, D/B=4 players, C=6 players ??? */
815844GAME( 1992, xmenj,   xmen, xmen,   xmen,    0,   ROT0, "Konami", "X-Men (4 Players ver JBA)", GAME_SUPPORTS_SAVE )
816845GAME( 1992, xmene,   xmen, xmen,   xmen,    0,   ROT0, "Konami", "X-Men (4 Players ver EBA)", GAME_SUPPORTS_SAVE )
846GAME( 1992, xmena,   xmen, xmen,   xmen,    0,   ROT0, "Konami", "X-Men (4 Players ver ADA)", GAME_SUPPORTS_SAVE )
817847GAME( 1992, xmen2pe, xmen, xmen,   xmen2p,  0,   ROT0, "Konami", "X-Men (2 Players ver EAA)", GAME_SUPPORTS_SAVE )
818848GAME( 1992, xmen2pa, xmen, xmen,   xmen2p,  0,   ROT0, "Konami", "X-Men (2 Players ver AAA)", GAME_SUPPORTS_SAVE )
819849GAME( 1992, xmen2pj, xmen, xmen,   xmen2p,  0,   ROT0, "Konami", "X-Men (2 Players ver JAA)", GAME_SUPPORTS_SAVE )
src/mame/drivers/safarir.c
r14347r14348
274274static const char *const safarir_sample_names[] =
275275{
276276   "*safarir",
277   "sound1-1.wav",
278   "sound1-2.wav",
279   "sound2.wav",
280   "sound3.wav",
281   "sound4-1.wav",
282   "sound4-2.wav",
283   "sound5-1.wav",
284   "sound5-2.wav",
285   "sound6.wav",
286   "sound7.wav",
287   "sound8.wav",
277   "sound1-1",
278   "sound1-2",
279   "sound2",
280   "sound3",
281   "sound4-1",
282   "sound4-2",
283   "sound5-1",
284   "sound5-2",
285   "sound6",
286   "sound7",
287   "sound8",
288288   0
289289};
290290
src/mame/drivers/equites.c
r14347r14348
11421142static const char *const alphamc07_sample_names[] =
11431143{
11441144   "*alphamc07",
1145   "bongo1.wav",
1146   "bongo2.wav",
1147   "bongo3.wav",
1145   "bongo1",
1146   "bongo2",
1147   "bongo3",
11481148   0
11491149};
11501150
src/mame/drivers/tankbatt.c
r14347r14348
272272static const char *const tankbatt_sample_names[] =
273273{
274274   "*tankbatt",
275   "fire.wav",
276   "engine1.wav",
277   "engine2.wav",
278   "explode1.wav",
275   "fire",
276   "engine1",
277   "engine2",
278   "explode1",
279279    0   /* end of array */
280280};
281281
src/mame/drivers/m10.c
r14347r14348
807807static const char *const m10_sample_names[] =
808808{
809809   "*ipminvad",
810   "1.wav",      /* shot/missle */
811   "2.wav",      /* base hit/explosion */
812   "3.wav",      /* invader hit */
813   "4.wav",      /* fleet move 1 */
814   "5.wav",      /* fleet move 2 */
815   "6.wav",      /* fleet move 3 */
816   "7.wav",      /* fleet move 4 */
817   "8.wav",      /* UFO/saucer hit */
818   "9.wav",      /* bonus base */
819   "0.wav",      /* UFO sound */
810   "1",      /* shot/missle */
811   "2",      /* base hit/explosion */
812   "3",      /* invader hit */
813   "4",      /* fleet move 1 */
814   "5",      /* fleet move 2 */
815   "6",      /* fleet move 3 */
816   "7",      /* fleet move 4 */
817   "8",      /* UFO/saucer hit */
818   "9",      /* bonus base */
819   "0",      /* UFO sound */
820820   0
821821};
822822
src/emu/debug/debugcpu.c
r14347r14348
11471147
11481148static device_t *expression_get_device(running_machine &machine, const char *tag)
11491149{
1150   device_iterator iter(machine.root_device());
1151   for (device_t *device = iter.first(); device != NULL; device = iter.next())
1152      if (mame_stricmp(device->tag(), tag) == 0)
1153         return device;
1154
1155   return NULL;
1150   // convert to lowercase then lookup the name (tags are enforced to be all lower case)
1151   astring fullname(tag);
1152   fullname.makelower();
1153   return machine.device(fullname);
11561154}
11571155
11581156
src/emu/cpu/e132xs/32xsdasm.c
r14347r14348
16431643            break;
16441644
16451645         default:
1646            sprintf(buffer, "Ext. OP $%x", extended_op);
1647            logerror(buffer, "Illegal Extended Opcode: %x\n", extended_op);
1646            sprintf(buffer, "Ext. OP $%X @ %X\n", extended_op, pc);
1647            logerror(buffer, "Illegal Extended Opcode: %X @ %X\n", extended_op, pc);
16481648            break;
16491649         }
16501650
src/emu/video/tms9928a.c
r14347r14348
274274
275275void tms9928a_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
276276{
277   int vpos = m_screen->vpos();
277   int raw_vpos = m_screen->vpos();
278   int vpos = raw_vpos * m_vertical_size / m_screen->height();
278279   UINT16 BackColour = m_Regs[7] & 15;
279280   UINT16 *p = &m_tmpbmp.pix16(vpos);
280281
r14347r14348
567568   }
568569
569570   /* Schedule next callback */
570   m_line_timer->adjust( m_screen->time_until_pos( ( vpos + 1 ) % m_screen->height() , 0 ) );
571   m_line_timer->adjust( m_screen->time_until_pos( ( raw_vpos + 1 ) % m_screen->height() , 0 ) );
571572}
572573
573574
r14347r14348
602603   assert( m_screen != NULL );
603604
604605   m_top_border = m_50hz ? TMS9928A_VERT_DISPLAY_START_PAL : TMS9928A_VERT_DISPLAY_START_NTSC;
606   m_vertical_size = m_50hz ? TMS9928A_TOTAL_VERT_PAL : TMS9928A_TOTAL_VERT_NTSC;
605607
606608   m_irq_changed.resolve( m_out_int_line, *this );
607609
src/emu/video/tms9928a.h
r14347r14348
153153
154154   /* emulation settings */
155155   int         m_top_border;
156   int         m_vertical_size;
156157};
157158
158159
src/emu/tilemap.c
r14347r14348
11841184         x_end = MIN(x_end, x2);
11851185
11861186         // if we're rendering something, compute the pointers
1187         const rgb_t *clut = (dest.palette() != NULL) ? palette_entry_list_raw(dest.palette()) : machine().pens;
11871188         if (prev_trans != WHOLLY_TRANSPARENT)
11881189         {
11891190            const UINT16 *source0 = source_baseaddr + x_start;
r14347r14348
12001201                  else if (sizeof(*dest0) == 2)
12011202                     scanline_draw_opaque_ind16(reinterpret_cast<UINT16 *>(dest0), source0, x_end - x_start, pmap0, blit.tilemap_priority_code);
12021203                  else if (sizeof(*dest0) == 4 && blit.alpha >= 0xff)
1203                     scanline_draw_opaque_rgb32(reinterpret_cast<UINT32 *>(dest0), source0, x_end - x_start, machine().pens, pmap0, blit.tilemap_priority_code);
1204                     scanline_draw_opaque_rgb32(reinterpret_cast<UINT32 *>(dest0), source0, x_end - x_start, clut, pmap0, blit.tilemap_priority_code);
12041205                  else if (sizeof(*dest0) == 4)
1205                     scanline_draw_opaque_rgb32_alpha(reinterpret_cast<UINT32 *>(dest0), source0, x_end - x_start, machine().pens, pmap0, blit.tilemap_priority_code, blit.alpha);
1206                     scanline_draw_opaque_rgb32_alpha(reinterpret_cast<UINT32 *>(dest0), source0, x_end - x_start, clut, pmap0, blit.tilemap_priority_code, blit.alpha);
12061207
12071208                  dest0 += dest_rowpixels;
12081209                  source0 += m_pixmap.rowpixels();
r14347r14348
12211222                  else if (sizeof(*dest0) == 2)
12221223                     scanline_draw_masked_ind16(reinterpret_cast<UINT16 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, pmap0, blit.tilemap_priority_code);
12231224                  else if (sizeof(*dest0) == 4 && blit.alpha >= 0xff)
1224                     scanline_draw_masked_rgb32(reinterpret_cast<UINT32 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, machine().pens, pmap0, blit.tilemap_priority_code);
1225                     scanline_draw_masked_rgb32(reinterpret_cast<UINT32 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, clut, pmap0, blit.tilemap_priority_code);
12251226                  else if (sizeof(*dest0) == 4)
1226                     scanline_draw_masked_rgb32_alpha(reinterpret_cast<UINT32 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, machine().pens, pmap0, blit.tilemap_priority_code, blit.alpha);
1227                     scanline_draw_masked_rgb32_alpha(reinterpret_cast<UINT32 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, clut, pmap0, blit.tilemap_priority_code, blit.alpha);
12271228
12281229                  dest0 += dest_rowpixels;
12291230                  source0 += m_pixmap.rowpixels();
r14347r14348
12771278      UINT32 startx, UINT32 starty, int incxx, int incxy, int incyx, int incyy, bool wraparound)
12781279{
12791280   // pre-cache all the inner loop values
1280   const pen_t *clut = &machine().pens[blit.tilemap_priority_code >> 16];
1281   const rgb_t *clut = ((destbitmap.palette() != NULL) ? palette_entry_list_raw(destbitmap.palette()) : machine().pens) + (blit.tilemap_priority_code >> 16);
12811282   bitmap_ind8 &priority_bitmap = machine().priority_bitmap;
12821283   const int xmask = m_pixmap.width() - 1;
12831284   const int ymask = m_pixmap.height() - 1;
src/emu/tilemap.h
r14347r14348
571571
572572   // scroll information
573573   UINT32                  m_scrollrows;         // number of independently scrolled rows
574   UINT32                  m_scrollcols;         // number of independently scrolled colums
574   UINT32                  m_scrollcols;         // number of independently scrolled columns
575575   INT32 *                  m_rowscroll;         // array of rowscroll values
576576   INT32 *                  m_colscroll;         // array of colscroll values
577577   INT32                  m_dx;               // global horizontal scroll offset
src/emu/rendlay.c
r14347r14348
19141914   // if configured to an input, fetch the input value
19151915   else if (m_input_tag[0] != 0)
19161916   {
1917      const input_field_config *field = input_field_by_tag_and_mask(m_element->machine().m_portlist, m_input_tag, m_input_mask);
1917      const input_field_config *field = input_field_by_tag_and_mask(m_element->machine(), m_input_tag, m_input_mask);
19181918      if (field != NULL)
19191919         state = ((input_port_read_safe(m_element->machine(), m_input_tag, 0) ^ field->defvalue) & m_input_mask) ? 1 : 0;
19201920   }
src/emu/sound/samples.c
r14347r14348
1/* samples.c
2 
3 Playback of pre-recorded samples. Used for high-level simulation of discrete sound circuits
4 where proper low-level simulation isn't available.  Also used for tape loops and similar.
5
6 Current limitations
7  - Only supports single channel samples!
8
9 Considerations
10  - Maybe this should be part of the presentation layer (artwork etc.) with samples specified
11    in .lay files instead of in drivers?
12
13*/
14
15
116#include "emu.h"
217#include "emuopts.h"
318#include "samples.h"
r14347r14348
6883{
6984
7085   flac_reader* flacrd =  ((flac_reader*)client_data);
71   //printf("Metadata callback\n");
72   //printf("metadata->type == %d\n", metadata->type);
7386
7487   if (metadata->type==0)
7588   {
7689      const FLAC__StreamMetadata_StreamInfo *streaminfo = &(metadata->data.stream_info);
7790
78      //printf("streaminfo channels %d, sample_rate %d total %d\n", streaminfo->channels, streaminfo->sample_rate, streaminfo->total_samples);
79
8091      flacrd->sample_rate = streaminfo->sample_rate;
8192      flacrd->channels = streaminfo->channels;
8293      flacrd->bits_per_sample = streaminfo->bits_per_sample;
r14347r14348
91102{
92103   flac_reader* flacrd =  ((flac_reader*)client_data);
93104
94   //printf("read in length %d\n", flacrd->length);
95105   if(*bytes > 0)
96106   {
97107      if (*bytes <=  flacrd->length)
r14347r14348
126136
127137FLAC__StreamDecoderWriteStatus my_write_callback(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *client_data)
128138{
129   //printf("my_write_callback\n");
130   //printf("array size %d\n",frame->header.blocksize);
131
132139   flac_reader* flacrd =  ((flac_reader*)client_data);
133140
134141   flacrd->decoded_size += frame->header.blocksize;
135   //printf("total array size %d\n",flacrd->decoded_size);
136142
137143   for (int i=0;i<frame->header.blocksize;i++)
138144   {
r14347r14348
153159    read_wav_sample - read a WAV file as a sample
154160-------------------------------------------------*/
155161
156static int read_wav_sample(running_machine &machine, emu_file &file, loaded_sample *sample)
162static int read_wav_sample(running_machine &machine, emu_file &file, loaded_sample *sample, char* filename)
157163{
158164   unsigned long offset = 0;
159165   UINT32 length, rate, filesize;
r14347r14348
165171   /* read the core header and make sure it's a WAVE file */
166172   offset += file.read(buf, 4);
167173   if (offset < 4)
174   {
175      mame_printf_warning("unable to read %s, 0-byte file?\n", filename);
168176      return 0;
177   }
169178   if (memcmp(&buf[0], "RIFF", 4) == 0)
170179      type = 1;
171180   else if (memcmp(&buf[0], "fLaC", 4) == 0)
172181      type = 2;
173182   else
183   {
184      mame_printf_warning("unable to read %s, corrupt file?\n", filename);
174185      return 0;
186   }
175187
176188   if (type==1)
177189   {
r14347r14348
322334      if (FLAC__stream_decoder_process_until_end_of_metadata(decoder) != FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM)
323335         fatalerror("Fail FLAC__stream_decoder_process_until_end_of_metadata\n");
324336
325      //printf("got metadata?\n");
326
327337      if (flacread.channels != 1) // only Mono supported
328         return 0;
338         fatalerror("Only MONO samples are supported\n");
329339
330      int size = flacread.total_samples * (flacread.bits_per_sample/8);
331340
332      sample->data = auto_alloc_array(machine, INT16, size);
341      sample->data = auto_alloc_array(machine, INT16, flacread.total_samples*2);
333342      flacread.write_position = 0;
334343      flacread.write_data = sample->data;
335344
336345      if (FLAC__stream_decoder_process_until_end_of_stream (decoder) != FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM)
346      {
337347         fatalerror("Fail FLAC__stream_decoder_process_until_end_of_stream\n");
348      }
338349
339350      if (FLAC__stream_decoder_finish (decoder) != true)
340351         fatalerror("Fail FLAC__stream_decoder_finish\n");
r14347r14348
344355      /* fill in the sample data */
345356
346357      sample->frequency = flacread.sample_rate;
347      sample->length = size;
358      sample->length = flacread.total_samples * (flacread.bits_per_sample/8);
348359
349360      if (flacread.bits_per_sample == 8)
350361      {
r14347r14348
395406      if (samplenames[i+skipfirst][0])
396407      {
397408         emu_file file(machine.options().sample_path(), OPEN_FLAG_READ);
409         file_error filerr = FILERR_NOT_FOUND;
398410
399         file_error filerr = file.open(basename, PATH_SEPARATOR, samplenames[i+skipfirst]);
400         if (filerr != FILERR_NONE && skipfirst)
401            filerr = file.open(samplenames[0] + 1, PATH_SEPARATOR, samplenames[i+skipfirst]);
411         char filename[512];
402412
413         if (filerr != FILERR_NONE)
414         {
415            // first try opening samples as .flac
416            sprintf(filename, "%s.flac", samplenames[i+skipfirst]);
417
418            filerr = file.open(basename, PATH_SEPARATOR, filename);
419            // try parent sample set
420            if (filerr != FILERR_NONE && skipfirst)
421               filerr = file.open(samplenames[0] + 1, PATH_SEPARATOR, filename);
422         }
423
424         if (filerr != FILERR_NONE)
425         {
426            // .wav fallback
427            sprintf(filename, "%s.wav", samplenames[i+skipfirst]);
428
429            filerr = file.open(basename, PATH_SEPARATOR, filename);
430            // try parent sample set
431            if (filerr != FILERR_NONE && skipfirst)
432               filerr = file.open(samplenames[0] + 1, PATH_SEPARATOR, filename);
433         }
434
435
403436         if (filerr == FILERR_NONE)
404            read_wav_sample(machine, file, &samples->sample[i]);
437            read_wav_sample(machine, file, &samples->sample[i], filename);
438
439         if (filerr == FILERR_NOT_FOUND)
440            mame_printf_warning("sample '%s' NOT FOUND\n", samplenames[i+skipfirst]);
441
405442      }
406443
407444   return samples;
src/emu/ioport.c
r14347r14348
973973    mask on the tagged port
974974-------------------------------------------------*/
975975
976const input_field_config *input_field_by_tag_and_mask(const ioport_list &portlist, const char *tag, input_port_value mask)
976const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask)
977977{
978   const input_port_config *port = portlist.find(tag);
978   const input_port_config *port = machine.port(tag);
979979
980980   /* if we got the port, look for the field */
981981   if (port != NULL)
r14347r14348
24322432      input_port_value mask;
24332433      float x, y;
24342434      if (mouse_target->map_point_input(mouse_target_x, mouse_target_y, tag, mask, x, y))
2435         mouse_field = input_field_by_tag_and_mask(machine.m_portlist, tag, mask);
2435         mouse_field = input_field_by_tag_and_mask(machine, tag, mask);
24362436   }
24372437
24382438   /* loop over all input ports */
src/emu/ioport.h
r14347r14348
12531253void input_port_list_init(device_t &device, ioport_list &portlist, astring &errorbuf);
12541254
12551255/* return the field that matches the given tag and mask */
1256const input_field_config *input_field_by_tag_and_mask(const ioport_list &portlist, const char *tag, input_port_value mask);
1256const input_field_config *input_field_by_tag_and_mask(running_machine &machine, const char *tag, input_port_value mask);
12571257
12581258
12591259
src/emu/uigfx.c
r14347r14348
10391039
10401040      /* allocate new stuff */
10411041      state->bitmap = global_alloc(bitmap_rgb32(width, height));
1042      state->bitmap->set_palette(machine.palette);
10421043      state->texture = machine.render().texture_alloc();
10431044      state->texture->set_bitmap(*state->bitmap, state->bitmap->cliprect(), TEXFORMAT_RGB32);
10441045
src/emu/audit.c
r14347r14348
264264            astring curpath;
265265            while (path.next(curpath, intf->samplenames[sampnum]))
266266            {
267               // attempt to access the file
268               file_error filerr = file.open(curpath);
267               astring wholepath;
268               wholepath = curpath + ".flac";
269
270               // attempt to access the file (.flac)
271               file_error filerr = file.open(wholepath);
272
273               if (filerr != FILERR_NONE)
274               {
275                  wholepath = curpath + ".wav";
276                  // try again with .wav
277                  filerr = file.open(wholepath);
278               }
279
269280               if (filerr == FILERR_NONE)
270281               {
271282                  record.set_status(audit_record::STATUS_GOOD, audit_record::SUBSTATUS_GOOD);
src/emu/machine/msm6242.c
r14347r14348
22
33    MSM6242 Real Time Clock
44
5    Note:
6    - this RTC has a y2k bug
7
85    TODO:
96    - HOLD mechanism
107    - IRQ ACK
8   - why skns tries to read uninitialized registers?
119
1210***************************************************************************/
1311
r14347r14348
150148   m_irq_flag = 0;
151149   m_irq_type = 0;
152150
151   /* TODO: skns writes 0x4 to D then expects E == 6 and F == 4, perhaps those are actually saved in the RTC CMOS? */
153152   m_reg[0] = 0;
154   m_reg[1] = 0;
155   m_reg[2] = 0;
153   m_reg[1] = 0x6;
154   m_reg[2] = 0x4;
156155}
157156
158157
src/emu/drawgfx.c
r14347r14348
18201820/*-------------------------------------------------
18211821    copyscrollbitmap - copy from one bitmap to
18221822    another, copying all unclipped pixels, and
1823    applying scrolling to one or more rows/colums
1823    applying scrolling to one or more rows/columns
18241824-------------------------------------------------*/
18251825
18261826void copyscrollbitmap(bitmap_ind16 &dest, bitmap_ind16 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect)
r14347r14348
18421842    copyscrollbitmap_trans - copy from one bitmap
18431843    to another, copying all unclipped pixels
18441844    except those that match transpen, and applying
1845    scrolling to one or more rows/colums
1845    scrolling to one or more rows/columns
18461846-------------------------------------------------*/
18471847
18481848template<class _BitmapClass>
src/emu/drawgfx.h
r14347r14348
313313  scrolls as a whole in at least one direction.
314314*/
315315
316/* copy from one bitmap to another, copying all unclipped pixels, and applying scrolling to one or more rows/colums */
316/* copy from one bitmap to another, copying all unclipped pixels, and applying scrolling to one or more rows/columns */
317317void copyscrollbitmap(bitmap_ind16 &dest, bitmap_ind16 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
318318void copyscrollbitmap(bitmap_rgb32 &dest, bitmap_rgb32 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect);
319319
320/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen, and applying scrolling to one or more rows/colums */
320/* copy from one bitmap to another, copying all unclipped pixels except those that match transpen, and applying scrolling to one or more rows/columns */
321321void copyscrollbitmap_trans(bitmap_ind16 &dest, bitmap_ind16 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
322322void copyscrollbitmap_trans(bitmap_rgb32 &dest, bitmap_rgb32 &src, UINT32 numrows, const INT32 *rowscroll, UINT32 numcols, const INT32 *colscroll, const rectangle &cliprect, UINT32 transpen);
323323

Previous 15994 Revisions Next


© 1998-2018 The MESS Team