Previous 199869 Revisions Next

r17908 Saturday 15th September, 2012 at 21:47:30 UTC by Aaron Giles
First pass at modernizing struct definitions.
[src/build]png2bdc.c verinfo.c
[src/emu]config.c crsshair.c crsshair.h debugger.c emupal.c fileio.h hashfile.c ioport.h machine.h output.c render.h romload.c ui.h uigfx.c uiinput.c uiinput.h
[src/emu/cpu]x86log.c
[src/emu/cpu/alph8201]alph8201.c
[src/emu/cpu/apexc]apexc.c
[src/emu/cpu/avr8]avr8.c
[src/emu/cpu/ccpu]ccpu.c ccpu.h
[src/emu/cpu/cop400]cop400.c cop400.h
[src/emu/cpu/cp1610]cp1610.c
[src/emu/cpu/cubeqcpu]cubeqcpu.h
[src/emu/cpu/e132xs]e132xs.c
[src/emu/cpu/esrip]esrip.h
[src/emu/cpu/g65816]g65816cm.h
[src/emu/cpu/h83002]h8priv.h
[src/emu/cpu/hd6309]hd6309.c
[src/emu/cpu/i386]i386priv.h
[src/emu/cpu/i4004]i4004.c
[src/emu/cpu/i8085]i8085.c i8085.h
[src/emu/cpu/i86]i286.c i86.c i86.h
[src/emu/cpu/i960]i960.c i960dis.h
[src/emu/cpu/jaguar]jaguar.c jaguar.h
[src/emu/cpu/konami]konami.c
[src/emu/cpu/lh5801]lh5801.c lh5801.h
[src/emu/cpu/m37710]m37710cm.h
[src/emu/cpu/m6502]m6502.h
[src/emu/cpu/m6800]m6800.c m6800.h
[src/emu/cpu/m6809]m6809.c m6809.h
[src/emu/cpu/mb86233]mb86233.c mb86233.h
[src/emu/cpu/mb88xx]mb88xx.c mb88xx.h
[src/emu/cpu/mc68hc11]hc11ops.h mc68hc11.c mc68hc11.h
[src/emu/cpu/mcs48]mcs48.c
[src/emu/cpu/mcs51]mcs51.c mcs51.h
[src/emu/cpu/mips]mips3.h mips3com.h mips3drc.c r3000.c r3000.h
[src/emu/cpu/mn10200]mn10200.c
[src/emu/cpu/nec]nec.h necdasm.c necpriv.h v25priv.h
[src/emu/cpu/pdp1]pdp1.c pdp1.h tx0.c tx0.h
[src/emu/cpu/pic16c5x]pic16c5x.c
[src/emu/cpu/pic16c62x]pic16c62x.c
[src/emu/cpu/powerpc]ppc.h ppccom.h ppcdrc.c
[src/emu/cpu/pps4]pps4.c
[src/emu/cpu/psx]dma.h rcnt.h sio.h
[src/emu/cpu/rsp]rsp.h rspdrc.c
[src/emu/cpu/s2650]s2650.c
[src/emu/cpu/saturn]saturn.c saturn.h
[src/emu/cpu/sc61860]sc61860.c sc61860.h
[src/emu/cpu/scmp]scmp.c scmp.h
[src/emu/cpu/se3208]se3208.c
[src/emu/cpu/sh2]sh2.h sh2comn.h sh2drc.c
[src/emu/cpu/sm8500]sm8500.c
[src/emu/cpu/ssem]ssem.c
[src/emu/cpu/ssp1601]ssp1601.c
[src/emu/cpu/superfx]superfx.c superfx.h
[src/emu/cpu/t11]t11.c
[src/emu/cpu/tlcs900]tlcs900.c tlcs900.h
[src/emu/cpu/tms0980]tms0980.c tms0980.h
[src/emu/cpu/tms32010]tms32010.c
[src/emu/cpu/tms32025]tms32025.c
[src/emu/cpu/tms32051]tms32051.c
[src/emu/cpu/tms34010]tms34010.c tms34010.h
[src/emu/cpu/unsp]unsp.h
[src/emu/cpu/upd7810]upd7810.c
[src/emu/cpu/v30mz]v30mz.h
[src/emu/cpu/v60]v60.c
[src/emu/cpu/v810]v810.c
[src/emu/cpu/z180]z180.c
[src/emu/cpu/z8]z8.c
[src/emu/cpu/z80]z80.c
[src/emu/debug]debugcmd.c debugcon.c debugcpu.c debugcpu.h debughlp.c
[src/emu/debugint]debugint.c
[src/emu/imagedev]bitbngr.c bitbngr.h flopdrv.c
[src/emu/machine]6525tpi.c 6525tpi.h 68681.h 74148.c 74148.h 74153.c 74153.h adc083x.c adc083x.h adc1038.c adc1038.h adc1213x.c adc1213x.h generic.c idectrl.c idectrl.h k053252.c k053252.h latch8.c latch8.h mb14241.c mb87078.c mb87078.h msm6242.h pd4990a.c pit8253.c rp5h01.c s3c2400.h s3c2410.h s3c2440.h smc91c9x.c smc91c9x.h tms6100.c upd4701.c wd17xx.c wd17xx.h
[src/emu/sound]2151intf.c 2151intf.h 2203intf.c 2203intf.h 2413intf.c 2608intf.c 2608intf.h 2610intf.c 2610intf.h 2612intf.c 2612intf.h 262intf.c 262intf.h 3526intf.c 3526intf.h 3812intf.c 3812intf.h 8950intf.c 8950intf.h aica.h astrocde.c ay8910.c ay8910.h beep.c c140.c c140.h c6280.h cdda.c cem3394.c cem3394.h discrete.h dmadac.c es5506.c es5506.h es8712.c filter.h flt_rc.c flt_rc.h flt_vol.c fm.h gaelco.c gaelco.h hc55516.c iremga20.c k005289.c k007232.h k051649.c k053260.c k053260.h k056800.c k056800.h msm5205.c msm5205.h msm5232.h n63701x.c namco.c namco.h nes_apu.c nes_apu.h nile.c okim6258.c okim6258.h okim6376.c pokey.h qsound.c rf5c400.c rf5c68.c rf5c68.h s2636.c saa1099.c scsp.c scsp.h segapcm.c segapcm.h sid6581.h sn76477.c sn76477.h sn76496.c snkwave.c sp0250.c sp0256.c sp0256.h speaker.c speaker.h st0016.c st0016.h t6w28.c tiaintf.c tms3615.c tms36xx.c tms36xx.h tms5110.c tms5110.h tms5220.c tms5220.h upd7759.c upd7759.h vlm5030.c vlm5030.h vrender0.c vrender0.h x1_010.c x1_010.h ymf271.h ymf278b.h ymz280b.c ymz280b.h zsg2.c zsg2.h
[src/emu/video]315_5124.h hd63484.c hd63484.h huc6202.h huc6260.h huc6261.h huc6270.h i8275.c i8275.h mc6845.h poly.c poly.h psx.h resnet.h s2636.c s2636.h tlc34076.c tlc34076.h tms9927.c tms9927.h tms9928a.h vector.c vooddefs.h voodoo.h
[src/lib/util]aviio.c aviio.h cdrom.h corefile.c jedparse.c jedparse.h opresolv.h palette.c png.c png.h pool.c un7z.h unzip.h vbiparse.h xmlfile.c xmlfile.h
[src/mame/audio]amiga.c beezer.c cps3.c dcs.c exidy.c flower.c geebee.c gomoku.c hyprolyb.c irem.c leland.c m72.c micro3d.c namco52.c namco52.h namco54.c namco54.h phoenix.c pleiads.c polepos.c redbaron.c segasnd.c seibu.c seibu.h snes_snd.c snk6502.c taitosnd.c taitosnd.h tiamc1.c timeplt.c trackfld.c tx1.c warpwarp.c wiping.c
[src/mame/drivers]atarisy4.c mediagx.c mjkjidai.c renegade.c seattle.c
[src/mame/includes]amiga.h lordgun.h m107.h megadriv.h seta.h
[src/mame/machine]atarigen.h buggychl.c decocass.c fddebug.c gaelco3d.c gaelco3d.h mathbox.c md_cart.c namco06.c namco06.h namco50.c namco51.c namco51.h namco53.c namco53.h namco62.c namco62.h namcoio.c namcoio.h nmk112.c nmk112.h steppers.h taitoio.c taitoio.h
[src/mame/video]atarimo.h avgdvg.c bfm_dm01.h deco16ic.c deco16ic.h decocomn.c decocomn.h galastrm.c gtia.h gticlub.c hng64.c kan_pand.c kan_pand.h konicdev.c konicdev.h mcd212.h midzeus.c midzeus2.c model2.c model3.c namcos22.c taitoic.c taitoic.h turbo.c vrender0.c vrender0.h
[src/mess/audio]channelf.c dave.c dave.h gb.c gmaster.c lynx.c mac.c mea8000.h special.c svision.c t6721.c upd1771.c upd1771.h vc4000.c
[src/mess/drivers]gba.c pasogo.c pcfx.c supracan.c vboy.c
[src/mess/formats]cbm_crt.h studio2_st2.c
[src/mess/includes]apple2.h c64_legacy.h mc68328.h
[src/mess/machine]6883sam.h 990_tap.c 990_tap.h applefdc.c applefdc.h at45dbxx.c ataricrt.c atarifdc.c ay31015.c ay31015.h beta.c cococart.h ds1315.c e05a03.c e05a03.h er59256.c hd63450.c hd63450.h i8271.c isa_gus.h kb_keytro.c keyboard.c keyboard.h kr2376.c kr2376.h mc6843.h mc6846.h mc6854.h micropolis.c micropolis.h mm58274c.c mm58274c.h mos6530.c mos6530.h nes_ines.c nes_pcb.c null_modem.c omti8621.c omti8621.h pc_lpt.c pc_lpt.h pcf8593.c pf10.c pf10.h s3c44b0.h smartmed.h sst39vfx.c sst39vfx.h terminal.c terminal.h tf20.c tf20.h upd71071.c upd71071.h upd765.c
[src/mess/tools/imgtool]filtbas.c imgtool.h library.h
[src/mess/tools/imgtool/modules]amiga.c cybiko.c cybikoxt.c fat.c os9.c pc_hard.c prodos.c
[src/mess/video]apollo.c crt.h crtc_ega.h dl1416.c dl1416.h gime.h k1ge.h mc6847.h newport.c vdc8563.c vdc8563.h vic4567.c vic4567.h vic6567.c vic6567.h vtvideo.c vtvideo.h
[src/osd]osdcore.h
[src/osd/sdl]debugwin.c draw13.c drawogl.c drawsdl.c gl_shader_mgr.h input.c sdlsync_sdl.c sdlsync_tc.c sdlwork.c testkeys.c video.h window.c window.h
[src/osd/windows]d3dcomm.h d3dhlsl.h d3dintf.h drawd3d.h drawdd.c drawgdi.c input.c ledutil.c output.c output.h video.h window.h winwork.c
[src/tools]jedutil.c regrep.c unidasm.c

trunk/src/mame/audio/micro3d.c
r17907r17908
3434   biquad ProtoCoef[2];
3535} lp_filter;
3636
37typedef struct _filter_state filter_state;
38struct _filter_state
37struct filter_state
3938{
4039   double      capval;
4140   double      exponent;
trunk/src/mame/audio/warpwarp.c
r17907r17908
1313#define CLOCK_16H   (18432000/3/2/16)
1414#define CLOCK_1V    (18432000/3/2/384)
1515
16typedef struct _warpwarp_sound_state warpwarp_sound_state;
17struct _warpwarp_sound_state
16struct warpwarp_sound_state
1817{
1918   INT16 *m_decay;
2019   sound_stream *m_channel;
trunk/src/mame/audio/phoenix.c
r17907r17908
6060   INT32 lowpass_polybit;
6161};
6262
63typedef struct _phoenix_sound_state phoenix_sound_state;
64struct _phoenix_sound_state
63struct phoenix_sound_state
6564{
6665   struct c_state      m_c24_state;
6766   struct c_state      m_c25_state;
trunk/src/mame/audio/namco52.c
r17907r17908
4949#include "namco52.h"
5050#include "cpu/mb88xx/mb88xx.h"
5151
52typedef struct _namco_52xx_state namco_52xx_state;
53struct _namco_52xx_state
52struct namco_52xx_state
5453{
5554   device_t *m_cpu;
5655   device_t *m_discrete;
trunk/src/mame/audio/namco52.h
r17907r17908
66#include "devcb.h"
77
88
9typedef struct _namco_52xx_interface namco_52xx_interface;
10struct _namco_52xx_interface
9struct namco_52xx_interface
1110{
1211   const char *   discrete;   /* name of the discrete sound device */
1312   int            firstnode;   /* index of the first node */
trunk/src/mame/audio/segasnd.c
r17907r17908
3838    TYPE DEFINITIONS
3939***************************************************************************/
4040
41typedef struct _filter_state filter_state;
42struct _filter_state
41struct filter_state
4342{
4443   double            capval;            /* current capacitor value */
4544   double            exponent;         /* constant exponent */
4645};
4746
4847
49typedef struct _timer8253_channel timer8253_channel;
50struct _timer8253_channel
48struct timer8253_channel
5149{
5250   UINT8            holding;         /* holding until counts written? */
5351   UINT8            latchmode;         /* latching mode */
r17907r17908
6361};
6462
6563
66typedef struct _timer8253 timer8253;
67struct _timer8253
64struct timer8253
6865{
6966   timer8253_channel   chan[3];         /* three channels' worth of information */
7067   double            env[3];            /* envelope value for each channel */
r17907r17908
7572};
7673
7774
78typedef struct _usb_state usb_state;
79struct _usb_state
75struct usb_state
8076{
8177   sound_stream *      stream;            /* output stream */
8278   device_t *cpu;            /* CPU index of the 8035 */
r17907r17908
10197};
10298
10399/* SP0250-based speech board */
104typedef struct _speech_state speech_state;
105struct _speech_state
100struct speech_state
106101{
107102   UINT8 latch, t0, p2, drq;
108103   UINT8 *speech;
trunk/src/mame/audio/taitosnd.c
r17907r17908
1515#define TC0140SYT_PORT01_FULL_MASTER  (0x04)
1616#define TC0140SYT_PORT23_FULL_MASTER  (0x08)
1717
18typedef struct _tc0140syt_state tc0140syt_state;
19struct _tc0140syt_state
18struct tc0140syt_state
2019{
2120   UINT8     slavedata[4];  /* Data on master->slave port (4 nibbles) */
2221   UINT8     masterdata[4]; /* Data on slave->master port (4 nibbles) */
trunk/src/mame/audio/taitosnd.h
r17907r17908
88    TYPE DEFINITIONS
99***************************************************************************/
1010
11typedef struct _tc0140syt_interface tc0140syt_interface;
12struct _tc0140syt_interface
11struct tc0140syt_interface
1312{
1413   const char         *master;
1514   const char         *slave;
trunk/src/mame/audio/wiping.c
r17907r17908
3232
3333
3434
35typedef struct _wiping_sound_state wiping_sound_state;
36struct _wiping_sound_state
35struct wiping_sound_state
3736{
3837   /* data about the sound system */
3938   sound_channel m_channel_list[MAX_VOICES];
trunk/src/mame/audio/leland.c
r17907r17908
184184   UINT8 writebyte;
185185};
186186
187typedef struct _leland_sound_state leland_sound_state;
188struct _leland_sound_state
187struct leland_sound_state
189188{
190189   /* 1st gen */
191190   UINT8 *m_dac_buffer[2];
trunk/src/mame/audio/gomoku.c
r17907r17908
2929} sound_channel;
3030
3131
32typedef struct _gomoku_sound_state gomoku_sound_state;
33struct _gomoku_sound_state
32struct gomoku_sound_state
3433{
3534   /* data about the sound system */
3635   sound_channel m_channel_list[MAX_VOICES];
trunk/src/mame/audio/seibu.c
r17907r17908
140140   "adpcm2"
141141};
142142
143typedef struct _seibu_adpcm_state seibu_adpcm_state;
144struct _seibu_adpcm_state
143struct seibu_adpcm_state
145144{
146145   oki_adpcm_state m_adpcm;
147146   sound_stream *m_stream;
trunk/src/mame/audio/seibu.h
r17907r17908
9191extern const ym2151_interface seibu_ym2151_interface;
9292extern const ym2203_interface seibu_ym2203_interface;
9393
94typedef struct _seibu_adpcm_interface seibu_adpcm_interface;
95struct _seibu_adpcm_interface
94struct seibu_adpcm_interface
9695{
9796    const char *rom_region;
9897};
trunk/src/mame/audio/tiamc1.c
r17907r17908
5353   struct timer8253chan channel[3];
5454};
5555
56typedef struct _tiamc1_sound_state tiamc1_sound_state;
57struct _tiamc1_sound_state
56struct tiamc1_sound_state
5857{
5958   sound_stream *m_channel;
6059   int m_timer1_divider;
trunk/src/mame/audio/flower.c
r17907r17908
3535} sound_channel;
3636
3737
38typedef struct _flower_sound_state flower_sound_state;
39struct _flower_sound_state
38struct flower_sound_state
4039{
4140   emu_timer *m_effect_timer;
4241
trunk/src/mame/audio/dcs.c
r17907r17908
264264 *
265265 *************************************/
266266
267typedef struct _sdrc_state sdrc_state;
268struct _sdrc_state
267struct sdrc_state
269268{
270269   UINT16      reg[4];
271270   UINT8      seed;
272271};
273272
274273
275typedef struct _dsio_denver_state dsio_state;
276struct _dsio_denver_state
274struct dsio_state
277275{
278276   UINT16      reg[4];
279277   UINT8      start_on_next_write;
r17907r17908
281279};
282280
283281
284typedef struct _hle_transfer_state hle_transfer_state;
285struct _hle_transfer_state
282struct hle_transfer_state
286283{
287284   UINT8      hle_enabled;
288285   INT32      dcs_state;
r17907r17908
298295};
299296
300297
301typedef struct _dcs_state dcs_state;
302struct _dcs_state
298struct dcs_state
303299{
304300   adsp21xx_device *cpu;
305301   address_space *program;
trunk/src/mame/audio/exidy.c
r17907r17908
7373   UINT32   fraction;
7474};
7575
76typedef struct _exidy_sound_state exidy_sound_state;
77struct _exidy_sound_state
76struct exidy_sound_state
7877{
7978   cpu_device *m_maincpu;
8079
trunk/src/mame/audio/cps3.c
r17907r17908
88
99#define CPS3_VOICES      16
1010
11typedef struct _cps3_voice cps3_voice;
12struct _cps3_voice
11struct cps3_voice
1312{
1413   UINT32 regs[8];
1514   UINT32 pos;
1615   UINT16 frac;
1716};
1817
19typedef struct _cps3_sound_state cps3_sound_state;
20struct _cps3_sound_state
18struct cps3_sound_state
2119{
2220   sound_stream *m_stream;
2321   cps3_voice m_voice[CPS3_VOICES];
trunk/src/mame/audio/hyprolyb.c
r17907r17908
33#include "sound/msm5205.h"
44#include "audio/hyprolyb.h"
55
6typedef struct _hyprolyb_adpcm_state hyprolyb_adpcm_state;
7struct _hyprolyb_adpcm_state
6struct hyprolyb_adpcm_state
87{
98   device_t *m_msm;
109   address_space *m_space;
trunk/src/mame/audio/timeplt.c
r17907r17908
1919
2020#define MASTER_CLOCK         XTAL_14_31818MHz
2121
22typedef struct _timeplt_audio_state timeplt_audio_state;
23struct _timeplt_audio_state
22struct timeplt_audio_state
2423{
2524   UINT8    m_last_irq_state;
2625   cpu_device *m_soundcpu;
trunk/src/mame/audio/amiga.c
r17907r17908
4040 *
4141 *************************************/
4242
43typedef struct _audio_channel audio_channel;
44struct _audio_channel
43struct audio_channel
4544{
4645   emu_timer *   irq_timer;
4746   UINT32         curlocation;
r17907r17908
5453};
5554
5655
57typedef struct _amiga_audio amiga_audio;
58struct _amiga_audio
56struct amiga_audio
5957{
6058   audio_channel   channel[4];
6159   sound_stream *   stream;
trunk/src/mame/audio/trackfld.c
r17907r17908
99
1010#define TIMER_RATE (4096/4)
1111
12typedef struct _trackfld_audio_state trackfld_audio_state;
13struct _trackfld_audio_state
12struct trackfld_audio_state
1413{
1514   /* sound-related */
1615   int      m_last_addr;
trunk/src/mame/audio/redbaron.c
r17907r17908
2020
2121#define OUTPUT_RATE      (48000)
2222
23typedef struct _redbaron_sound_state redbaron_sound_state;
24struct _redbaron_sound_state
23struct redbaron_sound_state
2524{
2625   INT16 *m_vol_lookup;
2726
trunk/src/mame/audio/namco54.c
r17907r17908
5151#include "namco54.h"
5252#include "cpu/mb88xx/mb88xx.h"
5353
54typedef struct _namco_54xx_state namco_54xx_state;
55struct _namco_54xx_state
54struct namco_54xx_state
5655{
5756   device_t *m_cpu;
5857   device_t *m_discrete;
trunk/src/mame/audio/snk6502.c
r17907r17908
4141   INT16   form[16];
4242} TONE;
4343
44typedef struct _snk6502_sound_state snk6502_sound_state;
45struct _snk6502_sound_state
44struct snk6502_sound_state
4645{
4746   TONE m_tone_channels[CHANNELS];
4847   INT32 m_tone_clock_expire;
trunk/src/mame/audio/namco54.h
r17907r17908
55#include "sound/discrete.h"
66
77
8typedef struct _namco_54xx_config namco_54xx_config;
9struct _namco_54xx_config
8struct namco_54xx_config
109{
1110   const char *discrete;   /* name of the discrete sound device */
1211   int         firstnode;   /* index of the first node */
trunk/src/mame/audio/tx1.c
r17907r17908
3131   int idx[3];
3232};
3333
34typedef struct _tx1_sound_state tx1_sound_state;
35struct _tx1_sound_state
34struct tx1_sound_state
3635{
3736   sound_stream *m_stream;
3837   UINT32 m_freq_to_step;
trunk/src/mame/audio/irem.c
r17907r17908
1111#include "sound/discrete.h"
1212#include "audio/irem.h"
1313
14typedef struct _irem_audio_state irem_audio_state;
15struct _irem_audio_state
14struct irem_audio_state
1615{
1716   UINT8                m_port1;
1817   UINT8                m_port2;
trunk/src/mame/audio/m72.c
r17907r17908
6767   Z80_CLEAR
6868};
6969
70typedef struct _m72_audio_state m72_audio_state;
71struct _m72_audio_state
70struct m72_audio_state
7271{
7372   UINT8 irqvector;
7473   UINT32 sample_addr;
trunk/src/mame/audio/beezer.c
r17907r17908
9292   } counter;
9393};
9494
95typedef struct _beezer_sound_state beezer_sound_state;
96struct _beezer_sound_state
95struct beezer_sound_state
9796{
9897   cpu_device *m_maincpu;
9998
trunk/src/mame/audio/geebee.c
r17907r17908
1111#include "includes/warpwarp.h"
1212
1313
14typedef struct _geebee_sound_state geebee_sound_state;
15struct _geebee_sound_state
14struct geebee_sound_state
1615{
1716   emu_timer *m_volume_timer;
1817   UINT16 *m_decay;
trunk/src/mame/audio/snes_snd.c
r17907r17908
195195} src_dir_type;
196196
197197
198typedef struct _snes_sound_state  snes_sound_state;
199struct _snes_sound_state
198struct snes_sound_state
200199{
201200   UINT8                   *ram;
202201   sound_stream            *channel;
trunk/src/mame/audio/pleiads.c
r17907r17908
3838   int freq;
3939};
4040
41typedef struct _pleiads_sound_state pleiads_sound_state;
42struct _pleiads_sound_state
41struct pleiads_sound_state
4342{
4443   device_t *m_tms;
4544   sound_stream *m_channel;
trunk/src/mame/audio/polepos.c
r17907r17908
1919#define POLEPOS_R167_SHUNT   1.0/(1.0/POLEPOS_R166 + 1.0/250)
2020#define POLEPOS_R168_SHUNT   1.0/(1.0/POLEPOS_R166 + 1.0/250)
2121
22typedef struct _polepos_sound_state polepos_sound_state;
23struct _polepos_sound_state
22struct polepos_sound_state
2423{
2524   UINT32 m_current_position;
2625   int m_sample_msb;
trunk/src/mame/machine/taitoio.c
r17907r17908
5252/*                                                                         */
5353/***************************************************************************/
5454
55typedef struct _tc0220ioc_state tc0220ioc_state;
56struct _tc0220ioc_state
55struct tc0220ioc_state
5756{
5857   UINT8      regs[8];
5958   UINT8      port;
r17907r17908
210209/*                                                                         */
211210/***************************************************************************/
212211
213typedef struct _tc0510nio_state tc0510nio_state;
214struct _tc0510nio_state
212struct tc0510nio_state
215213{
216214   UINT8   regs[8];
217215
r17907r17908
361359/*                                                                         */
362360/***************************************************************************/
363361
364typedef struct _tc0640fio_state tc0640fio_state;
365struct _tc0640fio_state
362struct tc0640fio_state
366363{
367364   UINT8   regs[8];
368365
trunk/src/mame/machine/taitoio.h
r17907r17908
1515    TYPE DEFINITIONS
1616***************************************************************************/
1717
18typedef struct _tc0220ioc_interface tc0220ioc_interface;
19struct _tc0220ioc_interface
18struct tc0220ioc_interface
2019{
2120   devcb_read8 read_0;
2221   devcb_read8 read_1;
r17907r17908
2625};
2726
2827
29typedef struct _tc0510nio_interface tc0510nio_interface;
30struct _tc0510nio_interface
28struct tc0510nio_interface
3129{
3230   devcb_read8 read_0;
3331   devcb_read8 read_1;
r17907r17908
3735};
3836
3937
40typedef struct _tc0640fio_interface tc0640fio_interface;
41struct _tc0640fio_interface
38struct tc0640fio_interface
4239{
4340   devcb_read8 read_0;
4441   devcb_read8 read_1;
trunk/src/mame/machine/namco06.c
r17907r17908
9393
9494
9595
96typedef struct _namco_06xx_state namco_06xx_state;
97struct _namco_06xx_state
96struct namco_06xx_state
9897{
9998   UINT8 m_control;
10099   emu_timer *m_nmi_timer;
trunk/src/mame/machine/namco06.h
r17907r17908
44#include "devlegcy.h"
55
66
7typedef struct _namco_06xx_config namco_06xx_config;
8struct _namco_06xx_config
7struct namco_06xx_config
98{
109   const char *nmicpu;
1110   const char *chip0;
trunk/src/mame/machine/namcoio.c
r17907r17908
116116#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
117117
118118
119typedef struct _namcoio_state namcoio_state;
120struct _namcoio_state
119struct namcoio_state
121120{
122121   UINT8          ram[16];
123122
trunk/src/mame/machine/namcoio.h
r17907r17908
77    TYPE DEFINITIONS
88***************************************************************************/
99
10typedef struct _namcoio_interface namcoio_interface;
11struct _namcoio_interface
10struct namcoio_interface
1211{
1312   devcb_read8 in[4];
1413   devcb_write8 out[2];
trunk/src/mame/machine/nmk112.c
r17907r17908
1313#define TABLESIZE   0x100
1414#define BANKSIZE    0x10000
1515
16typedef struct _nmk112_state nmk112_state;
17struct _nmk112_state
16struct nmk112_state
1817{
1918   /* which chips have their sample address table divided into pages */
2019   UINT8 page_mask;
trunk/src/mame/machine/nmk112.h
r17907r17908
1313    TYPE DEFINITIONS
1414***************************************************************************/
1515
16typedef struct _nmk112_interface nmk112_interface;
17struct _nmk112_interface
16struct nmk112_interface
1817{
1918   const char *rgn0, *rgn1;
2019   UINT8 disable_page_mask;
trunk/src/mame/machine/namco50.c
r17907r17908
135135#include "cpu/mb88xx/mb88xx.h"
136136
137137
138typedef struct _namco_50xx_state namco_50xx_state;
139struct _namco_50xx_state
138struct namco_50xx_state
140139{
141140   device_t *   m_cpu;
142141   UINT8               m_latched_cmd;
trunk/src/mame/machine/namco51.c
r17907r17908
6767#define WRITE_PORT(st,num,data)    (st)->m_out[num](0, data)
6868
6969
70typedef struct _namco_51xx_state namco_51xx_state;
71struct _namco_51xx_state
70struct namco_51xx_state
7271{
7372   device_t *   m_cpu;
7473   devcb_resolved_read8 m_in[4];
trunk/src/mame/machine/namco51.h
r17907r17908
44#include "devlegcy.h"
55
66
7typedef struct _namco_51xx_interface namco_51xx_interface;
8struct _namco_51xx_interface
7struct namco_51xx_interface
98{
109   devcb_read8    in[4];      /* read handlers for ports A-D */
1110   devcb_write8   out[2];      /* write handlers for ports A-B */
trunk/src/mame/machine/md_cart.c
r17907r17908
106106   PSOLAR                   /* Pier Solar */
107107};
108108
109typedef struct _md_pcb  md_pcb;
110struct _md_pcb
109struct md_pcb
111110{
112111   const char              *pcb_name;
113112   int                     pcb_id;
trunk/src/mame/machine/gaelco3d.c
r17907r17908
7777#define LINK_SLACK_B ((LINK_SLACK / 3) + 1)
7878
7979
80typedef struct _buf_t buf_t;
81struct _buf_t
80struct buf_t
8281{
8382   volatile UINT8 data;
8483   volatile UINT8 stat;
r17907r17908
8685   volatile int data_cnt;
8786};
8887
89typedef struct _shmem_t shmem_t;
90struct _shmem_t
88struct shmem_t
9189{
9290   volatile INT32   lock;
9391   buf_t            buf[2];
r17907r17908
9593
9694typedef struct _osd_shared_mem osd_shared_mem;
9795
98typedef struct _gaelco_serial_state gaelco_serial_state;
99struct _gaelco_serial_state
96struct gaelco_serial_state
10097{
10198   device_t *m_device;
10299   devcb_resolved_write_line m_irq_func;
trunk/src/mame/machine/gaelco3d.h
r17907r17908
3434    DEVICE INTERFACE TYPE
3535***************************************************************************/
3636
37typedef struct _gaelco_serial_interface gaelco_serial_interface;
38struct _gaelco_serial_interface
37struct gaelco_serial_interface
3938{
4039   devcb_write_line irq_func;
4140};
trunk/src/mame/machine/decocass.c
r17907r17908
18691869
18701870
18711871/* state of the tape */
1872typedef struct _tape_state tape_state;
1873struct _tape_state
1872struct tape_state
18741873{
18751874   running_machine *   machine;         /* pointer back to the machine */
18761875   emu_timer *         timer;            /* timer for running the tape */
trunk/src/mame/machine/fddebug.c
r17907r17908
220220***************************************************************************/
221221
222222/* a single possible instruction decoding */
223typedef struct _fd1094_possibility fd1094_possibility;
224struct _fd1094_possibility
223struct fd1094_possibility
225224{
226225   offs_t      basepc;            /* starting PC of the possibility */
227226   int         length;            /* number of words */
r17907r17908
232231};
233232
234233/* an entry in the opcode table */
235typedef struct _optable_entry optable_entry;
236struct _optable_entry
234struct optable_entry
237235{
238236   UINT32         flags;         /* per-opcode flags */
239237   const char *   string;         /* identifying string */
trunk/src/mame/machine/buggychl.c
r17907r17908
22#include "cpu/z80/z80.h"
33#include "machine/buggychl.h"
44
5typedef struct _buggychl_mcu_state buggychl_mcu_state;
6struct _buggychl_mcu_state
5struct buggychl_mcu_state
76{
87   UINT8       m_port_a_in;
98   UINT8       m_port_a_out;
trunk/src/mame/machine/namco53.c
r17907r17908
6161#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
6262
6363
64typedef struct _namco_53xx_state namco_53xx_state;
65struct _namco_53xx_state
64struct namco_53xx_state
6665{
6766   device_t *   m_cpu;
6867   UINT8               m_portO;
trunk/src/mame/machine/namco53.h
r17907r17908
44#include "devlegcy.h"
55
66
7typedef struct _namco_53xx_interface namco_53xx_interface;
8struct _namco_53xx_interface
7struct namco_53xx_interface
98{
109   devcb_read8      k;         /* read handlers for K port */
1110   devcb_read8    in[4];      /* read handlers for ports A-D */
trunk/src/mame/machine/namco62.c
r17907r17908
1616#define VERBOSE 0
1717#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
1818
19typedef struct _namco_62xx_state namco_62xx_state;
20struct _namco_62xx_state
19struct namco_62xx_state
2120{
2221   device_t* m_cpu;
2322   devcb_resolved_read8 m_in[4];
trunk/src/mame/machine/steppers.h
r17907r17908
3434
3535/*------------- Stepper motor interface structure -----------------*/
3636
37typedef struct _stepper_interface stepper_interface;
38struct _stepper_interface
37struct stepper_interface
3938{
4039   UINT8 type; /* Reel unit type */
4140   INT16 index_start;/* start position of index (in half steps) */
trunk/src/mame/machine/namco62.h
r17907r17908
44#include "devlegcy.h"
55
66
7typedef struct _namco_62xx_interface namco_62xx_interface;
8struct _namco_62xx_interface
7struct namco_62xx_interface
98{
109   devcb_read8    in[4];      /* read handlers for ports A-D */
1110   devcb_write8   out[2];      /* write handlers for ports A-B */
trunk/src/mame/machine/atarigen.h
r17907r17908
6363
6464typedef void (*atarigen_scanline_func)(screen_device &screen, int scanline);
6565
66typedef struct _atarivc_state_desc atarivc_state_desc;
67struct _atarivc_state_desc
66struct atarivc_state_desc
6867{
6968   UINT32 latch1;                     /* latch #1 value (-1 means disabled) */
7069   UINT32 latch2;                     /* latch #2 value (-1 means disabled) */
r17907r17908
8180};
8281
8382
84typedef struct _atarigen_screen_timer atarigen_screen_timer;
85struct _atarigen_screen_timer
83struct atarigen_screen_timer
8684{
8785   screen_device *screen;
8886   emu_timer *         scanline_interrupt_timer;
trunk/src/mame/machine/mathbox.c
r17907r17908
2929#define MB_TEST 0
3030#define LOG(x) do { if (MB_TEST) logerror x; } while (0)
3131
32typedef struct _mathbox_state mathbox_state;
33struct _mathbox_state
32struct mathbox_state
3433{
3534   device_t *device;
3635   /* math box scratch registers */
trunk/src/mame/video/mcd212.h
r17907r17908
157157
158158
159159
160typedef struct _mcd212_ab_t mcd212_ab_t;
161struct _mcd212_ab_t
160struct mcd212_ab_t
162161{
163162    //* Color limit array.
164163    BYTE68K limit[3 * BYTE68K_MAX];
trunk/src/mame/video/midzeus.c
r17907r17908
3333 *
3434 *************************************/
3535
36typedef struct _poly_extra_data poly_extra_data;
37struct _poly_extra_data
36struct poly_extra_data
3837{
3938   const void *   palbase;
4039   const void *   texbase;
trunk/src/mame/video/gticlub.c
r17907r17908
3636static int count = 0;
3737#endif
3838
39typedef struct _poly_extra_data poly_extra_data;
40struct _poly_extra_data
39struct poly_extra_data
4140{
4241   UINT32 color;
4342   int texture_x, texture_y;
trunk/src/mame/video/atarimo.h
r17907r17908
3535typedef int (*atarimo_special_func)(bitmap_ind16 &bitmap, const rectangle &clip, int code, int color, int xpos, int ypos, rectangle *mobounds);
3636
3737/* description for a four-word mask */
38typedef struct _atarimo_entry atarimo_entry;
39struct _atarimo_entry
38struct atarimo_entry
4039{
4140   UINT16         data[4];
4241};
4342
4443/* description of the motion objects */
45typedef struct _atarimo_desc atarimo_desc;
46struct _atarimo_desc
44struct atarimo_desc
4745{
4846   UINT8            gfxindex;         /* index to which gfx system */
4947   UINT8            banks;            /* number of motion object banks */
r17907r17908
8179};
8280
8381/* rectangle list */
84typedef struct _atarimo_rect_list atarimo_rect_list;
85struct _atarimo_rect_list
82struct atarimo_rect_list
8683{
8784   int               numrects;
8885   rectangle *         rect;
trunk/src/mame/video/taitoic.c
r17907r17908
544544/*                                                                         */
545545/***************************************************************************/
546546
547typedef struct _pc080sn_state pc080sn_state;
548struct _pc080sn_state
547struct pc080sn_state
549548{
550549   UINT16         ctrl[8];
551550
r17907r17908
10481047/*                                                                         */
10491048/***************************************************************************/
10501049
1051typedef struct _pc090oj_state pc090oj_state;
1052struct _pc090oj_state
1050struct pc090oj_state
10531051{
10541052/* NB: pc090oj_ctrl is the internal register controlling flipping
10551053
r17907r17908
12781276/*                                                                         */
12791277/***************************************************************************/
12801278
1281typedef struct _tc0080vco_state tc0080vco_state;
1282struct _tc0080vco_state
1279struct tc0080vco_state
12831280{
12841281   UINT16 *       ram;
12851282   UINT16 *       bg0_ram_0;
r17907r17908
19911988/*                                                                         */
19921989/***************************************************************************/
19931990
1994typedef struct _tc0100scn_state tc0100scn_state;
1995struct _tc0100scn_state
1991struct tc0100scn_state
19961992{
19971993   UINT16       ctrl[8];
19981994
r17907r17908
26362632/*                                                                         */
26372633/***************************************************************************/
26382634
2639typedef struct _tc0280grd_state tc0280grd_state;
2640struct _tc0280grd_state
2635struct tc0280grd_state
26412636{
26422637   UINT16 *       ram;
26432638
r17907r17908
28352830/*                                                                         */
28362831/***************************************************************************/
28372832
2838typedef struct _tc0360pri_state tc0360pri_state;
2839struct _tc0360pri_state
2833struct tc0360pri_state
28402834{
28412835   UINT8   regs[16];
28422836};
r17907r17908
29412935/*                                                                         */
29422936/***************************************************************************/
29432937
2944typedef struct _tc0480scp_state tc0480scp_state;
2945struct _tc0480scp_state
2938struct tc0480scp_state
29462939{
29472940   UINT16           ctrl[0x18];
29482941
r17907r17908
39253918/*                                                                         */
39263919/***************************************************************************/
39273920
3928typedef struct _tc0150rod_state tc0150rod_state;
3929struct _tc0150rod_state
3921struct tc0150rod_state
39303922{
39313923   UINT16 *        ram;
39323924
r17907r17908
47614753/*                                                                         */
47624754/***************************************************************************/
47634755
4764typedef struct _tc0110pcr_state tc0110pcr_state;
4765struct _tc0110pcr_state
4756struct tc0110pcr_state
47664757{
47674758   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
47684759   UINT16 *     ram;
r17907r17908
50195010/*                                                                         */
50205011/***************************************************************************/
50215012
5022typedef struct _tc0180vcu_state tc0180vcu_state;
5023struct _tc0180vcu_state
5013struct tc0180vcu_state
50245014{
50255015   UINT16         ctrl[0x10];
50265016
trunk/src/mame/video/taitoic.h
r17907r17908
1212    TYPE DEFINITIONS
1313***************************************************************************/
1414
15typedef struct _pc080sn_interface pc080sn_interface;
16struct _pc080sn_interface
15struct pc080sn_interface
1716{
1817   int                gfxnum;
1918
r17907r17908
2322};
2423
2524
26typedef struct _pc090oj_interface pc090oj_interface;
27struct _pc090oj_interface
25struct pc090oj_interface
2826{
2927   int                gfxnum;
3028
r17907r17908
3331};
3432
3533
36typedef struct _tc0080vco_interface tc0080vco_interface;
37struct _tc0080vco_interface
34struct tc0080vco_interface
3835{
3936   int                gfxnum;
4037   int                txnum;
r17907r17908
4542   int                has_fg0;   /* for debug */
4643};
4744
48typedef struct _tc0100scn_interface tc0100scn_interface;
49struct _tc0100scn_interface
45struct tc0100scn_interface
5046{
5147   const char         *screen;
5248
r17907r17908
6258};
6359
6460
65typedef struct _tc0280grd_interface tc0280grd_interface;
66struct _tc0280grd_interface
61struct tc0280grd_interface
6762{
6863   int                gfxnum;
6964};
7065
7166
72typedef struct _tc0480scp_interface tc0480scp_interface;
73struct _tc0480scp_interface
67struct tc0480scp_interface
7468{
7569   int                gfxnum;
7670   int                txnum;
r17907r17908
8579};
8680
8781
88typedef struct _tc0150rod_interface tc0150rod_interface;
89struct _tc0150rod_interface
82struct tc0150rod_interface
9083{
9184   const char      *gfx_region;   /* gfx region for the road */
9285};
9386
9487
95typedef struct _tc0110pcr_interface tc0110pcr_interface;
96struct _tc0110pcr_interface
88struct tc0110pcr_interface
9789{
9890   int               pal_offs;
9991};
10092
101typedef struct _tc0180vcu_interface tc0180vcu_interface;
102struct _tc0180vcu_interface
93struct tc0180vcu_interface
10394{
10495   int            bg_color_base;
10596   int            fg_color_base;
trunk/src/mame/video/model2.c
r17907r17908
137137   UINT8            luma;
138138} _quad_m2;
139139
140typedef struct _poly_extra_data poly_extra_data;
141struct _poly_extra_data
140struct poly_extra_data
142141{
143142   model2_state *   state;
144143   UINT32      lumabase;
trunk/src/mame/video/midzeus2.c
r17907r17908
3535 *
3636 *************************************/
3737
38typedef struct _poly_extra_data poly_extra_data;
39struct _poly_extra_data
38struct poly_extra_data
4039{
4140   const void *   palbase;
4241   const void *   texbase;
trunk/src/mame/video/model3.c
r17907r17908
3333   rgb_t      data[1];
3434};
3535
36typedef struct _poly_extra_data poly_extra_data;
37struct _poly_extra_data
36struct poly_extra_data
3837{
3938   cached_texture *texture;
4039   bitmap_ind32 *zbuffer;
trunk/src/mame/video/galastrm.c
r17907r17908
66#define X_OFFSET 96
77#define Y_OFFSET 60
88
9typedef struct _poly_extra_data poly_extra_data;
10struct _poly_extra_data
9struct poly_extra_data
1110{
1211   bitmap_ind16 *texbase;
1312};
1413
15typedef struct _polygon polygon;
16struct _polygon
14struct polygon
1715{
1816   float x;
1917   float y;
trunk/src/mame/video/namcos22.c
r17907r17908
336336
337337
338338
339typedef struct _poly_extra_data poly_extra_data;
340struct _poly_extra_data
339struct poly_extra_data
341340{
342341   /* poly / sprites */
343342   running_machine *machine;
trunk/src/mame/video/gtia.h
r17907r17908
1313
1414#include "includes/atari.h"
1515
16typedef struct _gtia_interface gtia_interface;
17struct _gtia_interface
16struct gtia_interface
1817{
1918   UINT8 (*console_read)(address_space *space);
2019   void (*console_write)(address_space *space, UINT8 data);
r17907r17908
2423
2524
2625/* reading registers */
27typedef struct _gtia_readregs gtia_readregs;
28struct _gtia_readregs
26struct gtia_readregs
2927{
3028   UINT8   m0pf;      /* d000 missile 0 playfield collisions */
3129   UINT8   m1pf;      /* d001 missile 1 playfield collisions */
r17907r17908
5957};
6058
6159/* writing registers */
62typedef struct _gtia_writeregs gtia_writeregs;
63struct _gtia_writeregs
60struct gtia_writeregs
6461{
6562   UINT8   hposp0;    /* d000 player 0 horz position */
6663   UINT8   hposp1;    /* d001 player 1 horz position */
r17907r17908
9794};
9895
9996/* helpers */
100typedef struct _gtia_helpervars gtia_helpervars;
101struct _gtia_helpervars
97struct gtia_helpervars
10298{
10399   UINT8   grafp0;    /* optimized graphics data player 0 */
104100   UINT8   grafp1;    /* optimized graphics data player 1 */
r17907r17908
125121   UINT8   vdelay_p3;   /* vertical delay for player 3 */
126122};
127123
128typedef struct _gtia_struct gtia_struct;
129struct _gtia_struct
124struct gtia_struct
130125{
131126   gtia_interface intf;
132127   gtia_readregs   r;         /* read registers */
trunk/src/mame/video/turbo.c
r17907r17908
1010
1111
1212
13typedef struct _sprite_info sprite_info;
14struct _sprite_info
13struct sprite_info
1514{
1615   UINT16   ve;               /* VE0-15 signals for this row */
1716   UINT8   lst;            /* LST0-7 signals for this row */
trunk/src/mame/video/deco16ic.c
r17907r17908
164164#include "ui.h"
165165
166166
167typedef struct _deco16ic_state deco16ic_state;
168struct _deco16ic_state
167struct deco16ic_state
169168{
170169   screen_device *screen;
171170
trunk/src/mame/video/deco16ic.h
r17907r17908
2121typedef int (*deco16_bank_cb)( const int bank );
2222
2323
24typedef struct _deco16ic_interface deco16ic_interface;
25struct _deco16ic_interface
24struct deco16ic_interface
2625{
2726   const char         *screen;
2827   int                split;
trunk/src/mame/video/avgdvg.c
r17907r17908
112112   running_machine *m_machine;
113113};
114114
115typedef struct _vgconf vgconf;
116struct _vgconf
115struct vgconf
117116{
118117   int (*handler[8])(vgdata *);
119118   UINT8 (*state_addr)(vgdata *);
trunk/src/mame/video/decocomn.c
r17907r17908
99#include "ui.h"
1010
1111
12typedef struct _decocomn_state decocomn_state;
13struct _decocomn_state
12struct decocomn_state
1413{
1514   screen_device *screen;
1615   UINT8 *dirty_palette;
trunk/src/mame/video/decocomn.h
r17907r17908
1616***************************************************************************/
1717
1818
19typedef struct _decocomn_interface decocomn_interface;
20struct _decocomn_interface
19struct decocomn_interface
2120{
2221   const char         *screen;
2322};
trunk/src/mame/video/vrender0.c
r17907r17908
7474   UINT32 Height;
7575} _RenderState;
7676
77typedef struct _vr0video_state  vr0video_state;
78struct _vr0video_state
77struct vr0video_state
7978{
8079   device_t *cpu;
8180
trunk/src/mame/video/vrender0.h
r17907r17908
77 TYPE DEFINITIONS
88 ***************************************************************************/
99
10typedef struct _vr0video_interface vr0video_interface;
11struct _vr0video_interface
10struct vr0video_interface
1211{
1312   const char *cpu;
1413};
trunk/src/mame/video/kan_pand.c
r17907r17908
5050#include "emu.h"
5151#include "video/kan_pand.h"
5252
53typedef struct _kaneko_pandora_state  kaneko_pandora_state;
54struct _kaneko_pandora_state
53struct kaneko_pandora_state
5554{
5655   screen_device *screen;
5756   UINT8 *      spriteram;
trunk/src/mame/video/kan_pand.h
r17907r17908
1515    TYPE DEFINITIONS
1616***************************************************************************/
1717
18typedef struct _kaneko_pandora_interface kaneko_pandora_interface;
19struct _kaneko_pandora_interface
18struct kaneko_pandora_interface
2019{
2120   const char *screen;
2221   UINT8      gfx_region;
trunk/src/mame/video/bfm_dm01.h
r17907r17908
66#ifndef BFM_DM01
77#define BFM_DM01
88
9typedef struct _bfmdm01_interface bfmdm01_interface;
10struct _bfmdm01_interface
9struct bfmdm01_interface
1110{
1211   void (*busy_func)(running_machine &machine, int state);
1312};
trunk/src/mame/video/konicdev.c
r17907r17908
13321332/*                                                                         */
13331333/***************************************************************************/
13341334
1335typedef struct _k007121_state  k007121_state ;
1336struct _k007121_state
1335struct k007121_state
13371336{
13381337
13391338   UINT8    ctrlram[8];
r17907r17908
16191618/*                                                                         */
16201619/***************************************************************************/
16211620
1622typedef struct _k007342_state k007342_state;
1623struct _k007342_state
1621struct k007342_state
16241622{
16251623   UINT8    *ram;
16261624   UINT8    *scroll_ram;
r17907r17908
19321930/*                                                                         */
19331931/***************************************************************************/
19341932
1935typedef struct _k007420_state k007420_state;
1936struct _k007420_state
1933struct k007420_state
19371934{
19381935   UINT8        *ram;
19391936
r17907r17908
22272224/*                                                                         */
22282225/***************************************************************************/
22292226
2230typedef struct _k052109_state k052109_state;
2231struct _k052109_state
2227struct k052109_state
22322228{
22332229   UINT8    *ram;
22342230   UINT8    *videoram_F;
r17907r17908
28972893/*                                                                         */
28982894/***************************************************************************/
28992895
2900typedef struct _k051960_state k051960_state;
2901struct _k051960_state
2896struct k051960_state
29022897{
29032898   UINT8    *ram;
29042899
r17907r17908
34773472/*                                                                         */
34783473/***************************************************************************/
34793474
3480typedef struct _k05324x_state k05324x_state;
3481struct _k05324x_state
3475struct k05324x_state
34823476{
34833477   UINT16    *ram;
34843478   UINT16    *buffer;
r17907r17908
43034297/*                                                                         */
43044298/***************************************************************************/
43054299
4306typedef struct _k053247_state k053247_state;
4307struct _k053247_state
4300struct k053247_state
43084301{
43094302   UINT16    *ram;
43104303
r17907r17908
53805373/*                                                                         */
53815374/***************************************************************************/
53825375
5383typedef struct _k051316_state k051316_state;
5384struct _k051316_state
5376struct k051316_state
53855377{
53865378   UINT8    *ram;
53875379
r17907r17908
56965688/*                                                                         */
56975689/***************************************************************************/
56985690
5699typedef struct _k053936_state k053936_state;
5700struct _k053936_state
5691struct k053936_state
57015692{
57025693   UINT16    *ctrl;
57035694   UINT16    *linectrl;
r17907r17908
59595950/*                                                                         */
59605951/***************************************************************************/
59615952
5962typedef struct _k053251_state k053251_state;
5963struct _k053251_state
5953struct k053251_state
59645954{
59655955   int      dirty_tmap[5];
59665956
r17907r17908
61496139/*                                                                         */
61506140/***************************************************************************/
61516141
6152typedef struct _k054000_state k054000_state;
6153struct _k054000_state
6142struct k054000_state
61546143{
61556144   UINT8    regs[0x20];
61566145};
r17907r17908
62966285/*                                                                         */
62976286/***************************************************************************/
62986287
6299typedef struct _k051733_state k051733_state;
6300struct _k051733_state
6288struct k051733_state
63016289{
63026290   UINT8    ram[0x20];
63036291   UINT8    rng;
r17907r17908
64916479#define K056832_PAGE_WIDTH  (K056832_PAGE_COLS*8)
64926480#define K056832_PAGE_COUNT 16
64936481
6494typedef struct _k056832_state k056832_state;
6495struct _k056832_state
6482struct k056832_state
64966483{
64976484   tilemap_t   *tilemap[K056832_PAGE_COUNT];
64986485   bitmap_ind16  *pixmap[K056832_PAGE_COUNT];
r17907r17908
84738460/* K055555 5-bit-per-pixel priority encoder */
84748461/* This device has 48 8-bit-wide registers */
84758462
8476typedef struct _k055555_state k055555_state;
8477struct _k055555_state
8463struct k055555_state
84788464{
84798465   UINT8    regs[128];
84808466};
r17907r17908
86308616// register-handling shell.
86318617
86328618
8633typedef struct _k054338_state k054338_state;
8634struct _k054338_state
8619struct k054338_state
86358620{
86368621   UINT16    regs[32];
86378622   int       shd_rgb[9];
r17907r17908
89748959/*                                                                         */
89758960/***************************************************************************/
89768961
8977typedef struct _k001006_state k001006_state;
8978struct _k001006_state
8962struct k001006_state
89798963{
89808964   screen_device *screen;
89818965
r17907r17908
91829166#include "video/poly.h"
91839167#include "cpu/sharc/sharc.h"
91849168
9185typedef struct _poly_extra_data poly_extra_data;
9186struct _poly_extra_data
9169struct poly_extra_data
91879170{
91889171   UINT32 color;
91899172   int texture_x, texture_y;
r17907r17908
91939176   int texture_mirror_y;
91949177};
91959178
9196typedef struct _k001005_state k001005_state;
9197struct _k001005_state
9179struct k001005_state
91989180{
91999181   screen_device *screen;
92009182   device_t *cpu;
r17907r17908
1015110133/***************************************************************************/
1015210134
1015310135
10154typedef struct _k001604_state k001604_state;
10155struct _k001604_state
10136struct k001604_state
1015610137{
1015710138   screen_device *screen;
1015810139   tilemap_t        *layer_8x8[2];
r17907r17908
1059710578/*                                                                         */
1059810579/***************************************************************************/
1059910580
10600typedef struct _k037122_state k037122_state;
10601struct _k037122_state
10581struct k037122_state
1060210582{
1060310583   screen_device *screen;
1060410584   tilemap_t        *layer[2];
trunk/src/mame/video/konicdev.h
r17907r17908
2626typedef void (*k056832_callback)(running_machine &machine, int layer, int *code, int *color, int *flags);
2727
2828
29typedef struct _k007342_interface k007342_interface;
30struct _k007342_interface
29struct k007342_interface
3130{
3231   int                gfxnum;
3332   k007342_callback   callback;
3433};
3534
36typedef struct _k007420_interface k007420_interface;
37struct _k007420_interface
35struct k007420_interface
3836{
3937   int                banklimit;
4038   k007420_callback   callback;
4139};
4240
43typedef struct _k052109_interface k052109_interface;
44struct _k052109_interface
41struct k052109_interface
4542{
4643   const char         *gfx_memory_region;
4744   int                gfx_num;
r17907r17908
5047   k052109_callback   callback;
5148};
5249
53typedef struct _k051960_interface k051960_interface;
54struct _k051960_interface
50struct k051960_interface
5551{
5652   const char         *gfx_memory_region;
5753   int                gfx_num;
r17907r17908
6056   k051960_callback   callback;
6157};
6258
63typedef struct _k05324x_interface k05324x_interface;
64struct _k05324x_interface
59struct k05324x_interface
6560{
6661   const char         *gfx_memory_region;
6762   int                gfx_num;
r17907r17908
7166   k05324x_callback   callback;
7267};
7368
74typedef struct _k053247_interface k053247_interface;
75struct _k053247_interface
69struct k053247_interface
7670{
7771   const char         *screen;
7872   const char         *gfx_memory_region;
r17907r17908
8377   k05324x_callback   callback;
8478};
8579
86typedef struct _k051316_interface k051316_interface;
87struct _k051316_interface
80struct k051316_interface
8881{
8982   const char         *gfx_memory_region;
9083   int                gfx_num;
r17907r17908
9386   k051316_callback   callback;
9487};
9588
96typedef struct _k053936_interface k053936_interface;
97struct _k053936_interface
89struct k053936_interface
9890{
9991   int                wrap, xoff, yoff;
10092};
10193
102typedef struct _k056832_interface k056832_interface;
103struct _k056832_interface
94struct k056832_interface
10495{
10596   const char         *gfx_memory_region;
10697   int                gfx_num;
r17907r17908
113104   const char         *k055555;   // tbyahhoo uses the k056832 together with a k055555
114105};
115106
116typedef struct _k054338_interface k054338_interface;
117struct _k054338_interface
107struct k054338_interface
118108{
119109   const char         *screen;
120110   int                alpha_inv;
121111   const char         *k055555;
122112};
123113
124typedef struct _k001006_interface k001006_interface;
125struct _k001006_interface
114struct k001006_interface
126115{
127116   const char     *gfx_region;
128117};
129118
130typedef struct _k001005_interface k001005_interface;
131struct _k001005_interface
119struct k001005_interface
132120{
133121   const char     *screen;
134122   const char     *cpu;
r17907r17908
140128   int            gfx_index;
141129};
142130
143typedef struct _k001604_interface k001604_interface;
144struct _k001604_interface
131struct k001604_interface
145132{
146133   int            gfx_index_1;
147134   int            gfx_index_2;
r17907r17908
151138   int            is_slrasslt;
152139};
153140
154typedef struct _k037122_interface k037122_interface;
155struct _k037122_interface
141struct k037122_interface
156142{
157143   const char     *screen;
158144   int            gfx_index;
trunk/src/mame/video/hng64.c
r17907r17908
689689} hng64trans_t;
690690
691691
692typedef struct _blit_parameters blit_parameters;
693struct _blit_parameters
692struct blit_parameters
694693{
695694   bitmap_rgb32 *         bitmap;
696695   rectangle         cliprect;
trunk/src/mame/includes/megadriv.h
r17907r17908
349349   DECLARE_MACHINE_RESET(mtnew);
350350};
351351
352typedef struct _megadriv_cart  megadriv_cart;
353struct _megadriv_cart
352struct megadriv_cart
354353{
355354   int type;
356355
trunk/src/mame/includes/amiga.h
r17907r17908
320320
321321#define FLAGS_AGA_CHIPSET   (1 << 0)
322322
323typedef struct _amiga_machine_interface amiga_machine_interface;
324struct _amiga_machine_interface
323struct amiga_machine_interface
325324{
326325   UINT32 chip_ram_mask;
327326
r17907r17908
342341#define IS_ECS(intf) ( intf->chip_ram_mask == ECS_CHIP_RAM_MASK && (( intf->flags & FLAGS_AGA_CHIPSET) == 0))
343342#define IS_ECS_OR_AGA(intf) ( intf->chip_ram_mask == ECS_CHIP_RAM_MASK)
344343
345typedef struct _amiga_autoconfig_device amiga_autoconfig_device;
346struct _amiga_autoconfig_device
344struct amiga_autoconfig_device
347345{
348346   UINT8      link_memory;      /* link into free memory list */
349347   UINT8      rom_vector_valid;   /* ROM vector offset valid */
r17907r17908
361359   void      (*uninstall)(running_machine &machine, offs_t base); /* memory uninstallation */
362360};
363361
364typedef struct _autoconfig_device autoconfig_device;
365struct _autoconfig_device
362struct autoconfig_device
366363{
367364   autoconfig_device *      next;
368365   amiga_autoconfig_device   device;
trunk/src/mame/includes/lordgun.h
r17907r17908
44
55*************************************************************************/
66
7typedef struct _lordgun_gun_data lordgun_gun_data;
8struct _lordgun_gun_data
7struct lordgun_gun_data
98{
109   int      scr_x,   scr_y;
1110   UINT16   hw_x,   hw_y;
trunk/src/mame/includes/seta.h
r17907r17908
1515   UINT8   reg[4];            //
1616};
1717
18typedef struct _game_offset game_offset;
19struct _game_offset
18struct game_offset
2019{
2120   /* 2 values, for normal and flipped */
2221   const char *gamename;
trunk/src/mame/includes/m107.h
r17907r17908
55*************************************************************************/
66
77
8typedef struct _pf_layer_info pf_layer_info;
9struct _pf_layer_info
8struct pf_layer_info
109{
1110   tilemap_t *      tmap;
1211   UINT16         vram_base;
trunk/src/mame/drivers/mediagx.c
r17907r17908
8080
8181#define SPEEDUP_HACKS   1
8282
83typedef struct _speedup_entry speedup_entry;
84struct _speedup_entry
83struct speedup_entry
8584{
8685   UINT32         offset;
8786   UINT32         pc;
trunk/src/mame/drivers/mjkjidai.c
r17907r17908
5151extern const device_type MJKJIDAI;
5252
5353/* Start of ADPCM custom chip code */
54typedef struct _mjkjidai_adpcm_state mjkjidai_adpcm_state;
55struct _mjkjidai_adpcm_state
54struct mjkjidai_adpcm_state
5655{
5756   oki_adpcm_state m_adpcm;
5857   sound_stream *m_stream;
trunk/src/mame/drivers/renegade.c
r17907r17908
111111
112112/********************************************************************************************/
113113
114typedef struct _renegade_adpcm_state renegade_adpcm_state;
115struct _renegade_adpcm_state
114struct renegade_adpcm_state
116115{
117116   oki_adpcm_state m_adpcm;
118117   sound_stream *m_stream;
trunk/src/mame/drivers/atarisy4.c
r17907r17908
121121
122122
123123
124typedef struct _poly_extra_data poly_extra_data;
125struct _poly_extra_data
124struct poly_extra_data
126125{
127126   UINT16 color;
128127   UINT16 *screen_ram;
trunk/src/mame/drivers/seattle.c
r17907r17908
380380 *
381381 *************************************/
382382
383typedef struct _galileo_timer galileo_timer;
384struct _galileo_timer
383struct galileo_timer
385384{
386385   emu_timer *      timer;
387386   UINT32         count;
r17907r17908
389388};
390389
391390
392typedef struct _galileo_data galileo_data;
393struct _galileo_data
391struct galileo_data
394392{
395393   /* raw register data */
396394   UINT32         reg[0x1000/4];
r17907r17908
409407};
410408
411409
412typedef struct _widget_data widget_data;
413struct _widget_data
410struct widget_data
414411{
415412   /* ethernet register address */
416413   UINT8         ethernet_addr;
trunk/src/build/png2bdc.c
r17907r17908
6868***************************************************************************/
6969
7070/* a render_font contains information about a single character in a font */
71typedef struct _render_font_char render_font_char;
72struct _render_font_char
71struct render_font_char
7372{
7473   INT32            width;            /* width from this character to the next */
7574   INT32            xoffs, yoffs;      /* X and Y offset from baseline to top,left of bitmap */
r17907r17908
7978
8079
8180/* a render_font contains information about a font */
82typedef struct _render_font render_font;
83struct _render_font
81struct render_font
8482{
8583   int               height;            /* height of the font, from ascent to descent */
8684   int               yoffs;            /* y offset from baseline to descent */
trunk/src/build/verinfo.c
r17907r17908
2424//  TYPE DEFINITIONS
2525//============================================================
2626
27typedef struct _version_info version_info;
28struct _version_info
27struct version_info
2928{
3029   int version_major;
3130   int version_minor;
trunk/src/tools/unidasm.c
r17907r17908
6262typedef enum _display_type display_type;
6363
6464
65typedef struct _dasm_table_entry dasm_table_entry;
66struct _dasm_table_entry
65struct dasm_table_entry
6766{
6867   const char *         name;
6968   display_type         display;
r17907r17908
7271};
7372
7473
75typedef struct _options options;
76struct _options
74struct options
7775{
7876   const char *         filename;
7977   offs_t               basepc;
trunk/src/tools/jedutil.c
r17907r17908
111111
112112typedef int (*command_func_type)(int argc, char *argv[]);
113113
114typedef struct _command_entry command_entry;
115struct _command_entry
114struct command_entry
116115{
117116    const char *command;
118117    command_func_type command_func;
r17907r17908
126125
127126
128127/* Pin fuse row configuration */
129typedef struct _pin_fuse_rows pin_fuse_rows;
130struct _pin_fuse_rows
128struct pin_fuse_rows
131129{
132130    UINT16 pin;                  /* Pin number */
133131    UINT16 fuserowoutputenable; /* Fuse row for the output enable */
r17907r17908
138136
139137
140138/* Pin fuse column configuration */
141typedef struct _pin_fuse_columns pin_fuse_columns;
142struct _pin_fuse_columns
139struct pin_fuse_columns
143140{
144141    UINT16 pin;             /* Pin number */
145142    UINT16 lowfusecolumn;  /* Column number for low output */
trunk/src/tools/regrep.c
r17907r17908
8484    TYPE DEFINITIONS
8585***************************************************************************/
8686
87typedef struct _summary_file summary_file;
88struct _summary_file
87struct summary_file
8988{
9089    summary_file *  next;
9190    char            name[20];
r17907r17908
9897};
9998
10099
101typedef struct _summary_list summary_list;
102struct _summary_list
100struct summary_list
103101{
104102    summary_list *  next;
105103    summary_file *  files;
trunk/src/osd/sdl/gl_shader_mgr.h
r17907r17908
2222// old code passed sdl_info * to functions here
2323// however the parameter was not used
2424// changed interface to more generic one.
25typedef struct _glsl_shader_info glsl_shader_info;
26struct _glsl_shader_info
25struct glsl_shader_info
2726{
2827   int dummy; // avoid compiler breakage
2928};
trunk/src/osd/sdl/drawsdl.c
r17907r17908
4646#endif
4747
4848/* sdl_info is the information about SDL for the current screen */
49typedef struct _sdl_info sdl_info;
50struct _sdl_info
49struct sdl_info
5150{
5251   INT32            blittimer;
5352   UINT32            extra_flags;
trunk/src/osd/sdl/draw13.c
r17907r17908
5858//============================================================
5959
6060
61typedef struct _quad_setup_data quad_setup_data;
62struct _quad_setup_data
61struct quad_setup_data
6362{
6463   INT32         dudx, dvdx, dudy, dvdy;
6564   INT32         startu, startv;
r17907r17908
7069
7170typedef void (*texture_copy_func)(texture_info *texture, const render_texinfo *texsource);
7271
73typedef struct _copy_info copy_info;
74struct _copy_info {
72struct copy_info {
7573   int             src_fmt;
7674   Uint32            dst_fmt;
7775   int               dst_bpp;
r17907r17908
117115};
118116
119117/* sdl_info is the information about SDL for the current screen */
120typedef struct _sdl_info sdl_info;
121struct _sdl_info
118struct sdl_info
122119{
123120   INT32         blittimer;
124121   UINT32         extra_flags;
trunk/src/osd/sdl/sdlsync_tc.c
r17907r17908
3434#include <signal.h>
3535#include <sys/time.h>
3636
37typedef struct _hidden_mutex_t hidden_mutex_t;
38struct _hidden_mutex_t {
37struct hidden_mutex_t {
3938   pthread_mutex_t id;
4039};
4140
trunk/src/osd/sdl/video.h
r17907r17908
5050//  TYPE DEFINITIONS
5151//============================================================
5252
53typedef struct _sdl_mode sdl_mode;
54struct _sdl_mode
53struct sdl_mode
5554{
5655   int               width;
5756   int               height;
5857};
5958
60typedef struct _sdl_monitor_info sdl_monitor_info;
61struct _sdl_monitor_info
59struct sdl_monitor_info
6260{
6361   sdl_monitor_info  *   next;               // pointer to next monitor in list
6462#ifdef PTR64
r17907r17908
7573};
7674
7775
78typedef struct _sdl_window_config sdl_window_config;
79struct _sdl_window_config
76struct sdl_window_config
8077{
8178   float            aspect;                  // decoded aspect ratio
8279   int               width;                  // decoded width
r17907r17908
8885};
8986
9087
91typedef struct _sdl_video_config sdl_video_config;
92struct _sdl_video_config
88struct sdl_video_config
9389{
9490   // performance options
9591   int               novideo;            // don't draw, for pure CPU benchmarking
trunk/src/osd/sdl/sdlsync_sdl.c
r17907r17908
2828#else
2929#define LOG( x )
3030#endif
31typedef struct _hidden_mutex_t hidden_mutex_t;
32struct _hidden_mutex_t {
31struct hidden_mutex_t {
3332   SDL_mutex *         id;
3433   volatile INT32      locked;
3534   volatile INT32      threadid;
trunk/src/osd/sdl/sdlwork.c
r17907r17908
7171//  TYPE DEFINITIONS
7272//============================================================
7373
74typedef struct _work_thread_info work_thread_info;
75struct _work_thread_info
74struct work_thread_info
7675{
7776   osd_work_queue *   queue;         // pointer back to the queue
7877   osd_thread *      handle;         // handle to the thread
trunk/src/osd/sdl/drawogl.c
r17907r17908
213213};
214214
215215/* sdl_info is the information about SDL for the current screen */
216typedef struct _sdl_info sdl_info;
217struct _sdl_info
216struct sdl_info
218217{
219218   INT32         blittimer;
220219   UINT32         extra_flags;
r17907r17908
269268};
270269
271270/* line_aa_step is used for drawing antialiased lines */
272typedef struct _line_aa_step line_aa_step;
273struct _line_aa_step
271struct line_aa_step
274272{
275273   float      xoffs, yoffs;            // X/Y deltas
276274   float      weight;               // weight contribution
trunk/src/osd/sdl/input.c
r17907r17908
8888//============================================================
8989
9090// state information for a keyboard
91typedef struct _keyboard_state keyboard_state;
92struct _keyboard_state
91struct keyboard_state
9392{
9493   INT32   state[0x3ff];                                  // must be INT32!
9594   INT8   oldkey[MAX_KEYS];
r17907r17908
9897
9998
10099// state information for a mouse
101typedef struct _mouse_state mouse_state;
102struct _mouse_state
100struct mouse_state
103101{
104102   INT32 lX, lY;
105103   INT32 buttons[MAX_BUTTONS];
r17907r17908
107105
108106
109107// state information for a joystick; DirectInput state must be first element
110typedef struct _joystick_state joystick_state;
111struct _joystick_state
108struct joystick_state
112109{
113110   SDL_Joystick *device;
114111   INT32 axes[MAX_AXES];
r17907r17908
119116
120117#if (USE_XINPUT)
121118// state information for a lightgun
122typedef struct _lightgun_state lightgun_state;
123struct _lightgun_state
119struct lightgun_state
124120{
125121    INT32 lX, lY;
126122    INT32 buttons[MAX_BUTTONS];
r17907r17908
131127#endif
132128
133129// generic device information
134typedef struct _device_info device_info;
135struct _device_info
130struct device_info
136131{
137132   // device information
138133   device_info **         head;
r17907r17908
187182
188183// joystick mapper
189184
190typedef struct _device_map_t device_map_t;
191struct _device_map_t
185struct device_map_t
192186{
193187   struct {
194188      char   *name;
r17907r17908
236230//============================================================
237231
238232// master keyboard translation table
239typedef struct _kt_table kt_table;
240struct _kt_table {
233struct kt_table {
241234   input_item_id   mame_key;
242235   INT32         sdl_key;
243236   //const char *  vkey;
r17907r17908
503496};
504497#endif
505498
506typedef struct _key_lookup_table key_lookup_table;
507struct _key_lookup_table
499struct key_lookup_table
508500{
509501   int code;
510502   const char *name;
trunk/src/osd/sdl/debugwin.c
r17907r17908
5858
5959typedef struct _win_i win_i;
6060
61typedef struct _edit edit;
62struct _edit {
61struct edit {
6362   GtkEntry *edit_w;
6463   struct hentry *h, *ch;
6564   char *hold;
trunk/src/osd/sdl/window.c
r17907r17908
100100
101101static sdl_draw_info draw;
102102
103typedef struct _worker_param worker_param;
104struct _worker_param {
103struct worker_param {
105104   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
106105   sdl_window_info *window;
107106   render_primitive_list *list;
trunk/src/osd/sdl/testkeys.c
r17907r17908
1919
2020#include "unicode.h"
2121
22typedef struct _key_lookup_table key_lookup_table;
23
24struct _key_lookup_table
22struct key_lookup_table
2523{
2624   int code;
2725   const char *name;
trunk/src/osd/sdl/window.h
r17907r17908
3232//  TYPE DEFINITIONS
3333//============================================================
3434
35typedef struct _sdl_window_info sdl_window_info;
36struct _sdl_window_info
35struct sdl_window_info
3736{
3837   // Pointer to next window
3938   sdl_window_info *   next;
r17907r17908
101100#endif
102101};
103102
104typedef struct _sdl_draw_info sdl_draw_info;
105struct _sdl_draw_info
103struct sdl_draw_info
106104{
107105   void (*exit)(void);
108106   void (*attach)(sdl_draw_info *info, sdl_window_info *window);
trunk/src/osd/osdcore.h
r17907r17908
281281
282282/* osd_directory_entry contains basic information about a file when iterating through */
283283/* a directory */
284typedef struct _osd_directory_entry osd_directory_entry;
285struct _osd_directory_entry
284struct osd_directory_entry
286285{
287286   const char *      name;         /* name of the entry */
288287   osd_dir_entry_type   type;         /* type of the entry */
trunk/src/osd/windows/output.c
r17907r17908
6666//  TYPEDEFS
6767//============================================================
6868
69typedef struct _registered_client registered_client;
70struct _registered_client
69struct registered_client
7170{
7271   registered_client *   next;      // next client in the list
7372   LPARAM            id;         // client-specified ID
trunk/src/osd/windows/d3dintf.h
r17907r17908
8888//  Abstracted presentation parameters
8989//============================================================
9090
91typedef struct _d3d_present_parameters d3d_present_parameters;
92struct _d3d_present_parameters
91struct d3d_present_parameters
9392{
9493   UINT BackBufferWidth;
9594   UINT BackBufferHeight;
r17907r17908
112111//  Abstracted device identifier
113112//============================================================
114113
115typedef struct _d3d_adapter_identifier d3d_adapter_identifier;
116struct _d3d_adapter_identifier
114struct d3d_adapter_identifier
117115{
118116    char            Driver[512];
119117    char            Description[512];
r17907r17908
155153//  Direct3D interfaces
156154//============================================================
157155
158typedef struct _d3d_interface d3d_interface;
159struct _d3d_interface
156struct d3d_interface
160157{
161158   HRESULT  (*check_device_format)(d3d *d3dptr, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT adapterformat, DWORD usage, D3DRESOURCETYPE restype, D3DFORMAT format);
162159   HRESULT  (*check_device_type)(d3d *d3dptr, UINT adapter, D3DDEVTYPE devtype, D3DFORMAT format, D3DFORMAT backformat, BOOL windowed);
r17907r17908
176173//  Direct3DDevice interfaces
177174//============================================================
178175
179typedef struct _d3d_device_interface d3d_device_interface;
180struct _d3d_device_interface
176struct d3d_device_interface
181177{
182178   HRESULT (*begin_scene)(d3d_device *dev);
183179   HRESULT (*clear)(d3d_device *dev, DWORD count, const D3DRECT *rects, DWORD flags, D3DCOLOR color, float z, DWORD stencil);
r17907r17908
210206//  Direct3DSurface interfaces
211207//============================================================
212208
213typedef struct _d3d_surface_interface d3d_surface_interface;
214struct _d3d_surface_interface
209struct d3d_surface_interface
215210{
216211   HRESULT (*lock_rect)(d3d_surface *surf, D3DLOCKED_RECT *locked, const RECT *rect, DWORD flags);
217212   ULONG   (*release)(d3d_surface *tex);
r17907r17908
223218//  Direct3DTexture interfaces
224219//============================================================
225220
226typedef struct _d3d_texture_interface d3d_texture_interface;
227struct _d3d_texture_interface
221struct d3d_texture_interface
228222{
229223   HRESULT (*get_surface_level)(d3d_texture *tex, UINT level, d3d_surface **surface);
230224   HRESULT (*lock_rect)(d3d_texture *tex, UINT level, D3DLOCKED_RECT *locked, const RECT *rect, DWORD flags);
r17907r17908
237231//  Direct3DVertexBuffer interfaces
238232//============================================================
239233
240typedef struct _d3d_vertex_buffer_interface d3d_vertex_buffer_interface;
241struct _d3d_vertex_buffer_interface
234struct d3d_vertex_buffer_interface
242235{
243236   HRESULT (*lock)(d3d_vertex_buffer *vbuf, UINT offset, UINT size, VOID **data, DWORD flags);
244237   ULONG   (*release)(d3d_vertex_buffer *vbuf);
r17907r17908
250243//  Direct3DEffect interfaces
251244//============================================================
252245
253typedef struct _d3d_effect_interface d3d_effect_interface;
254struct _d3d_effect_interface
246struct d3d_effect_interface
255247{
256248   void     (*begin)(d3d_effect *effect, UINT *passes, DWORD flags);
257249   void     (*end)(d3d_effect *effect);
trunk/src/osd/windows/d3dhlsl.h
r17907r17908
5252
5353/* hlsl_options is the information about runtime-mutable Direct3D HLSL options */
5454/* in the future this will be moved into an OSD/emu shared buffer */
55typedef struct _hlsl_options hlsl_options;
56struct _hlsl_options
55struct hlsl_options
5756{
5857   bool               params_dirty;
5958   float               shadow_mask_alpha;
trunk/src/osd/windows/output.h
r17907r17908
110110//  TYPE DEFINITIONS
111111//============================================================
112112
113typedef struct _copydata_id_string copydata_id_string;
114struct _copydata_id_string
113struct copydata_id_string
115114{
116115   UINT32      id;               // ID that was requested
117116   char      string[1];         // string array containing the data
trunk/src/osd/windows/drawgdi.c
r17907r17908
5757//============================================================
5858
5959/* gdi_info is the information for the current screen */
60typedef struct _gdi_info gdi_info;
61struct _gdi_info
60struct gdi_info
6261{
6362   BITMAPINFO            bminfo;
6463   RGBQUAD               colors[256];
trunk/src/osd/windows/d3dcomm.h
r17907r17908
5353//============================================================
5454
5555/* d3d_texture_info holds information about a texture */
56typedef struct _d3d_texture_info d3d_texture_info;
57struct _d3d_texture_info
56struct d3d_texture_info
5857{
5958   d3d_texture_info *      next;                  // next texture in the list
6059   d3d_texture_info *      prev;                  // prev texture in the list
r17907r17908
7978
8079
8180/* d3d_poly_info holds information about a single polygon/d3d primitive */
82typedef struct _d3d_poly_info d3d_poly_info;
83struct _d3d_poly_info
81struct d3d_poly_info
8482{
8583    D3DPRIMITIVETYPE      type;                  // type of primitive
8684    UINT32               count;                  // total number of primitives
r17907r17908
9290
9391
9492/* d3d_vertex describes a single vertex */
95typedef struct _d3d_vertex d3d_vertex;
96struct _d3d_vertex
93struct d3d_vertex
9794{
9895   float               x, y, z;               // X,Y,Z coordinates
9996   float               rhw;                  // RHW when no HLSL, padding when HLSL
r17907r17908
103100
104101
105102/* line_aa_step is used for drawing antialiased lines */
106typedef struct _line_aa_step line_aa_step;
107struct _line_aa_step
103struct line_aa_step
108104{
109105   float               xoffs, yoffs;            // X/Y deltas
110106   float               weight;                  // weight contribution
trunk/src/osd/windows/input.c
r17907r17908
112112//============================================================
113113
114114// state information for a keyboard; DirectInput state must be first element
115typedef struct _keyboard_state keyboard_state;
116struct _keyboard_state
115struct keyboard_state
117116{
118117   UINT8               state[MAX_KEYS];
119118   INT8               oldkey[MAX_KEYS];
r17907r17908
122121
123122
124123// state information for a mouse; DirectInput state must be first element
125typedef struct _mouse_state mouse_state;
126struct _mouse_state
124struct mouse_state
127125{
128126   DIMOUSESTATE2         state;
129127   LONG               raw_x, raw_y, raw_z;
r17907r17908
131129
132130
133131// state information for a joystick; DirectInput state must be first element
134typedef struct _joystick_state joystick_state;
135struct _joystick_state
132struct joystick_state
136133{
137134   DIJOYSTATE            state;
138135   LONG               rangemin[8];
r17907r17908
141138
142139
143140// DirectInput-specific information about a device
144typedef struct _dinput_device_info dinput_device_info;
145struct _dinput_device_info
141struct dinput_device_info
146142{
147143   LPDIRECTINPUTDEVICE      device;
148144   LPDIRECTINPUTDEVICE2   device2;
r17907r17908
152148
153149
154150// RawInput-specific information about a device
155typedef struct _rawinput_device_info rawinput_device_info;
156struct _rawinput_device_info
151struct rawinput_device_info
157152{
158153   HANDLE               device;
159154};
trunk/src/osd/windows/winwork.c
r17907r17908
106106//  TYPE DEFINITIONS
107107//============================================================
108108
109typedef struct _scalable_lock scalable_lock;
110struct _scalable_lock
109struct scalable_lock
111110{
112111#if USE_SCALABLE_LOCKS
113112   struct
r17907r17908
122121};
123122
124123
125typedef struct _work_thread_info work_thread_info;
126struct _work_thread_info
124struct work_thread_info
127125{
128126   osd_work_queue *   queue;         // pointer back to the queue
129127   HANDLE            handle;         // handle to the thread
trunk/src/osd/windows/ledutil.c
r17907r17908
138138} KEYBOARD_INDICATOR_PARAMETERS, *PKEYBOARD_INDICATOR_PARAMETERS;
139139
140140
141typedef struct _id_map_entry id_map_entry;
142struct _id_map_entry
141struct id_map_entry
143142{
144143   id_map_entry *         next;
145144   const char *         name;
trunk/src/osd/windows/drawdd.c
r17907r17908
6969
7070
7171/* dd_info is the information about DirectDraw for the current screen */
72typedef struct _dd_info dd_info;
73struct _dd_info
72struct dd_info
7473{
7574   GUID               adapter;               // current display adapter
7675   GUID *               adapter_ptr;            // pointer to current display adapter
r17907r17908
101100
102101
103102/* monitor_enum_info holds information during a monitor enumeration */
104typedef struct _monitor_enum_info monitor_enum_info;
105struct _monitor_enum_info
103struct monitor_enum_info
106104{
107105   win_monitor_info *      monitor;               // pointer to monitor we want
108106   GUID               guid;                  // GUID of the one we found
r17907r17908
112110
113111
114112/* mode_enum_info holds information during a display mode enumeration */
115typedef struct _mode_enum_info mode_enum_info;
116struct _mode_enum_info
113struct mode_enum_info
117114{
118115   win_window_info *      window;
119116   INT32               minimum_width, minimum_height;
trunk/src/osd/windows/video.h
r17907r17908
6262//  TYPE DEFINITIONS
6363//============================================================
6464
65typedef struct _win_monitor_info win_monitor_info;
66struct _win_monitor_info
65struct win_monitor_info
6766{
6867   win_monitor_info  *   next;               // pointer to next monitor in list
6968   HMONITOR         handle;               // handle to the monitor
r17907r17908
7473};
7574
7675
77typedef struct _win_window_config win_window_config;
78struct _win_window_config
76struct win_window_config
7977{
8078   float            aspect;                  // decoded aspect ratio
8179   int               width;                  // decoded width
r17907r17908
8482};
8583
8684
87typedef struct _win_video_config win_video_config;
88struct _win_video_config
85struct win_video_config
8986{
9087   // global configuration
9188   int               windowed;               // start windowed?
trunk/src/osd/windows/window.h
r17907r17908
114114};
115115
116116
117typedef struct _win_draw_callbacks win_draw_callbacks;
118struct _win_draw_callbacks
117struct win_draw_callbacks
119118{
120119   void (*exit)(void);
121120
trunk/src/osd/windows/drawd3d.h
r17907r17908
6060//============================================================
6161
6262/* d3d_info is the information about Direct3D for the current screen */
63typedef struct _d3d_info d3d_info;
64struct _d3d_info
63struct d3d_info
6564{
6665   int                  adapter;               // ordinal adapter number
6766   int                  width, height;            // current width, height
trunk/src/emu/debug/debugcpu.c
r17907r17908
7171    TYPE DEFINITIONS
7272***************************************************************************/
7373
74/* in mame.h: typedef struct _debugcpu_private debugcpu_private; */
75struct _debugcpu_private
74struct debugcpu_private
7675{
7776   device_t *livecpu;
7877   device_t *visiblecpu;
trunk/src/emu/debug/debugcpu.h
r17907r17908
6464typedef int (*debug_instruction_hook_func)(device_t &device, offs_t curpc);
6565
6666
67typedef struct _xml_data_node xml_data_node;
67struct xml_data_node;
6868
6969
7070class device_debug
trunk/src/emu/debug/debugcmd.c
r17907r17908
3434    TYPE DEFINITIONS
3535***************************************************************************/
3636
37typedef struct _global_entry global_entry;
38struct _global_entry
37struct global_entry
3938{
4039   void *      base;
4140   UINT32      size;
4241};
4342
4443
45typedef struct _cheat_map cheat_map;
46struct _cheat_map
44struct cheat_map
4745{
4846   UINT64      offset;
4947   UINT64      first_value;
r17907r17908
5351};
5452
5553
56typedef struct _cheat_system cheat_system;
57struct _cheat_system
54struct cheat_system
5855{
5956   char      cpu;
6057   UINT64      length;
r17907r17908
6663};
6764
6865
69typedef struct _cheat_region_map cheat_region_map;
70struct _cheat_region_map
66struct cheat_region_map
7167{
7268   UINT64      offset;
7369   UINT64      endoffset;
trunk/src/emu/debug/debugcon.c
r17907r17908
3636    TYPE DEFINITIONS
3737***************************************************************************/
3838
39typedef struct _debug_command debug_command;
40struct _debug_command
39struct debug_command
4140{
4241   debug_command *   next;
4342   char         command[32];
trunk/src/emu/debug/debughlp.c
r17907r17908
2828    TYPE DEFINITIONS
2929***************************************************************************/
3030
31typedef struct _help_item help_item;
32struct _help_item
31struct help_item
3332{
3433   const char *      tag;
3534   const char *      help;
trunk/src/emu/cpu/v30mz/v30mz.h
r17907r17908
22#define __V30MZ_H__
33
44
5typedef struct _nec_config nec_config;
6struct _nec_config
5struct nec_config
76{
87   const UINT8*   v25v35_decryptiontable; // internal decryption table
98};
trunk/src/emu/cpu/lh5801/lh5801.c
r17907r17908
5454   LH5801_IRQ_STATE
5555};
5656
57typedef struct _lh5801_state lh5801_state;
58struct _lh5801_state
57struct lh5801_state
5958{
6059   const lh5801_cpu_core *config;
6160   legacy_cpu_device *device;
trunk/src/emu/cpu/lh5801/lh5801.h
r17907r17908
6767
6868typedef UINT8 (*lh5801_in_func)(device_t *device);
6969
70typedef struct _lh5801_cpu_core lh5801_cpu_core;
71struct _lh5801_cpu_core
70struct lh5801_cpu_core
7271{
7372   lh5801_in_func   in;
7473};
trunk/src/emu/cpu/m6809/m6809.c
r17907r17908
7979#define LOG(x)   do { if (VERBOSE) logerror x; } while (0)
8080
8181/* 6809 Registers */
82typedef struct _m68_state_t m68_state_t;
83struct _m68_state_t
82struct m68_state_t
8483{
8584   PAIR   pc;       /* Program counter */
8685   PAIR   ppc;      /* Previous program counter */
trunk/src/emu/cpu/m6809/m6809.h
r17907r17908
2323
2424CPU_DISASSEMBLE( m6809 );
2525
26typedef struct _m6809_config m6809_config;
27struct _m6809_config
26struct m6809_config
2827{
2928   UINT8   encrypt_only_first_byte;      /* encrypt only the first byte in 10 xx and 11 xx opcodes */
3029};
trunk/src/emu/cpu/tms0980/tms0980.c
r17907r17908
226226#define I_YNEC      ( MICRO_MASK | M_YTP | M_CKN | M_NE )
227227
228228
229typedef struct _tms0980_state tms0980_state;
230struct _tms0980_state
229struct tms0980_state
231230{
232231   UINT8   prev_pc;      /* previous program counter */
233232   UINT8   prev_pa;      /* previous page address register */
trunk/src/emu/cpu/tms0980/tms0980.h
r17907r17908
99};
1010
1111
12typedef struct _tms0980_config tms0980_config;
13struct _tms0980_config {
12struct tms0980_config {
1413   /* O-output PLA configuration */
1514   struct {
1615      UINT8   value;
trunk/src/emu/cpu/h83002/h8priv.h
r17907r17908
3636   UINT64 timer_cycles;
3737} H8S2XXX_TMR;
3838
39typedef struct _h83xx_state h83xx_state;
40struct _h83xx_state
39struct h83xx_state
4140{
4241   // main CPU stuff
4342   UINT32 h8err;
trunk/src/emu/cpu/unsp/unsp.h
r17907r17908
1212#define __UNSP_H__
1313
1414typedef struct _unspimp_state unspimp_state;
15typedef struct _unsp_state unsp_state;
16struct _unsp_state
15struct unsp_state
1716{
1817   UINT16 r[16];
1918   UINT8 irq;
trunk/src/emu/cpu/pic16c62x/pic16c62x.c
r17907r17908
5757
5858
5959
60typedef struct _pic16c62x_state pic16c62x_state;
61struct _pic16c62x_state
60struct pic16c62x_state
6261{
6362   /******************** CPU Internal Registers *******************/
6463   UINT16   PC;
r17907r17908
109108
110109
111110/* opcode table entry */
112typedef struct _pic16c62x_opcode pic16c62x_opcode;
113struct _pic16c62x_opcode
111struct pic16c62x_opcode
114112{
115113   UINT8   cycles;
116114   void   (*function)(pic16c62x_state *);
117115};
118116/* instruction list entry */
119typedef struct _pic16c62x_instruction pic16c62x_instruction;
120struct _pic16c62x_instruction
117struct pic16c62x_instruction
121118{
122119   char   *format;
123120   void   (*function)(pic16c62x_state *);
trunk/src/emu/cpu/ccpu/ccpu.h
r17907r17908
4141typedef UINT8 (*ccpu_input_func)(device_t *device);
4242typedef void (*ccpu_vector_func)(device_t *device, INT16 sx, INT16 sy, INT16 ex, INT16 ey, UINT8 shift);
4343
44typedef struct _ccpu_config ccpu_config;
45struct _ccpu_config
44struct ccpu_config
4645{
4746   ccpu_input_func      external_input;      /* if NULL, assume JMI jumper is present */
4847   ccpu_vector_func   vector_callback;
trunk/src/emu/cpu/ccpu/ccpu.c
r17907r17908
1717    STRUCTURES & TYPEDEFS
1818***************************************************************************/
1919
20typedef struct _ccpu_state ccpu_state;
21struct _ccpu_state
20struct ccpu_state
2221{
2322    UINT16            PC;
2423    UINT16            A;
trunk/src/emu/cpu/tms34010/tms34010.h
r17907r17908
177177
178178
179179/* Configuration structure */
180typedef struct _tms34010_display_params tms34010_display_params;
181struct _tms34010_display_params
180struct tms34010_display_params
182181{
183182   UINT16   vcount;                        /* most recent VCOUNT */
184183   UINT16   veblnk, vsblnk;                  /* start/end of VBLANK */
r17907r17908
189188};
190189
191190
192typedef struct _tms34010_config tms34010_config;
193struct _tms34010_config
191struct tms34010_config
194192{
195193   UINT8   halt_on_reset;                  /* /HCS pin, which determines HALT state after reset */
196194   const char *screen_tag;                  /* the screen operated on */
trunk/src/emu/cpu/tms34010/tms34010.c
r17907r17908
4141#endif
4242};
4343
44typedef struct _tms34010_state tms34010_state;
45struct _tms34010_state
44struct tms34010_state
4645{
4746   UINT32            pc;
4847   UINT32            ppc;
trunk/src/emu/cpu/superfx/superfx.h
r17907r17908
8383#define SUPERFX_CFGR_IRQ   0x80   // IRQ
8484#define SUPERFX_CFGR_MS0   0x20   // MS0
8585
86typedef struct _superfx_config superfx_config;
87struct _superfx_config
86struct superfx_config
8887{
8988   devcb_write_line   out_irq_func;         /* IRQ changed callback */
9089};
trunk/src/emu/cpu/superfx/superfx.c
r17907r17908
1515   UINT8 valid[0x20];
1616} cache_t;
1717
18typedef struct _superfx_state superfx_state;
19struct _superfx_state
18struct superfx_state
2019{
2120   superfx_config config;
2221
trunk/src/emu/cpu/mcs48/mcs48.c
r17907r17908
118118***************************************************************************/
119119
120120/* live processor state */
121typedef struct _mcs48_state mcs48_state;
122struct _mcs48_state
121struct mcs48_state
123122{
124123   UINT16      prevpc;            /* 16-bit previous program counter */
125124   UINT16      pc;               /* 16-bit program counter */
trunk/src/emu/cpu/m37710/m37710cm.h
r17907r17908
7272/* ======================================================================== */
7373
7474/* CPU Structure */
75typedef struct _m37710i_cpu_struct m37710i_cpu_struct;
76struct _m37710i_cpu_struct
75struct m37710i_cpu_struct
7776{
7877   uint a;         /* Accumulator */
7978   uint b;         /* holds high byte of accumulator */
trunk/src/emu/cpu/z180/z180.c
r17907r17908
114114/* The Z180 registers. HALT is set to 1 when the CPU is halted, the refresh */
115115/* register is calculated as follows: refresh=(Regs.R&127)|(Regs.R2&128)    */
116116/****************************************************************************/
117typedef struct _z180_state z180_state;
118struct _z180_state
117struct z180_state
119118{
120119   PAIR   PREPC,PC,SP,AF,BC,DE,HL,IX,IY;
121120   PAIR   AF2,BC2,DE2,HL2;
trunk/src/emu/cpu/i86/i86.c
r17907r17908
2929}
3030i8086basicregs;
3131
32typedef struct _i8086_state i8086_state;
33struct _i8086_state
32struct i8086_state
3433{
3534   i8086basicregs regs;
3635   offs_t fetch_xor;
trunk/src/emu/cpu/i86/i86.h
r17907r17908
1/* ASG 971222 -- rewrote this interface */
2#pragma once
3 
4#ifndef __I86INTF_H__
5#define __I86INTF_H__
6 
7 
8#define INPUT_LINE_INT0         INPUT_LINE_IRQ0
9#define INPUT_LINE_INT1         INPUT_LINE_IRQ1
10#define INPUT_LINE_INT2         INPUT_LINE_IRQ2
11#define INPUT_LINE_INT3         INPUT_LINE_IRQ3
12#define INPUT_LINE_TEST         20    /* PJB 03/05 */
13#define INPUT_LINE_DRQ0         21
14#define INPUT_LINE_DRQ1         22
15#define INPUT_LINE_TMRIN0      23
16#define INPUT_LINE_TMRIN1      24
17 
18 
19typedef struct _i80186_interface i80186_interface;
20struct _i80186_interface
21{
22   devcb_write_line      out_tmrout0_func;
23   devcb_write_line      out_tmrout1_func;
24};
25#define I80186_INTERFACE(name) const i80186_interface (name) =
26 
27 
28enum
29{
30   I8086_IP,
31   I8086_AX,
32   I8086_CX,
33   I8086_DX,
34   I8086_BX,
35   I8086_SP,
36   I8086_BP,
37   I8086_SI,
38   I8086_DI,
39   I8086_AL,
40   I8086_CL,
41   I8086_DL,
42   I8086_BL,
43   I8086_AH,
44   I8086_CH,
45   I8086_DH,
46   I8086_BH,
47   I8086_FLAGS,
48   I8086_ES,
49   I8086_CS,
50   I8086_SS,
51   I8086_DS,
52   I8086_VECTOR,
53 
54   I8086_GENPC = STATE_GENPC,
55   I8086_GENSP = STATE_GENSP,
56   I8086_GENPCBASE = STATE_GENPCBASE
57};
58 
59/* Public functions */
60DECLARE_LEGACY_CPU_DEVICE(I8086, i8086);
61DECLARE_LEGACY_CPU_DEVICE(I8088, i8088);
62DECLARE_LEGACY_CPU_DEVICE(I80186, i80186);
63DECLARE_LEGACY_CPU_DEVICE(I80188, i80188);
64 
65#endif /* __I86INTF_H__ */
1/* ASG 971222 -- rewrote this interface */
2#pragma once
3
4#ifndef __I86INTF_H__
5#define __I86INTF_H__
6
7
8#define INPUT_LINE_INT0         INPUT_LINE_IRQ0
9#define INPUT_LINE_INT1         INPUT_LINE_IRQ1
10#define INPUT_LINE_INT2         INPUT_LINE_IRQ2
11#define INPUT_LINE_INT3         INPUT_LINE_IRQ3
12#define INPUT_LINE_TEST         20    /* PJB 03/05 */
13#define INPUT_LINE_DRQ0         21
14#define INPUT_LINE_DRQ1         22
15#define INPUT_LINE_TMRIN0      23
16#define INPUT_LINE_TMRIN1      24
17
18
19struct i80186_interface
20{
21   devcb_write_line      out_tmrout0_func;
22   devcb_write_line      out_tmrout1_func;
23};
24#define I80186_INTERFACE(name) const i80186_interface (name) =
25
26
27enum
28{
29   I8086_IP,
30   I8086_AX,
31   I8086_CX,
32   I8086_DX,
33   I8086_BX,
34   I8086_SP,
35   I8086_BP,
36   I8086_SI,
37   I8086_DI,
38   I8086_AL,
39   I8086_CL,
40   I8086_DL,
41   I8086_BL,
42   I8086_AH,
43   I8086_CH,
44   I8086_DH,
45   I8086_BH,
46   I8086_FLAGS,
47   I8086_ES,
48   I8086_CS,
49   I8086_SS,
50   I8086_DS,
51   I8086_VECTOR,
52
53   I8086_GENPC = STATE_GENPC,
54   I8086_GENSP = STATE_GENSP,
55   I8086_GENPCBASE = STATE_GENPCBASE
56};
57
58/* Public functions */
59DECLARE_LEGACY_CPU_DEVICE(I8086, i8086);
60DECLARE_LEGACY_CPU_DEVICE(I8088, i8088);
61DECLARE_LEGACY_CPU_DEVICE(I80186, i80186);
62DECLARE_LEGACY_CPU_DEVICE(I80188, i80188);
63
64#endif /* __I86INTF_H__ */
trunk/src/emu/cpu/i86/i286.c
r17907r17908
3232    UINT8  b[16];   /* or as 8 bit registers */
3333} i80286basicregs;
3434
35typedef struct _i80286_state i80286_state;
36struct _i80286_state
35struct i80286_state
3736{
3837    i80286basicregs regs;
3938    offs_t fetch_xor;
trunk/src/emu/cpu/cubeqcpu/cubeqcpu.h
r17907r17908
118118
119119typedef void (*cubeqst_dac_w_func)(device_t *, UINT16);
120120
121typedef struct _cubeqst_snd_config cubeqst_snd_config;
122struct _cubeqst_snd_config
121struct cubeqst_snd_config
123122{
124123   cubeqst_dac_w_func   dac_w;
125124   const char *      sound_data_region;
126125
127126};
128127
129typedef struct _cubeqst_lin_config cubeqst_lin_config;
130struct _cubeqst_lin_config
128struct cubeqst_lin_config
131129{
132130   const char *      rot_cpu_tag;
133131};
134132
135typedef struct _cubeqst_rot_config cubeqst_rot_config;
136struct _cubeqst_rot_config
133struct cubeqst_rot_config
137134{
138135   const char *      lin_cpu_tag;
139136};
trunk/src/emu/cpu/upd7810/upd7810.c
r17907r17908
408408#include "debugger.h"
409409#include "upd7810.h"
410410
411typedef struct _upd7810_state upd7810_state;
412struct _upd7810_state
411struct upd7810_state
413412{
414413   PAIR   ppc;   /* previous program counter */
415414   PAIR   pc;    /* program counter */
trunk/src/emu/cpu/x86log.c
r17907r17908
3131***************************************************************************/
3232
3333/* code logging info */
34typedef struct _log_comment log_comment;
35struct _log_comment
34struct log_comment
3635{
3736   x86code *      base;
3837   const char *   string;
r17907r17908
4039
4140
4241/* data ranges */
43typedef struct _data_range_t data_range_t;
44struct _data_range_t
42struct data_range_t
4543{
4644   x86code *      base;
4745   x86code *      end;
trunk/src/emu/cpu/sc61860/sc61860.h
r17907r17908
3737   64 kb external ram (first 8kbyte not seen for program execution?) */
3838
3939
40typedef struct _sc61860_cpu_core sc61860_cpu_core;
41struct _sc61860_cpu_core
40struct sc61860_cpu_core
4241{
4342    int (*reset)(device_t *device);
4443    int (*brk)(device_t *device);
trunk/src/emu/cpu/sc61860/sc61860.c
r17907r17908
4040/****************************************************************************
4141 * The 61860 registers.
4242 ****************************************************************************/
43typedef struct _sc61860_state sc61860_state;
44struct _sc61860_state
43struct sc61860_state
4544{
4645   sc61860_cpu_core *config;
4746   UINT8 p, q, r; //7 bits only?
trunk/src/emu/cpu/v60/v60.c
r17907r17908
7171#define SETREG8(a, b)      (a) = ((a) & ~0xff) | ((b) & 0xff)
7272#define SETREG16(a, b)      (a) = ((a) & ~0xffff) | ((b) & 0xffff)
7373
74typedef struct _v60_flags v60_flags;
75struct _v60_flags
74struct v60_flags
7675{
7776   UINT8 CY;
7877   UINT8 OV;
r17907r17908
8180};
8281
8382// v60 Register Inside (Hm... It's not a pentium inside :-))) )
84typedef struct _v60_state v60_state;
85struct _v60_state
83struct v60_state
8684{
8785   offs_t            fetch_xor;
8886   offs_t            start_pc;
trunk/src/emu/cpu/hd6309/hd6309.c
r17907r17908
113113#define LOG(x)   do { if (VERBOSE) logerror x; } while (0)
114114
115115/* 6309 Registers */
116typedef struct _m68_state_t m68_state_t;
117struct _m68_state_t
116struct m68_state_t
118117{
119118   PAIR   pc;       /* Program counter */
120119   PAIR   ppc;      /* Previous program counter */
trunk/src/emu/cpu/ssp1601/ssp1601.c
r17907r17908
2929
3030
3131
32typedef struct _ssp1601_state_t ssp1601_state_t;
33struct _ssp1601_state_t
32struct ssp1601_state_t
3433{
3534   PAIR gr[8];      /* general regs, some are 16bit, some 32bit */
3635   union {
trunk/src/emu/cpu/s2650/s2650.c
r17907r17908
2525/* define this to expand all EA calculations inline */
2626#define INLINE_EA   1
2727
28typedef struct _s2650_regs s2650_regs;
29struct _s2650_regs {
28struct s2650_regs {
3029   UINT16   ppc;   /* previous program counter (page + iar) */
3130    UINT16  page;   /* 8K page select register (A14..A13) */
3231    UINT16  iar;    /* instruction address register (A12..A0) */
trunk/src/emu/cpu/avr8/avr8.c
r17907r17908
2121#include "debugger.h"
2222#include "avr8.h"
2323
24typedef struct _avr8_state avr8_state;
25struct _avr8_state
24struct avr8_state
2625{
2726    UINT32 pc;
2827
trunk/src/emu/cpu/se3208/se3208.c
r17907r17908
1010
1111*/
1212
13typedef struct _se3208_state_t se3208_state_t;
14struct _se3208_state_t
13struct se3208_state_t
1514{
1615   //GPR
1716   UINT32 R[8];
trunk/src/emu/cpu/e132xs/e132xs.c
r17907r17908
292292};
293293
294294/* Internal registers */
295typedef struct _hyperstone_state hyperstone_state;
296struct _hyperstone_state
295struct hyperstone_state
297296{
298297   UINT32   global_regs[32];
299298   UINT32   local_regs[64];
trunk/src/emu/cpu/mcs51/mcs51.c
r17907r17908
234234    TYPE DEFINITIONS
235235***************************************************************************/
236236
237typedef struct _mcs51_uart mcs51_uart;
238struct _mcs51_uart
237struct mcs51_uart
239238{
240239   UINT8   data_out;      //Data to send out
241240   UINT8   bits_to_send;   //How many bits left to send when transmitting out the serial port
r17907r17908
246245   UINT8   delay_cycles;   //Gross Hack;
247246};
248247
249typedef struct _mcs51_state_t mcs51_state_t;
250struct _mcs51_state_t
248struct mcs51_state_t
251249{
252250   //Internal stuff
253251   UINT16   ppc;         //previous pc
trunk/src/emu/cpu/mcs51/mcs51.h
r17907r17908
7777***************************************************************************/
7878
7979/* configuration of the DS5002FP */
80typedef struct _ds5002fp_config ds5002fp_config;
81struct _ds5002fp_config
80struct ds5002fp_config
8281{
8382   UINT8   mcon;               /* bootstrap loader MCON register */
8483   UINT8   rpctl;               /* bootstrap loader RPCTL register */
trunk/src/emu/cpu/i386/i386priv.h
r17907r17908
250250   float f[4];
251251} XMM_REG;
252252
253typedef struct _i386_state i386_state;
254struct _i386_state
253struct i386_state
255254{
256255   I386_GPR reg;
257256   I386_SREG sreg[6];
trunk/src/emu/cpu/mc68hc11/mc68hc11.h
r17907r17908
3131#define MC68HC11_IRQ_LINE         0
3232#define MC68HC11_TOC1_LINE         1
3333
34typedef struct _hc11_config hc11_config;
35struct _hc11_config
34struct hc11_config
3635{
3736   int has_extended_io; // I/O enable flag
3837   int internal_ram_size;
trunk/src/emu/cpu/mc68hc11/hc11ops.h
r17907r17908
1typedef struct _hc11_opcode_list_struct hc11_opcode_list_struct;
2struct _hc11_opcode_list_struct
1struct hc11_opcode_list_struct
32{
43   int page;
54   int opcode;
trunk/src/emu/cpu/mc68hc11/mc68hc11.c
r17907r17908
3636
3737static const int div_tab[4] = { 1, 4, 8, 16 };
3838
39typedef struct _hc11_state hc11_state;
40struct _hc11_state
39struct hc11_state
4140{
4241   union {
4342      struct {
trunk/src/emu/cpu/tlcs900/tlcs900.c
r17907r17908
1717#include "debugger.h"
1818#include "tlcs900.h"
1919
20typedef struct _tlcs900_state tlcs900_state;
21struct _tlcs900_state
20struct tlcs900_state
2221{
2322   const tlcs900_interface *intf;
2423
trunk/src/emu/cpu/tlcs900/tlcs900.h
r17907r17908
3737};
3838
3939
40typedef struct _tlcs900_interface tlcs900_interface;
41struct _tlcs900_interface
40struct tlcs900_interface
4241{
4342   devcb_write8   to1;
4443   devcb_write8   to3;
trunk/src/emu/cpu/i4004/i4004.c
r17907r17908
2121    TYPE DEFINITIONS
2222***************************************************************************/
2323
24typedef struct _i4004_state i4004_state;
25struct _i4004_state
24struct i4004_state
2625{
2726   UINT8   A; // Accumulator
2827   UINT8   R[8];
trunk/src/emu/cpu/scmp/scmp.c
r17907r17908
2020    TYPE DEFINITIONS
2121***************************************************************************/
2222
23typedef struct _scmp_state scmp_state;
24struct _scmp_state
23struct scmp_state
2524{
2625   scmp_config       config;
2726   PAIR   PC;
trunk/src/emu/cpu/scmp/scmp.h
r17907r17908
1717/***************************************************************************
1818    TYPE DEFINITIONS
1919***************************************************************************/
20typedef struct _scmp_config scmp_config;
21struct _scmp_config
20struct scmp_config
2221{
2322   devcb_write8      flag_out_func;
2423   devcb_write_line   sout_func;
trunk/src/emu/cpu/rsp/rsp.h
r17907r17908
7070
7171typedef void (*rsp_set_status_func)(device_t *device, UINT32 status);
7272
73typedef struct _rsp_config rsp_config;
74struct _rsp_config
73struct rsp_config
7574{
7675   read32_device_func dp_reg_r;
7776   write32_device_func dp_reg_w;
r17907r17908
155154} ACCUMULATOR_REG;
156155
157156typedef struct _rspimp_state rspimp_state;
158typedef struct _rsp_state rsp_state;
159struct _rsp_state
157struct rsp_state
160158{
161159   const rsp_config *config;
162160   FILE *exec_output;
trunk/src/emu/cpu/rsp/rspdrc.c
r17907r17908
8282***************************************************************************/
8383
8484/* fast RAM info */
85typedef struct _fast_ram_info fast_ram_info;
86struct _fast_ram_info
85struct fast_ram_info
8786{
8887   offs_t            start;                  /* start of the RAM block */
8988   offs_t            end;                  /* end of the RAM block */
r17907r17908
9392
9493
9594/* internal compiler state */
96typedef struct _compiler_state compiler_state;
97struct _compiler_state
95struct compiler_state
9896{
9997   UINT32            cycles;                  /* accumulated cycles */
10098   UINT8            checkints;               /* need to check interrupts before next instruction */
trunk/src/emu/cpu/cop400/cop400.c
r17907r17908
8484
8585typedef struct _cop400_opcode_map cop400_opcode_map;
8686
87typedef struct _cop400_state cop400_state;
88struct _cop400_state
87struct cop400_state
8988{
9089   const cop400_interface *intf;
9190
trunk/src/emu/cpu/cop400/cop400.h
r17907r17908
9999typedef enum _cop400_microbus cop400_microbus;
100100
101101/* interface */
102typedef struct _cop400_interface cop400_interface;
103struct _cop400_interface
102struct cop400_interface
104103{
105104   cop400_cki_bond      cki;         /* CKI bonding option */
106105   cop400_cko_bond      cko;         /* CKO bonding option */
trunk/src/emu/cpu/ssem/ssem.c
r17907r17908
1414#define SSEM_DISASM_ON_UNIMPL           0
1515#define SSEM_DUMP_MEM_ON_UNIMPL         0
1616
17typedef struct _ssem_state ssem_state;
18struct _ssem_state
17struct ssem_state
1918{
2019    UINT32 pc;
2120    UINT32 a;
trunk/src/emu/cpu/m6502/m6502.h
r17907r17908
5656#define M6510_INTERFACE(name) \
5757      const m6502_interface (name) =
5858
59typedef struct _m6502_interface m6502_interface;
60struct _m6502_interface
59struct m6502_interface
6160{
6261   devcb_read8            read_indexed_func;
6362   devcb_write8         write_indexed_func;
trunk/src/emu/cpu/jaguar/jaguar.h
r17907r17908
7474typedef void (*jaguar_int_func)(device_t *device);
7575
7676
77typedef struct _jaguar_cpu_config jaguar_cpu_config;
78struct _jaguar_cpu_config
77struct jaguar_cpu_config
7978{
8079   jaguar_int_func      cpu_int_callback;
8180};
trunk/src/emu/cpu/jaguar/jaguar.c
r17907r17908
7979***************************************************************************/
8080
8181/* Jaguar Registers */
82typedef struct _jaguar_state jaguar_state;
83struct _jaguar_state
82struct jaguar_cpu_state
8483{
8584   /* core registers */
8685   UINT32      r[32];
r17907r17908
9796   int         isdsp;
9897   int         icount;
9998   int         bankswitch_icount;
100   void      (*const *table)(jaguar_state *jaguar, UINT16 op);
99   void      (*const *table)(jaguar_cpu_state *jaguar, UINT16 op);
101100   device_irq_acknowledge_callback irq_callback;
102101   jaguar_int_func cpu_interrupt;
103102   legacy_cpu_device *device;
r17907r17908
124123    FUNCTION TABLES
125124***************************************************************************/
126125
127static void abs_rn(jaguar_state *jaguar, UINT16 op);
128static void add_rn_rn(jaguar_state *jaguar, UINT16 op);
129static void addc_rn_rn(jaguar_state *jaguar, UINT16 op);
130static void addq_n_rn(jaguar_state *jaguar, UINT16 op);
131static void addqmod_n_rn(jaguar_state *jaguar, UINT16 op);   /* DSP only */
132static void addqt_n_rn(jaguar_state *jaguar, UINT16 op);
133static void and_rn_rn(jaguar_state *jaguar, UINT16 op);
134static void bclr_n_rn(jaguar_state *jaguar, UINT16 op);
135static void bset_n_rn(jaguar_state *jaguar, UINT16 op);
136static void btst_n_rn(jaguar_state *jaguar, UINT16 op);
137static void cmp_rn_rn(jaguar_state *jaguar, UINT16 op);
138static void cmpq_n_rn(jaguar_state *jaguar, UINT16 op);
139static void div_rn_rn(jaguar_state *jaguar, UINT16 op);
140static void illegal(jaguar_state *jaguar, UINT16 op);
141static void imacn_rn_rn(jaguar_state *jaguar, UINT16 op);
142static void imult_rn_rn(jaguar_state *jaguar, UINT16 op);
143static void imultn_rn_rn(jaguar_state *jaguar, UINT16 op);
144static void jr_cc_n(jaguar_state *jaguar, UINT16 op);
145static void jump_cc_rn(jaguar_state *jaguar, UINT16 op);
146static void load_rn_rn(jaguar_state *jaguar, UINT16 op);
147static void load_r14n_rn(jaguar_state *jaguar, UINT16 op);
148static void load_r15n_rn(jaguar_state *jaguar, UINT16 op);
149static void load_r14rn_rn(jaguar_state *jaguar, UINT16 op);
150static void load_r15rn_rn(jaguar_state *jaguar, UINT16 op);
151static void loadb_rn_rn(jaguar_state *jaguar, UINT16 op);
152static void loadw_rn_rn(jaguar_state *jaguar, UINT16 op);
153static void loadp_rn_rn(jaguar_state *jaguar, UINT16 op);   /* GPU only */
154static void mirror_rn(jaguar_state *jaguar, UINT16 op);   /* DSP only */
155static void mmult_rn_rn(jaguar_state *jaguar, UINT16 op);
156static void move_rn_rn(jaguar_state *jaguar, UINT16 op);
157static void move_pc_rn(jaguar_state *jaguar, UINT16 op);
158static void movefa_rn_rn(jaguar_state *jaguar, UINT16 op);
159static void movei_n_rn(jaguar_state *jaguar, UINT16 op);
160static void moveq_n_rn(jaguar_state *jaguar, UINT16 op);
161static void moveta_rn_rn(jaguar_state *jaguar, UINT16 op);
162static void mtoi_rn_rn(jaguar_state *jaguar, UINT16 op);
163static void mult_rn_rn(jaguar_state *jaguar, UINT16 op);
164static void neg_rn(jaguar_state *jaguar, UINT16 op);
165static void nop(jaguar_state *jaguar, UINT16 op);
166static void normi_rn_rn(jaguar_state *jaguar, UINT16 op);
167static void not_rn(jaguar_state *jaguar, UINT16 op);
168static void or_rn_rn(jaguar_state *jaguar, UINT16 op);
169static void pack_rn(jaguar_state *jaguar, UINT16 op);      /* GPU only */
170static void resmac_rn(jaguar_state *jaguar, UINT16 op);
171static void ror_rn_rn(jaguar_state *jaguar, UINT16 op);
172static void rorq_n_rn(jaguar_state *jaguar, UINT16 op);
173static void sat8_rn(jaguar_state *jaguar, UINT16 op);      /* GPU only */
174static void sat16_rn(jaguar_state *jaguar, UINT16 op);      /* GPU only */
175static void sat16s_rn(jaguar_state *jaguar, UINT16 op);      /* DSP only */
176static void sat24_rn(jaguar_state *jaguar, UINT16 op);         /* GPU only */
177static void sat32s_rn(jaguar_state *jaguar, UINT16 op);      /* DSP only */
178static void sh_rn_rn(jaguar_state *jaguar, UINT16 op);
179static void sha_rn_rn(jaguar_state *jaguar, UINT16 op);
180static void sharq_n_rn(jaguar_state *jaguar, UINT16 op);
181static void shlq_n_rn(jaguar_state *jaguar, UINT16 op);
182static void shrq_n_rn(jaguar_state *jaguar, UINT16 op);
183static void store_rn_rn(jaguar_state *jaguar, UINT16 op);
184static void store_rn_r14n(jaguar_state *jaguar, UINT16 op);
185static void store_rn_r15n(jaguar_state *jaguar, UINT16 op);
186static void store_rn_r14rn(jaguar_state *jaguar, UINT16 op);
187static void store_rn_r15rn(jaguar_state *jaguar, UINT16 op);
188static void storeb_rn_rn(jaguar_state *jaguar, UINT16 op);
189static void storew_rn_rn(jaguar_state *jaguar, UINT16 op);
190static void storep_rn_rn(jaguar_state *jaguar, UINT16 op);   /* GPU only */
191static void sub_rn_rn(jaguar_state *jaguar, UINT16 op);
192static void subc_rn_rn(jaguar_state *jaguar, UINT16 op);
193static void subq_n_rn(jaguar_state *jaguar, UINT16 op);
194static void subqmod_n_rn(jaguar_state *jaguar, UINT16 op);   /* DSP only */
195static void subqt_n_rn(jaguar_state *jaguar, UINT16 op);
196static void xor_rn_rn(jaguar_state *jaguar, UINT16 op);
126static void abs_rn(jaguar_cpu_state *jaguar, UINT16 op);
127static void add_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
128static void addc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
129static void addq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
130static void addqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op);   /* DSP only */
131static void addqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
132static void and_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
133static void bclr_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
134static void bset_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
135static void btst_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
136static void cmp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
137static void cmpq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
138static void div_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
139static void illegal(jaguar_cpu_state *jaguar, UINT16 op);
140static void imacn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
141static void imult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
142static void imultn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
143static void jr_cc_n(jaguar_cpu_state *jaguar, UINT16 op);
144static void jump_cc_rn(jaguar_cpu_state *jaguar, UINT16 op);
145static void load_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
146static void load_r14n_rn(jaguar_cpu_state *jaguar, UINT16 op);
147static void load_r15n_rn(jaguar_cpu_state *jaguar, UINT16 op);
148static void load_r14rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
149static void load_r15rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
150static void loadb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
151static void loadw_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
152static void loadp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);   /* GPU only */
153static void mirror_rn(jaguar_cpu_state *jaguar, UINT16 op);   /* DSP only */
154static void mmult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
155static void move_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
156static void move_pc_rn(jaguar_cpu_state *jaguar, UINT16 op);
157static void movefa_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
158static void movei_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
159static void moveq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
160static void moveta_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
161static void mtoi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
162static void mult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
163static void neg_rn(jaguar_cpu_state *jaguar, UINT16 op);
164static void nop(jaguar_cpu_state *jaguar, UINT16 op);
165static void normi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
166static void not_rn(jaguar_cpu_state *jaguar, UINT16 op);
167static void or_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
168static void pack_rn(jaguar_cpu_state *jaguar, UINT16 op);      /* GPU only */
169static void resmac_rn(jaguar_cpu_state *jaguar, UINT16 op);
170static void ror_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
171static void rorq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
172static void sat8_rn(jaguar_cpu_state *jaguar, UINT16 op);      /* GPU only */
173static void sat16_rn(jaguar_cpu_state *jaguar, UINT16 op);      /* GPU only */
174static void sat16s_rn(jaguar_cpu_state *jaguar, UINT16 op);      /* DSP only */
175static void sat24_rn(jaguar_cpu_state *jaguar, UINT16 op);         /* GPU only */
176static void sat32s_rn(jaguar_cpu_state *jaguar, UINT16 op);      /* DSP only */
177static void sh_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
178static void sha_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
179static void sharq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
180static void shlq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
181static void shrq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
182static void store_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
183static void store_rn_r14n(jaguar_cpu_state *jaguar, UINT16 op);
184static void store_rn_r15n(jaguar_cpu_state *jaguar, UINT16 op);
185static void store_rn_r14rn(jaguar_cpu_state *jaguar, UINT16 op);
186static void store_rn_r15rn(jaguar_cpu_state *jaguar, UINT16 op);
187static void storeb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
188static void storew_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
189static void storep_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);   /* GPU only */
190static void sub_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
191static void subc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
192static void subq_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
193static void subqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op);   /* DSP only */
194static void subqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op);
195static void xor_rn_rn(jaguar_cpu_state *jaguar, UINT16 op);
197196
198static void (*const gpu_op_table[64])(jaguar_state *jaguar, UINT16 op) =
197static void (*const gpu_op_table[64])(jaguar_cpu_state *jaguar, UINT16 op) =
199198{
200199   /* 00-03 */   add_rn_rn,      addc_rn_rn,      addq_n_rn,      addqt_n_rn,
201200   /* 04-07 */   sub_rn_rn,      subc_rn_rn,      subq_n_rn,      subqt_n_rn,
r17907r17908
215214   /* 60-63 */   store_rn_r14rn,   store_rn_r15rn,   sat24_rn,      pack_rn
216215};
217216
218static void (*const dsp_op_table[64])(jaguar_state *jaguar, UINT16 op) =
217static void (*const dsp_op_table[64])(jaguar_cpu_state *jaguar, UINT16 op) =
219218{
220219   /* 00-03 */   add_rn_rn,      addc_rn_rn,      addq_n_rn,      addqt_n_rn,
221220   /* 04-07 */   sub_rn_rn,      subc_rn_rn,      subq_n_rn,      subqt_n_rn,
r17907r17908
249248    INLINE FUNCTIONS
250249***************************************************************************/
251250
252INLINE jaguar_state *get_safe_token(device_t *device)
251INLINE jaguar_cpu_state *get_safe_token(device_t *device)
253252{
254253   assert(device != NULL);
255254   assert(device->type() == JAGUARGPU ||
256255         device->type() == JAGUARDSP);
257   return (jaguar_state *)downcast<legacy_cpu_device *>(device)->token();
256   return (jaguar_cpu_state *)downcast<legacy_cpu_device *>(device)->token();
258257}
259258
260INLINE void update_register_banks(jaguar_state *jaguar)
259INLINE void update_register_banks(jaguar_cpu_state *jaguar)
261260{
262261   UINT32 temp;
263262   int i, bank;
r17907r17908
296295    IRQ HANDLING
297296***************************************************************************/
298297
299static void check_irqs(jaguar_state *jaguar)
298static void check_irqs(jaguar_cpu_state *jaguar)
300299{
301300   int bits, mask, which = 0;
302301
r17907r17908
339338}
340339
341340
342static void set_irq_line(jaguar_state *jaguar, int irqline, int state)
341static void set_irq_line(jaguar_cpu_state *jaguar, int irqline, int state)
343342{
344343   int mask = (irqline < 5) ? (0x40 << irqline) : 0x10000;
345344   jaguar->ctrl[G_CTRL] &= ~mask;
r17907r17908
399398}
400399
401400
402static void jaguar_postload(jaguar_state *jaguar)
401static void jaguar_postload(jaguar_cpu_state *jaguar)
403402{
404403   update_register_banks(jaguar);
405404   check_irqs(jaguar);
r17907r17908
409408static void init_common(int isdsp, legacy_cpu_device *device, device_irq_acknowledge_callback irqcallback)
410409{
411410   const jaguar_cpu_config *configdata = (const jaguar_cpu_config *)device->static_config();
412   jaguar_state *jaguar = get_safe_token(device);
411   jaguar_cpu_state *jaguar = get_safe_token(device);
413412
414413   init_tables();
415414
r17907r17908
445444
446445static CPU_RESET( jaguar )
447446{
448   jaguar_state *jaguar = get_safe_token(device);
447   jaguar_cpu_state *jaguar = get_safe_token(device);
449448
450449   jaguar->b0 = jaguar->r;
451450   jaguar->b1 = jaguar->a;
r17907r17908
474473
475474static CPU_EXECUTE( jaguargpu )
476475{
477   jaguar_state *jaguar = get_safe_token(device);
476   jaguar_cpu_state *jaguar = get_safe_token(device);
478477
479478   /* if we're halted, we shouldn't be here */
480479   if (!(jaguar->ctrl[G_CTRL] & 1))
r17907r17908
513512
514513static CPU_EXECUTE( jaguardsp )
515514{
516   jaguar_state *jaguar = get_safe_token(device);
515   jaguar_cpu_state *jaguar = get_safe_token(device);
517516
518517   /* if we're halted, we shouldn't be here */
519518   if (!(jaguar->ctrl[G_CTRL] & 1))
r17907r17908
556555    OPCODES
557556***************************************************************************/
558557
559void abs_rn(jaguar_state *jaguar, UINT16 op)
558void abs_rn(jaguar_cpu_state *jaguar, UINT16 op)
560559{
561560   int dreg = op & 31;
562561   UINT32 res = jaguar->r[dreg];
r17907r17908
569568   SET_Z(jaguar, res);
570569}
571570
572void add_rn_rn(jaguar_state *jaguar, UINT16 op)
571void add_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
573572{
574573   int dreg = op & 31;
575574   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
579578   CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res);
580579}
581580
582void addc_rn_rn(jaguar_state *jaguar, UINT16 op)
581void addc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
583582{
584583   int dreg = op & 31;
585584   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
589588   CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res);
590589}
591590
592void addq_n_rn(jaguar_state *jaguar, UINT16 op)
591void addq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
593592{
594593   int dreg = op & 31;
595594   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
599598   CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res);
600599}
601600
602void addqmod_n_rn(jaguar_state *jaguar, UINT16 op)   /* DSP only */
601void addqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op)   /* DSP only */
603602{
604603   int dreg = op & 31;
605604   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
610609   CLR_ZNC(jaguar); SET_ZNC_ADD(jaguar, r2, r1, res);
611610}
612611
613void addqt_n_rn(jaguar_state *jaguar, UINT16 op)
612void addqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
614613{
615614   int dreg = op & 31;
616615   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
619618   jaguar->r[dreg] = res;
620619}
621620
622void and_rn_rn(jaguar_state *jaguar, UINT16 op)
621void and_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
623622{
624623   int dreg = op & 31;
625624   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
629628   CLR_ZN(jaguar); SET_ZN(jaguar, res);
630629}
631630
632void bclr_n_rn(jaguar_state *jaguar, UINT16 op)
631void bclr_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
633632{
634633   int dreg = op & 31;
635634   UINT32 r1 = (op >> 5) & 31;
r17907r17908
639638   CLR_ZN(jaguar); SET_ZN(jaguar, res);
640639}
641640
642void bset_n_rn(jaguar_state *jaguar, UINT16 op)
641void bset_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
643642{
644643   int dreg = op & 31;
645644   UINT32 r1 = (op >> 5) & 31;
r17907r17908
649648   CLR_ZN(jaguar); SET_ZN(jaguar, res);
650649}
651650
652void btst_n_rn(jaguar_state *jaguar, UINT16 op)
651void btst_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
653652{
654653   UINT32 r1 = (op >> 5) & 31;
655654   UINT32 r2 = jaguar->r[op & 31];
656655   CLR_Z(jaguar); jaguar->FLAGS |= (~r2 >> r1) & 1;
657656}
658657
659void cmp_rn_rn(jaguar_state *jaguar, UINT16 op)
658void cmp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
660659{
661660   UINT32 r1 = jaguar->r[(op >> 5) & 31];
662661   UINT32 r2 = jaguar->r[op & 31];
r17907r17908
664663   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
665664}
666665
667void cmpq_n_rn(jaguar_state *jaguar, UINT16 op)
666void cmpq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
668667{
669668   UINT32 r1 = (INT8)(op >> 2) >> 3;
670669   UINT32 r2 = jaguar->r[op & 31];
r17907r17908
672671   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
673672}
674673
675void div_rn_rn(jaguar_state *jaguar, UINT16 op)
674void div_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
676675{
677676   int dreg = op & 31;
678677   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
694693      jaguar->r[dreg] = 0xffffffff;
695694}
696695
697void illegal(jaguar_state *jaguar, UINT16 op)
696void illegal(jaguar_cpu_state *jaguar, UINT16 op)
698697{
699698}
700699
701void imacn_rn_rn(jaguar_state *jaguar, UINT16 op)
700void imacn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
702701{
703702   UINT32 r1 = jaguar->r[(op >> 5) & 31];
704703   UINT32 r2 = jaguar->r[op & 31];
r17907r17908
706705   logerror("Unexpected IMACN instruction!\n");
707706}
708707
709void imult_rn_rn(jaguar_state *jaguar, UINT16 op)
708void imult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
710709{
711710   int dreg = op & 31;
712711   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
716715   CLR_ZN(jaguar); SET_ZN(jaguar, res);
717716}
718717
719void imultn_rn_rn(jaguar_state *jaguar, UINT16 op)
718void imultn_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
720719{
721720   int dreg = op & 31;
722721   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
741740   }
742741}
743742
744void jr_cc_n(jaguar_state *jaguar, UINT16 op)
743void jr_cc_n(jaguar_cpu_state *jaguar, UINT16 op)
745744{
746745   if (CONDITION(op & 31))
747746   {
r17907r17908
756755   }
757756}
758757
759void jump_cc_rn(jaguar_state *jaguar, UINT16 op)
758void jump_cc_rn(jaguar_cpu_state *jaguar, UINT16 op)
760759{
761760   if (CONDITION(op & 31))
762761   {
r17907r17908
773772   }
774773}
775774
776void load_rn_rn(jaguar_state *jaguar, UINT16 op)
775void load_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
777776{
778777   UINT32 r1 = jaguar->r[(op >> 5) & 31];
779778   jaguar->r[op & 31] = READLONG(jaguar, r1);
780779}
781780
782void load_r14n_rn(jaguar_state *jaguar, UINT16 op)
781void load_r14n_rn(jaguar_cpu_state *jaguar, UINT16 op)
783782{
784783   UINT32 r1 = convert_zero[(op >> 5) & 31];
785784   jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[14] + 4 * r1);
786785}
787786
788void load_r15n_rn(jaguar_state *jaguar, UINT16 op)
787void load_r15n_rn(jaguar_cpu_state *jaguar, UINT16 op)
789788{
790789   UINT32 r1 = convert_zero[(op >> 5) & 31];
791790   jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[15] + 4 * r1);
792791}
793792
794void load_r14rn_rn(jaguar_state *jaguar, UINT16 op)
793void load_r14rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
795794{
796795   UINT32 r1 = jaguar->r[(op >> 5) & 31];
797796   jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[14] + r1);
798797}
799798
800void load_r15rn_rn(jaguar_state *jaguar, UINT16 op)
799void load_r15rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
801800{
802801   UINT32 r1 = jaguar->r[(op >> 5) & 31];
803802   jaguar->r[op & 31] = READLONG(jaguar, jaguar->r[15] + r1);
804803}
805804
806void loadb_rn_rn(jaguar_state *jaguar, UINT16 op)
805void loadb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
807806{
808807   UINT32 r1 = jaguar->r[(op >> 5) & 31];
809808   jaguar->r[op & 31] = READBYTE(jaguar, r1);
810809}
811810
812void loadw_rn_rn(jaguar_state *jaguar, UINT16 op)
811void loadw_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
813812{
814813   UINT32 r1 = jaguar->r[(op >> 5) & 31];
815814   jaguar->r[op & 31] = READWORD(jaguar, r1);
816815}
817816
818void loadp_rn_rn(jaguar_state *jaguar, UINT16 op)   /* GPU only */
817void loadp_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)   /* GPU only */
819818{
820819   UINT32 r1 = jaguar->r[(op >> 5) & 31];
821820   jaguar->ctrl[G_HIDATA] = READWORD(jaguar, r1);
822821   jaguar->r[op & 31] = READWORD(jaguar, r1+4);
823822}
824823
825void mirror_rn(jaguar_state *jaguar, UINT16 op)   /* DSP only */
824void mirror_rn(jaguar_cpu_state *jaguar, UINT16 op)   /* DSP only */
826825{
827826   int dreg = op & 31;
828827   UINT32 r1 = jaguar->r[dreg];
r17907r17908
831830   CLR_ZN(jaguar); SET_ZN(jaguar, res);
832831}
833832
834void mmult_rn_rn(jaguar_state *jaguar, UINT16 op)
833void mmult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
835834{
836835   int count = jaguar->ctrl[G_MTXC] & 15, i;
837836   int sreg = (op >> 5) & 31;
r17907r17908
860859   CLR_ZN(jaguar); SET_ZN(jaguar, res);
861860}
862861
863void move_rn_rn(jaguar_state *jaguar, UINT16 op)
862void move_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
864863{
865864   jaguar->r[op & 31] = jaguar->r[(op >> 5) & 31];
866865}
867866
868void move_pc_rn(jaguar_state *jaguar, UINT16 op)
867void move_pc_rn(jaguar_cpu_state *jaguar, UINT16 op)
869868{
870869   jaguar->r[op & 31] = jaguar->ppc;
871870}
872871
873void movefa_rn_rn(jaguar_state *jaguar, UINT16 op)
872void movefa_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
874873{
875874   jaguar->r[op & 31] = jaguar->a[(op >> 5) & 31];
876875}
877876
878void movei_n_rn(jaguar_state *jaguar, UINT16 op)
877void movei_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
879878{
880879   UINT32 res = ROPCODE(jaguar, jaguar->PC) | (ROPCODE(jaguar, jaguar->PC + 2) << 16);
881880   jaguar->PC += 4;
882881   jaguar->r[op & 31] = res;
883882}
884883
885void moveq_n_rn(jaguar_state *jaguar, UINT16 op)
884void moveq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
886885{
887886   jaguar->r[op & 31] = (op >> 5) & 31;
888887}
889888
890void moveta_rn_rn(jaguar_state *jaguar, UINT16 op)
889void moveta_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
891890{
892891   jaguar->a[op & 31] = jaguar->r[(op >> 5) & 31];
893892}
894893
895void mtoi_rn_rn(jaguar_state *jaguar, UINT16 op)
894void mtoi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
896895{
897896   UINT32 r1 = jaguar->r[(op >> 5) & 31];
898897   jaguar->r[op & 31] = (((INT32)r1 >> 8) & 0xff800000) | (r1 & 0x007fffff);
899898}
900899
901void mult_rn_rn(jaguar_state *jaguar, UINT16 op)
900void mult_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
902901{
903902   int dreg = op & 31;
904903   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
908907   CLR_ZN(jaguar); SET_ZN(jaguar, res);
909908}
910909
911void neg_rn(jaguar_state *jaguar, UINT16 op)
910void neg_rn(jaguar_cpu_state *jaguar, UINT16 op)
912911{
913912   int dreg = op & 31;
914913   UINT32 r2 = jaguar->r[dreg];
r17907r17908
917916   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, 0, r2, res);
918917}
919918
920void nop(jaguar_state *jaguar, UINT16 op)
919void nop(jaguar_cpu_state *jaguar, UINT16 op)
921920{
922921}
923922
924void normi_rn_rn(jaguar_state *jaguar, UINT16 op)
923void normi_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
925924{
926925   UINT32 r1 = jaguar->r[(op >> 5) & 31];
927926   UINT32 res = 0;
r17907r17908
942941   CLR_ZN(jaguar); SET_ZN(jaguar, res);
943942}
944943
945void not_rn(jaguar_state *jaguar, UINT16 op)
944void not_rn(jaguar_cpu_state *jaguar, UINT16 op)
946945{
947946   int dreg = op & 31;
948947   UINT32 res = ~jaguar->r[dreg];
r17907r17908
950949   CLR_ZN(jaguar); SET_ZN(jaguar, res);
951950}
952951
953void or_rn_rn(jaguar_state *jaguar, UINT16 op)
952void or_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
954953{
955954   int dreg = op & 31;
956955   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
960959   CLR_ZN(jaguar); SET_ZN(jaguar, res);
961960}
962961
963void pack_rn(jaguar_state *jaguar, UINT16 op)      /* GPU only */
962void pack_rn(jaguar_cpu_state *jaguar, UINT16 op)      /* GPU only */
964963{
965964   int dreg = op & 31;
966965   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
974973   CLR_ZN(jaguar); SET_ZN(jaguar, res);
975974}
976975
977void resmac_rn(jaguar_state *jaguar, UINT16 op)
976void resmac_rn(jaguar_cpu_state *jaguar, UINT16 op)
978977{
979978   jaguar->r[op & 31] = (UINT32)jaguar->accum;
980979}
981980
982void ror_rn_rn(jaguar_state *jaguar, UINT16 op)
981void ror_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
983982{
984983   int dreg = op & 31;
985984   UINT32 r1 = jaguar->r[(op >> 5) & 31] & 31;
r17907r17908
989988   CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2;
990989}
991990
992void rorq_n_rn(jaguar_state *jaguar, UINT16 op)
991void rorq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
993992{
994993   int dreg = op & 31;
995994   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
999998   CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2;
1000999}
10011000
1002void sat8_rn(jaguar_state *jaguar, UINT16 op)      /* GPU only */
1001void sat8_rn(jaguar_cpu_state *jaguar, UINT16 op)      /* GPU only */
10031002{
10041003   int dreg = op & 31;
10051004   INT32 r2 = jaguar->r[dreg];
r17907r17908
10081007   CLR_ZN(jaguar); SET_ZN(jaguar, res);
10091008}
10101009
1011void sat16_rn(jaguar_state *jaguar, UINT16 op)      /* GPU only */
1010void sat16_rn(jaguar_cpu_state *jaguar, UINT16 op)      /* GPU only */
10121011{
10131012   int dreg = op & 31;
10141013   INT32 r2 = jaguar->r[dreg];
r17907r17908
10171016   CLR_ZN(jaguar); SET_ZN(jaguar, res);
10181017}
10191018
1020void sat16s_rn(jaguar_state *jaguar, UINT16 op)      /* DSP only */
1019void sat16s_rn(jaguar_cpu_state *jaguar, UINT16 op)      /* DSP only */
10211020{
10221021   int dreg = op & 31;
10231022   INT32 r2 = jaguar->r[dreg];
r17907r17908
10261025   CLR_ZN(jaguar); SET_ZN(jaguar, res);
10271026}
10281027
1029void sat24_rn(jaguar_state *jaguar, UINT16 op)         /* GPU only */
1028void sat24_rn(jaguar_cpu_state *jaguar, UINT16 op)         /* GPU only */
10301029{
10311030   int dreg = op & 31;
10321031   INT32 r2 = jaguar->r[dreg];
r17907r17908
10351034   CLR_ZN(jaguar); SET_ZN(jaguar, res);
10361035}
10371036
1038void sat32s_rn(jaguar_state *jaguar, UINT16 op)      /* DSP only */
1037void sat32s_rn(jaguar_cpu_state *jaguar, UINT16 op)      /* DSP only */
10391038{
10401039   int dreg = op & 31;
10411040   INT32 r2 = (UINT32)jaguar->r[dreg];
r17907r17908
10451044   CLR_ZN(jaguar); SET_ZN(jaguar, res);
10461045}
10471046
1048void sh_rn_rn(jaguar_state *jaguar, UINT16 op)
1047void sh_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
10491048{
10501049   int dreg = op & 31;
10511050   INT32 r1 = (INT32)jaguar->r[(op >> 5) & 31];
r17907r17908
10671066   SET_ZN(jaguar, res);
10681067}
10691068
1070void sha_rn_rn(jaguar_state *jaguar, UINT16 op)
1069void sha_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
10711070{
10721071   int dreg = op & 31;
10731072   INT32 r1 = (INT32)jaguar->r[(op >> 5) & 31];
r17907r17908
10891088   SET_ZN(jaguar, res);
10901089}
10911090
1092void sharq_n_rn(jaguar_state *jaguar, UINT16 op)
1091void sharq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
10931092{
10941093   int dreg = op & 31;
10951094   INT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
10991098   CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 << 1) & 2;
11001099}
11011100
1102void shlq_n_rn(jaguar_state *jaguar, UINT16 op)
1101void shlq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
11031102{
11041103   int dreg = op & 31;
11051104   INT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
11091108   CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 >> 30) & 2;
11101109}
11111110
1112void shrq_n_rn(jaguar_state *jaguar, UINT16 op)
1111void shrq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
11131112{
11141113   int dreg = op & 31;
11151114   INT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
11191118   CLR_ZNC(jaguar); SET_ZN(jaguar, res); jaguar->FLAGS |= (r2 << 1) & 2;
11201119}
11211120
1122void store_rn_rn(jaguar_state *jaguar, UINT16 op)
1121void store_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
11231122{
11241123   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11251124   WRITELONG(jaguar, r1, jaguar->r[op & 31]);
11261125}
11271126
1128void store_rn_r14n(jaguar_state *jaguar, UINT16 op)
1127void store_rn_r14n(jaguar_cpu_state *jaguar, UINT16 op)
11291128{
11301129   UINT32 r1 = convert_zero[(op >> 5) & 31];
11311130   WRITELONG(jaguar, jaguar->r[14] + r1 * 4, jaguar->r[op & 31]);
11321131}
11331132
1134void store_rn_r15n(jaguar_state *jaguar, UINT16 op)
1133void store_rn_r15n(jaguar_cpu_state *jaguar, UINT16 op)
11351134{
11361135   UINT32 r1 = convert_zero[(op >> 5) & 31];
11371136   WRITELONG(jaguar, jaguar->r[15] + r1 * 4, jaguar->r[op & 31]);
11381137}
11391138
1140void store_rn_r14rn(jaguar_state *jaguar, UINT16 op)
1139void store_rn_r14rn(jaguar_cpu_state *jaguar, UINT16 op)
11411140{
11421141   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11431142   WRITELONG(jaguar, jaguar->r[14] + r1, jaguar->r[op & 31]);
11441143}
11451144
1146void store_rn_r15rn(jaguar_state *jaguar, UINT16 op)
1145void store_rn_r15rn(jaguar_cpu_state *jaguar, UINT16 op)
11471146{
11481147   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11491148   WRITELONG(jaguar, jaguar->r[15] + r1, jaguar->r[op & 31]);
11501149}
11511150
1152void storeb_rn_rn(jaguar_state *jaguar, UINT16 op)
1151void storeb_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
11531152{
11541153   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11551154   WRITEBYTE(jaguar, r1, jaguar->r[op & 31]);
11561155}
11571156
1158void storew_rn_rn(jaguar_state *jaguar, UINT16 op)
1157void storew_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
11591158{
11601159   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11611160   WRITEWORD(jaguar, r1, jaguar->r[op & 31]);
11621161}
11631162
1164void storep_rn_rn(jaguar_state *jaguar, UINT16 op)   /* GPU only */
1163void storep_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)   /* GPU only */
11651164{
11661165   UINT32 r1 = jaguar->r[(op >> 5) & 31];
11671166   WRITELONG(jaguar, r1, jaguar->ctrl[G_HIDATA]);
11681167   WRITELONG(jaguar, r1+4, jaguar->r[op & 31]);
11691168}
11701169
1171void sub_rn_rn(jaguar_state *jaguar, UINT16 op)
1170void sub_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
11721171{
11731172   int dreg = op & 31;
11741173   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
11781177   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
11791178}
11801179
1181void subc_rn_rn(jaguar_state *jaguar, UINT16 op)
1180void subc_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
11821181{
11831182   int dreg = op & 31;
11841183   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
11881187   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
11891188}
11901189
1191void subq_n_rn(jaguar_state *jaguar, UINT16 op)
1190void subq_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
11921191{
11931192   int dreg = op & 31;
11941193   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
11981197   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
11991198}
12001199
1201void subqmod_n_rn(jaguar_state *jaguar, UINT16 op)   /* DSP only */
1200void subqmod_n_rn(jaguar_cpu_state *jaguar, UINT16 op)   /* DSP only */
12021201{
12031202   int dreg = op & 31;
12041203   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
12091208   CLR_ZNC(jaguar); SET_ZNC_SUB(jaguar, r2, r1, res);
12101209}
12111210
1212void subqt_n_rn(jaguar_state *jaguar, UINT16 op)
1211void subqt_n_rn(jaguar_cpu_state *jaguar, UINT16 op)
12131212{
12141213   int dreg = op & 31;
12151214   UINT32 r1 = convert_zero[(op >> 5) & 31];
r17907r17908
12181217   jaguar->r[dreg] = res;
12191218}
12201219
1221void xor_rn_rn(jaguar_state *jaguar, UINT16 op)
1220void xor_rn_rn(jaguar_cpu_state *jaguar, UINT16 op)
12221221{
12231222   int dreg = op & 31;
12241223   UINT32 r1 = jaguar->r[(op >> 5) & 31];
r17907r17908
12361235
12371236UINT32 jaguargpu_ctrl_r(device_t *device, offs_t offset)
12381237{
1239   jaguar_state *jaguar = get_safe_token(device);
1238   jaguar_cpu_state *jaguar = get_safe_token(device);
12401239
12411240   if (LOG_GPU_IO) logerror("GPU read register @ F021%02X\n", offset * 4);
12421241
r17907r17908
12461245
12471246void jaguargpu_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask)
12481247{
1249   jaguar_state *jaguar = get_safe_token(device);
1248   jaguar_cpu_state *jaguar = get_safe_token(device);
12501249   UINT32 oldval, newval;
12511250
12521251   if (LOG_GPU_IO && offset != G_HIDATA)
r17907r17908
13321331
13331332UINT32 jaguardsp_ctrl_r(device_t *device, offs_t offset)
13341333{
1335   jaguar_state *jaguar = get_safe_token(device);
1334   jaguar_cpu_state *jaguar = get_safe_token(device);
13361335
13371336   if (LOG_DSP_IO && offset != D_FLAGS)
13381337      logerror("DSP read register @ F1A1%02X\n", offset * 4);
r17907r17908
13441343
13451344void jaguardsp_ctrl_w(device_t *device, offs_t offset, UINT32 data, UINT32 mem_mask)
13461345{
1347   jaguar_state *jaguar = get_safe_token(device);
1346   jaguar_cpu_state *jaguar = get_safe_token(device);
13481347   UINT32 oldval, newval;
13491348
13501349   if (LOG_DSP_IO && offset != D_FLAGS)
r17907r17908
14311430
14321431static CPU_SET_INFO( jaguargpu )
14331432{
1434   jaguar_state *jaguar = get_safe_token(device);
1433   jaguar_cpu_state *jaguar = get_safe_token(device);
14351434   switch (state)
14361435   {
14371436      /* --- the following bits of info are set as 64-bit signed integers --- */
r17907r17908
14891488
14901489CPU_GET_INFO( jaguargpu )
14911490{
1492   jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
1491   jaguar_cpu_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
14931492   switch (state)
14941493   {
14951494      /* --- the following bits of info are returned as 64-bit signed integers --- */
1496      case CPUINFO_INT_CONTEXT_SIZE:               info->i = sizeof(jaguar_state);                  break;
1495      case CPUINFO_INT_CONTEXT_SIZE:               info->i = sizeof(jaguar_cpu_state);                  break;
14971496      case CPUINFO_INT_INPUT_LINES:               info->i = 5;                              break;
14981497      case CPUINFO_INT_DEFAULT_IRQ_VECTOR:         info->i = 0;                              break;
14991498      case CPUINFO_INT_ENDIANNESS:               info->i = ENDIANNESS_BIG;                        break;
r17907r17908
16281627
16291628static CPU_SET_INFO( jaguardsp )
16301629{
1631   jaguar_state *jaguar = get_safe_token(device);
1630   jaguar_cpu_state *jaguar = get_safe_token(device);
16321631   switch (state)
16331632   {
16341633      /* --- the following bits of info are set as 64-bit signed integers --- */
r17907r17908
16421641
16431642CPU_GET_INFO( jaguardsp )
16441643{
1645   jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
1644   jaguar_cpu_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
16461645   switch (state)
16471646   {
16481647      /* --- the following bits of info are returned as 64-bit signed integers --- */
trunk/src/emu/cpu/psx/sio.h
r17907r17908
4141#define SIO_CONTROL_DSR_IENA ( 1 << 12 )
4242#define SIO_CONTROL_DTR ( 1 << 13 )
4343
44typedef struct _psx_sio psx_sio;
45struct _psx_sio
44struct psx_sio
4645{
4746   UINT32 n_status;
4847   UINT32 n_mode;
trunk/src/emu/cpu/psx/dma.h
r17907r17908
1717typedef delegate<void (UINT32, INT32)> psx_dma_read_delegate;
1818typedef delegate<void (UINT32, INT32)> psx_dma_write_delegate;
1919
20typedef struct _psx_dma_channel psx_dma_channel;
21struct _psx_dma_channel
20struct psx_dma_channel
2221{
2322   UINT32 n_base;
2423   UINT32 n_blockcontrol;
trunk/src/emu/cpu/psx/rcnt.h
r17907r17908
2323#define PSX_RC_CLC ( 0x100 )
2424#define PSX_RC_DIV ( 0x200 )
2525
26typedef struct _psx_root psx_root;
27struct _psx_root
26struct psx_root
2827{
2928   emu_timer *timer;
3029   UINT16 n_count;
trunk/src/emu/cpu/i8085/i8085.h
r17907r17908
3636    TYPE DEFINITIONS
3737***************************************************************************/
3838
39typedef struct _i8085_config i8085_config;
40struct _i8085_config
39struct i8085_config
4140{
4241   devcb_write8      out_status_func;   /* STATUS changed callback */
4342   devcb_write_line   out_inte_func;      /* INTE changed callback */
trunk/src/emu/cpu/i8085/i8085.c
r17907r17908
157157    TYPE DEFINITIONS
158158***************************************************************************/
159159
160typedef struct _i8085_state i8085_state;
161struct _i8085_state
160struct i8085_state
162161{
163162   i8085_config      config;
164163
trunk/src/emu/cpu/powerpc/ppcdrc.c
r17907r17908
129129***************************************************************************/
130130
131131/* fast RAM info */
132typedef struct _fast_ram_info fast_ram_info;
133struct _fast_ram_info
132struct fast_ram_info
134133{
135134   offs_t            start;                  /* start of the RAM block */
136135   offs_t            end;                  /* end of the RAM block */
r17907r17908
140139
141140
142141/* hotspot info */
143typedef struct _hotspot_info hotspot_info;
144struct _hotspot_info
142struct hotspot_info
145143{
146144   offs_t            pc;                     /* PC to consider */
147145   UINT32            opcode;                  /* required opcode at that PC */
r17907r17908
150148
151149
152150/* internal compiler state */
153typedef struct _compiler_state compiler_state;
154struct _compiler_state
151struct compiler_state
155152{
156153   UINT32            cycles;                  /* accumulated cycles */
157154   UINT8            checkints;               /* need to check interrupts before next instruction */
trunk/src/emu/cpu/powerpc/ppccom.h
r17907r17908
491491***************************************************************************/
492492
493493/* PowerPC 4XX-specific serial port state */
494typedef struct _ppc4xx_spu_state ppc4xx_spu_state;
495struct _ppc4xx_spu_state
494struct ppc4xx_spu_state
496495{
497496   UINT8         regs[9];
498497   UINT8         txbuf;
r17907r17908
509508
510509
511510/* PowerPC state */
512typedef struct _powerpc_state powerpc_state;
513struct _powerpc_state
511struct powerpc_state
514512{
515513   /* core registers */
516514   UINT32         pc;
trunk/src/emu/cpu/powerpc/ppc.h
r17907r17908
164164
165165typedef void (*ppc4xx_spu_tx_handler)(device_t *device, UINT8 data);
166166
167typedef struct _powerpc_config powerpc_config;
168struct _powerpc_config
167struct powerpc_config
169168{
170169   UINT32      bus_frequency;
171170   read32_device_func   dcr_read_func;
trunk/src/emu/cpu/tms32010/tms32010.c
r17907r17908
114114}
115115
116116/* opcode table entry */
117typedef struct _tms32010_opcode tms32010_opcode;
118struct _tms32010_opcode
117struct tms32010_opcode
119118{
120119   UINT8   cycles;
121120   void   (*function)(tms32010_state *);
trunk/src/emu/cpu/sm8500/sm8500.c
r17907r17908
3030#define FLAG_B   0x02
3131#define FLAG_I   0x01
3232
33typedef struct _sm8500_state sm8500_state;
34struct _sm8500_state
33struct sm8500_state
3534{
3635   SM8500_CONFIG config;
3736   UINT16 PC;
trunk/src/emu/cpu/sh2/sh2comn.h
r17907r17908
2626
2727#define SH2_CODE_XOR(a)      ((a) ^ NATIVE_ENDIAN_VALUE_LE_BE(2,0))
2828
29typedef struct _irq_entry irq_entry;
30struct _irq_entry
29struct irq_entry
3130{
3231   int irq_vector;
3332   int irq_priority;
trunk/src/emu/cpu/sh2/sh2.h
r17907r17908
5757   SH2_R8, SH2_R9, SH2_R10, SH2_R11, SH2_R12, SH2_R13, SH2_R14, SH2_R15, SH2_EA
5858};
5959
60typedef struct _sh2_cpu_core sh2_cpu_core;
61struct _sh2_cpu_core
60struct sh2_cpu_core
6261{
6362   int is_slave;
6463   int  (*dma_callback_kludge)(device_t *device, UINT32 src, UINT32 dst, UINT32 data, int size);
trunk/src/emu/cpu/sh2/sh2drc.c
r17907r17908
8989***************************************************************************/
9090
9191/* internal compiler state */
92typedef struct _compiler_state compiler_state;
93struct _compiler_state
92struct compiler_state
9493{
9594   UINT32         cycles;                  /* accumulated cycles */
9695   UINT8         checkints;               /* need to check interrupts before next instruction */
trunk/src/emu/cpu/mn10200/mn10200.c
r17907r17908
2222
2323extern int mn102_disassemble(char *buffer, UINT32 pc, const UINT8 *oprom);
2424
25typedef struct _mn102_info mn102_info;
26struct _mn102_info
25struct mn102_info
2726{
2827   // The UINT32s are really UINT24
2928   UINT32 pc;
trunk/src/emu/cpu/tms32051/tms32051.c
r17907r17908
7979   UINT16 pm;
8080} ST1;
8181
82typedef struct _tms32051_state tms32051_state;
83struct _tms32051_state
82struct tms32051_state
8483{
8584   UINT16 pc;
8685   UINT16 op;
trunk/src/emu/cpu/mb88xx/mb88xx.c
r17907r17908
3737    STRUCTURES & TYPEDEFS
3838***************************************************************************/
3939
40typedef struct _mb88_state mb88_state;
41struct _mb88_state
40struct mb88_state
4241{
4342   UINT8   PC;    /* Program Counter: 6 bits */
4443   UINT8   PA;    /* Page Address: 4 bits */
trunk/src/emu/cpu/mb88xx/mb88xx.h
r17907r17908
5454    CONFIG STRUCTURE
5555***************************************************************************/
5656
57typedef struct _mb88_cpu_core mb88_cpu_core;
58struct _mb88_cpu_core
57struct mb88_cpu_core
5958{
6059   UINT8      *PLA_config;      /* PLA configuration (32 byte values), if NULL assume direct output */
6160};
trunk/src/emu/cpu/alph8201/alph8201.c
r17907r17908
170170#define M_RDOP(A)      cpustate->direct->read_decrypted_byte(A)
171171#define M_RDOP_ARG(A)   cpustate->direct->read_raw_byte(A)
172172
173typedef struct _alpha8201_state alpha8201_state;
174struct _alpha8201_state
173struct alpha8201_state
175174{
176175   UINT8 RAM[8*8];  /* internal GP register 8 * 8bank       */
177176   unsigned PREVPC;
trunk/src/emu/cpu/g65816/g65816cm.h
r17907r17908
6767/* ======================================================================== */
6868
6969/* CPU Structure */
70typedef struct _g65816i_cpu_struct g65816i_cpu_struct;
71struct _g65816i_cpu_struct
70struct g65816i_cpu_struct
7271{
7372   uint a;            /* Accumulator */
7473   uint b;            /* holds high byte of accumulator */
trunk/src/emu/cpu/apexc/apexc.c
r17907r17908
343343
344344#define apexc_readop(address)   apexc_readmem(address)
345345
346typedef struct _apexc_state apexc_state;
347struct _apexc_state
346struct apexc_state
348347{
349348   UINT32 a;   /* accumulator */
350349   UINT32 r;   /* register */
trunk/src/emu/cpu/nec/v25priv.h
r17907r17908
6666   UINT8  b[256];
6767} internalram;
6868
69typedef struct _v25_state_t v25_state_t;
70struct _v25_state_t
69struct v25_state_t
7170{
7271   internalram ram;
7372   offs_t   fetch_xor;
trunk/src/emu/cpu/nec/necdasm.c
r17907r17908
77
88#include "emu.h"
99
10typedef struct _nec_config nec_config;
11struct _nec_config
10struct nec_config
1211{
1312   const UINT8*   v25v35_decryptiontable; // internal decryption table
1413};
trunk/src/emu/cpu/nec/nec.h
r17907r17908
1/* ASG 971222 -- rewrote this interface */
2#ifndef __NEC_H_
3#define __NEC_H_
4 
5 
6typedef struct _nec_config nec_config;
7struct _nec_config
8{
9   const UINT8*   v25v35_decryptiontable; // internal decryption table
10};
11 
12#define NEC_INPUT_LINE_INTP0 10
13#define NEC_INPUT_LINE_INTP1 11
14#define NEC_INPUT_LINE_INTP2 12
15#define NEC_INPUT_LINE_POLL 20
16 
17#define V25_PORT_P0 0x10000
18#define V25_PORT_P1 0x10002
19#define V25_PORT_P2 0x10004
20#define V25_PORT_PT 0x10006
21 
22enum
23{
24   NEC_PC=0,
25   NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY,
26   NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS,
27   NEC_PENDING
28};
29 
30/* Public functions */
31DECLARE_LEGACY_CPU_DEVICE(V20, v20);
32DECLARE_LEGACY_CPU_DEVICE(V25, v25);
33DECLARE_LEGACY_CPU_DEVICE(V30, v30);
34DECLARE_LEGACY_CPU_DEVICE(V33, v33);
35DECLARE_LEGACY_CPU_DEVICE(V35, v35);
36 
37#endif
1/* ASG 971222 -- rewrote this interface */
2#ifndef __NEC_H_
3#define __NEC_H_
4
5
6struct nec_config
7{
8   const UINT8*   v25v35_decryptiontable; // internal decryption table
9};
10
11#define NEC_INPUT_LINE_INTP0 10
12#define NEC_INPUT_LINE_INTP1 11
13#define NEC_INPUT_LINE_INTP2 12
14#define NEC_INPUT_LINE_POLL 20
15
16#define V25_PORT_P0 0x10000
17#define V25_PORT_P1 0x10002
18#define V25_PORT_P2 0x10004
19#define V25_PORT_PT 0x10006
20
21enum
22{
23   NEC_PC=0,
24   NEC_IP, NEC_AW, NEC_CW, NEC_DW, NEC_BW, NEC_SP, NEC_BP, NEC_IX, NEC_IY,
25   NEC_FLAGS, NEC_ES, NEC_CS, NEC_SS, NEC_DS,
26   NEC_PENDING
27};
28
29/* Public functions */
30DECLARE_LEGACY_CPU_DEVICE(V20, v20);
31DECLARE_LEGACY_CPU_DEVICE(V25, v25);
32DECLARE_LEGACY_CPU_DEVICE(V30, v30);
33DECLARE_LEGACY_CPU_DEVICE(V33, v33);
34DECLARE_LEGACY_CPU_DEVICE(V35, v35);
35
36#endif
trunk/src/emu/cpu/nec/necpriv.h
r17907r17908
3333    UINT8  b[16];   /* or as 8 bit registers */
3434} necbasicregs;
3535
36typedef struct _nec_state_t nec_state_t;
37struct _nec_state_t
36struct nec_state_t
3837{
3938   necbasicregs regs;
4039   offs_t   fetch_xor;
trunk/src/emu/cpu/mips/mips3com.h
r17907r17908
167167***************************************************************************/
168168
169169/* MIPS3 TLB entry */
170typedef struct _mips3_tlb_entry mips3_tlb_entry;
171struct _mips3_tlb_entry
170struct mips3_tlb_entry
172171{
173172   UINT64         page_mask;
174173   UINT64         entry_hi;
r17907r17908
181180
182181
183182/* MIPS3 state */
184typedef struct _mips3_state mips3_state;
185struct _mips3_state
183struct mips3_state
186184{
187185   /* core registers */
188186   UINT32         pc;
trunk/src/emu/cpu/mips/mips3.h
r17907r17908
210210    STRUCTURES
211211***************************************************************************/
212212
213typedef struct _mips3_config mips3_config;
214struct _mips3_config
213struct mips3_config
215214{
216215   size_t      icache;                     /* code cache size */
217216   size_t      dcache;                     /* data cache size */
trunk/src/emu/cpu/mips/mips3drc.c
r17907r17908
150150***************************************************************************/
151151
152152/* fast RAM info */
153typedef struct _fast_ram_info fast_ram_info;
154struct _fast_ram_info
153struct fast_ram_info
155154{
156155   offs_t            start;                  /* start of the RAM block */
157156   offs_t            end;                  /* end of the RAM block */
r17907r17908
161160
162161
163162/* hotspot info */
164typedef struct _hotspot_info hotspot_info;
165struct _hotspot_info
163struct hotspot_info
166164{
167165   offs_t            pc;                     /* PC to consider */
168166   UINT32            opcode;                  /* required opcode at that PC */
r17907r17908
171169
172170
173171/* internal compiler state */
174typedef struct _compiler_state compiler_state;
175struct _compiler_state
172struct compiler_state
176173{
177174   UINT32            cycles;                  /* accumulated cycles */
178175   UINT8            checkints;               /* need to check interrupts before next instruction */
trunk/src/emu/cpu/mips/r3000.c
r17907r17908
116116***************************************************************************/
117117
118118/* R3000 Registers */
119typedef struct _r3000_state r3000_state;
120struct _r3000_state
119struct r3000_state
121120{
122121   /* core registers */
123122   UINT32      pc;
trunk/src/emu/cpu/mips/r3000.h
r17907r17908
4646    STRUCTURES
4747***************************************************************************/
4848
49typedef struct _r3000_cpu_core r3000_cpu_core;
50struct _r3000_cpu_core
49struct r3000_cpu_core
5150{
5251   UINT8      hasfpu;         /* 1 if we have an FPU, 0 otherwise */
5352   size_t      icache;         /* code cache size */
trunk/src/emu/cpu/z80/z80.c
r17907r17908
142142/* The Z80 registers. halt is set to 1 when the CPU is halted, the refresh  */
143143/* register is calculated as follows: refresh=(r&127)|(r2&128)    */
144144/****************************************************************************/
145typedef struct _z80_state z80_state;
146struct _z80_state
145struct z80_state
147146{
148147   PAIR         prvpc,pc,sp,af,bc,de,hl,ix,iy,wz;
149148   PAIR         af2,bc2,de2,hl2;
trunk/src/emu/cpu/esrip/esrip.h
r17907r17908
8080/***************************************************************************
8181    CONFIGURATION STRUCTURE
8282***************************************************************************/
83typedef struct _esrip_config_ esrip_config;
84struct _esrip_config_
83struct esrip_config
8584{
8685   read16_device_func   fdt_r;
8786   write16_device_func   fdt_w;
trunk/src/emu/cpu/pps4/pps4.c
r17907r17908
1919    TYPE DEFINITIONS
2020***************************************************************************/
2121
22typedef struct _pps4_state pps4_state;
23struct _pps4_state
22struct pps4_state
2423{
2524   UINT8   A; // Accumulator
2625   UINT8   X;
trunk/src/emu/cpu/i960/i960.c
r17907r17908
1616
1717enum { RCACHE_SIZE = 4 };
1818
19typedef struct _i960_state_t i960_state_t;
20struct _i960_state_t {
19struct i960_state_t {
2120   UINT32 r[0x20];
2221   UINT32 rcache[RCACHE_SIZE][0x10];
2322   UINT32 rcache_frame_addr[RCACHE_SIZE];
trunk/src/emu/cpu/i960/i960dis.h
r17907r17908
11#ifndef __I960DIS_H__
22#define __I960DIS_H__
33
4typedef struct _disassemble_t disassemble_t;
5struct _disassemble_t
4struct disassemble_t
65{
76   char      *buffer;   // output buffer
87   unsigned long   IP;
trunk/src/emu/cpu/v810/v810.c
r17907r17908
3131#define clkIF 3
3232#define clkMEM 3
3333
34typedef struct _v810_state v810_state;
35struct _v810_state
34struct v810_state
3635{
3736   UINT32 reg[65];
3837   UINT8 irq_line;
trunk/src/emu/cpu/tms32025/tms32025.c
r17907r17908
192192}
193193
194194/* opcode table entry */
195typedef struct _tms32025_opcode tms32025_opcode;
196struct _tms32025_opcode
195struct tms32025_opcode
197196{
198197   UINT8   cycles;
199198   void   (*function)(tms32025_state *);
trunk/src/emu/cpu/z8/z8.c
r17907r17908
156156    TYPE DEFINITIONS
157157***************************************************************************/
158158
159typedef struct _z8_state z8_state;
160struct _z8_state
159struct z8_state
161160{
162161    address_space *program;
163162    direct_read_data *direct;
r17907r17908
541540
542541typedef void (*z8_opcode_func) (z8_state *cpustate, UINT8 opcode, int *cycles);
543542
544typedef struct _z8_opcode_map z8_opcode_map;
545struct _z8_opcode_map
543struct z8_opcode_map
546544{
547545   z8_opcode_func   function;
548546   int            execution_cycles;
trunk/src/emu/cpu/pic16c5x/pic16c5x.c
r17907r17908
6767
6868
6969
70typedef struct _pic16c5x_state pic16c5x_state;
71struct _pic16c5x_state
70struct pic16c5x_state
7271{
7372   /******************** CPU Internal Registers *******************/
7473   UINT16   PC;
r17907r17908
117116
118117
119118/* opcode table entry */
120typedef struct _pic16c5x_opcode pic16c5x_opcode;
121struct _pic16c5x_opcode
119struct pic16c5x_opcode
122120{
123121   UINT8   cycles;
124122   void   (*function)(pic16c5x_state *);
trunk/src/emu/cpu/pdp1/tx0.h
r17907r17908
2323#define tx0_pulse_reset(cpudevice)         (cpudevice)->state().set_state_int(TX0_RESET, 0)
2424#define tx0_pulse_io_complete(cpudevice)   (cpudevice)->state().set_state_int(TX0_IO_COMPLETE, 0)
2525
26typedef struct _tx0_reset_param_t tx0_reset_param_t;
27struct _tx0_reset_param_t
26struct tx0_reset_param_t
2827{
2928   /* 8 standard I/O handlers:
3029        0: cpy (8kW only)
trunk/src/emu/cpu/pdp1/pdp1.c
r17907r17908
348348
349349
350350/* PDP1 Registers */
351typedef struct _pdp1_state pdp1_state;
352struct _pdp1_state
351struct pdp1_state
353352{
354353   /* processor registers */
355354   UINT32 pc;      /* program counter (12, 15 or 16 bits) */
trunk/src/emu/cpu/pdp1/pdp1.h
r17907r17908
2727typedef void (*pdp1_io_sc_func)(device_t *device);
2828
2929
30typedef struct _pdp1_reset_param_t pdp1_reset_param_t;
31struct _pdp1_reset_param_t
30struct pdp1_reset_param_t
3231{
3332   /* callbacks for iot instructions (required for any I/O) */
3433   pdp1_extern_iot_func extern_iot[64];
trunk/src/emu/cpu/pdp1/tx0.c
r17907r17908
2121
2222
2323/* TX-0 Registers */
24typedef struct _tx0_state tx0_state;
25struct _tx0_state
24struct tx0_state
2625{
2726   const tx0_reset_param_t *iface;
2827
trunk/src/emu/cpu/mb86233/mb86233.c
r17907r17908
3030   float   f;
3131} MB86233_REG;
3232
33typedef struct _mb86233_state mb86233_state;
34struct _mb86233_state
33struct mb86233_state
3534{
3635   UINT16         pc;
3736   MB86233_REG      a;
trunk/src/emu/cpu/mb86233/mb86233.h
r17907r17908
4545typedef int (*mb86233_fifo_read_func)(device_t *device, UINT32 *data);
4646typedef void (*mb86233_fifo_write_func)(device_t *device, UINT32 data);
4747
48typedef struct _mb86233_cpu_core mb86233_cpu_core;
49struct _mb86233_cpu_core
48struct mb86233_cpu_core
5049{
5150   mb86233_fifo_read_func fifo_read_cb;
5251   mb86233_fifo_write_func fifo_write_cb;
trunk/src/emu/cpu/t11/t11.c
r17907r17908
2222 *
2323 *************************************/
2424
25typedef struct _t11_state t11_state;
26struct _t11_state
25struct t11_state
2726{
2827   PAIR            ppc;   /* previous program counter */
2928    PAIR            reg[8];
trunk/src/emu/cpu/m6800/m6800.h
r17907r17908
66#define __M6800_H__
77
88
9typedef struct _m6801_interface m6801_interface;
10struct _m6801_interface
9struct m6801_interface
1110{
1211   devcb_write_line      out_sc2_func;
1312};
trunk/src/emu/cpu/m6800/m6800.c
r17907r17908
106106#endif
107107
108108/* 6800 Registers */
109typedef struct _m6800_state m6800_state;
110struct _m6800_state
109struct m6800_state
111110{
112111//  int     subtype;        /* CPU subtype */
113112   PAIR   ppc;         /* Previous program counter */
trunk/src/emu/cpu/cp1610/cp1610.c
r17907r17908
3030#define OV 0x20
3131#define C  0x10
3232
33typedef struct _cp1610_state cp1610_state;
34struct _cp1610_state
33struct cp1610_state
3534{
3635   UINT16   r[8];   /* registers */
3736   UINT8   flags;   /* flags */
trunk/src/emu/cpu/saturn/saturn.h
r17907r17908
5050#define SATURN_INT_IRQ   1
5151#define SATURN_INT_NMI   2
5252
53typedef struct _saturn_cpu_core saturn_cpu_core;
54struct _saturn_cpu_core
53struct saturn_cpu_core
5554{
5655   void (*out)(device_t*,int);
5756   int (*in)(device_t*);
trunk/src/emu/cpu/saturn/saturn.c
r17907r17908
5252/****************************************************************************
5353 * The SATURN registers.
5454 ****************************************************************************/
55typedef struct _saturn_state saturn_state;
56struct _saturn_state
55struct saturn_state
5756{
5857   saturn_cpu_core *config;
5958
trunk/src/emu/cpu/konami/konami.c
r17907r17908
4343#define LOG(x)   do { if (VERBOSE) logerror x; } while (0)
4444
4545/* Konami Registers */
46typedef struct _konami_state konami_state;
47struct _konami_state
46struct konami_state
4847{
4948   PAIR   pc;       /* Program counter */
5049    PAIR    ppc;        /* Previous program counter */
trunk/src/emu/video/huc6260.h
r17907r17908
2727   MCFG_DEVICE_CONFIG( _intrf )
2828
2929
30typedef struct _huc6260_interface huc6260_interface;
31struct _huc6260_interface
30struct huc6260_interface
3231{
3332   /* Tag for the screen we will be drawing on */
3433   const char *screen_tag;
trunk/src/emu/video/hd63484.c
r17907r17908
2929
3030#define FIFO_LENGTH 256
3131
32typedef struct _hd63484_state hd63484_state;
33struct _hd63484_state
32struct hd63484_state
3433{
3534   UINT16 *   ram;
3635   UINT16 reg[256/2];
trunk/src/emu/video/hd63484.h
r17907r17908
3737
3838#define HD63484_RAM_SIZE 0x100000
3939
40typedef struct _hd63484_interface hd63484_interface;
41struct _hd63484_interface
40struct hd63484_interface
4241{
4342   int        skattva_hack;
4443};
trunk/src/emu/video/vooddefs.h
r17907r17908
13941394 *************************************/
13951395
13961396typedef struct _voodoo_state voodoo_state;
1397typedef struct _poly_extra_data poly_extra_data;
1397typedef struct poly_extra_data poly_extra_data;
13981398
13991399
1400typedef struct _rgba rgba;
1401struct _rgba
1400struct rgba
14021401{
14031402#ifdef LSB_FIRST
14041403   UINT8            b, g, r, a;
r17907r17908
14211420typedef voodoo_reg rgb_union;
14221421
14231422
1424typedef struct _voodoo_stats voodoo_stats;
1425struct _voodoo_stats
1423struct voodoo_stats
14261424{
14271425   UINT8            lastkey;            /* last key state */
14281426   UINT8            display;            /* display stats? */
r17907r17908
14481446
14491447
14501448/* note that this structure is an even 64 bytes long */
1451typedef struct _stats_block stats_block;
1452struct _stats_block
1449struct stats_block
14531450{
14541451   INT32            pixels_in;            /* pixels in statistic */
14551452   INT32            pixels_out;            /* pixels out statistic */
r17907r17908
14621459};
14631460
14641461
1465typedef struct _fifo_state fifo_state;
1466struct _fifo_state
1462struct fifo_state
14671463{
14681464   UINT32 *         base;               /* base of the FIFO */
14691465   INT32            size;               /* size of the FIFO */
r17907r17908
14721468};
14731469
14741470
1475typedef struct _cmdfifo_info cmdfifo_info;
1476struct _cmdfifo_info
1471struct cmdfifo_info
14771472{
14781473   UINT8            enable;               /* enabled? */
14791474   UINT8            count_holes;         /* count holes? */
r17907r17908
14871482};
14881483
14891484
1490typedef struct _pci_state pci_state;
1491struct _pci_state
1485struct pci_state
14921486{
14931487   fifo_state         fifo;               /* PCI FIFO */
14941488   UINT32            init_enable;         /* initEnable value */
r17907r17908
15011495};
15021496
15031497
1504typedef struct _ncc_table ncc_table;
1505struct _ncc_table
1498struct ncc_table
15061499{
15071500   UINT8            dirty;               /* is the texel lookup dirty? */
15081501   voodoo_reg *      reg;               /* pointer to our registers */
r17907r17908
15151508};
15161509
15171510
1518typedef struct _tmu_state tmu_state;
1519struct _tmu_state
1511struct tmu_state
15201512{
15211513   UINT8 *            ram;               /* pointer to our RAM */
15221514   UINT32            mask;               /* mask to apply to pointers */
r17907r17908
15561548};
15571549
15581550
1559typedef struct _tmu_shared_state tmu_shared_state;
1560struct _tmu_shared_state
1551struct tmu_shared_state
15611552{
15621553   rgb_t            rgb332[256];         /* RGB 3-3-2 lookup table */
15631554   rgb_t            alpha8[256];         /* alpha 8-bit lookup table */
r17907r17908
15701561};
15711562
15721563
1573typedef struct _setup_vertex setup_vertex;
1574struct _setup_vertex
1564struct setup_vertex
15751565{
15761566   float            x, y;               /* X, Y coordinates */
15771567   float            a, r, g, b;            /* A, R, G, B values */
r17907r17908
15811571};
15821572
15831573
1584typedef struct _fbi_state fbi_state;
1585struct _fbi_state
1574struct fbi_state
15861575{
15871576   UINT8 *            ram;               /* pointer to frame buffer RAM */
15881577   UINT32            mask;               /* mask to apply to pointers */
r17907r17908
16501639};
16511640
16521641
1653typedef struct _dac_state dac_state;
1654struct _dac_state
1642struct dac_state
16551643{
16561644   UINT8            reg[8];               /* 8 registers */
16571645   UINT8            read_result;         /* pending read result */
16581646};
16591647
16601648
1661typedef struct _raster_info raster_info;
1662struct _raster_info
1649struct raster_info
16631650{
1664   struct _raster_info *next;               /* pointer to next entry with the same hash */
1651   raster_info *      next;               /* pointer to next entry with the same hash */
16651652   poly_draw_scanline_func callback;         /* callback pointer */
16661653   UINT8            is_generic;            /* TRUE if this is one of the generic rasterizers */
16671654   UINT8            display;            /* display index */
r17907r17908
16761663};
16771664
16781665
1679struct _poly_extra_data
1666struct poly_extra_data
16801667{
16811668   voodoo_state *      state;               /* pointer back to the voodoo state */
16821669   raster_info *      info;               /* pointer to rasterizer information */
r17907r17908
17121699};
17131700
17141701
1715typedef struct _banshee_info banshee_info;
1716struct _banshee_info
1702struct banshee_info
17171703{
17181704   UINT32            io[0x40];            /* I/O registers */
17191705   UINT32            agp[0x80];            /* AGP registers */
trunk/src/emu/video/tlc34076.c
r17907r17908
2222#define TEST_REGISTER      0x0e
2323#define RESET_STATE         0x0f
2424
25typedef struct _tlc34076_state  tlc34076_state;
26struct _tlc34076_state
25struct tlc34076_state
2726{
2827   UINT8 local_paletteram[0x300];
2928   UINT8 regs[0x10];
trunk/src/emu/video/mc6845.h
r17907r17908
6868
6969
7070/* interface */
71typedef struct _mc6845_interface mc6845_interface;
72struct _mc6845_interface
71struct mc6845_interface
7372{
7473   const char *m_screen_tag;      /* screen we are acting on */
7574   int m_hpixels_per_column;      /* number of pixels per video memory address */
trunk/src/emu/video/tlc34076.h
r17907r17908
1717    TYPE DEFINITIONS
1818***************************************************************************/
1919
20typedef struct _tlc34076_config tlc34076_config;
21struct _tlc34076_config
20struct tlc34076_config
2221{
2322   int res_sel;
2423};
trunk/src/emu/video/tms9928a.h
r17907r17908
7676extern const device_type TMS9129;
7777
7878
79typedef struct _tms9928a_interface tms9928a_interface;
80struct _tms9928a_interface
79struct tms9928a_interface
8180{
8281   const char         *m_screen_tag;
8382   int               m_vram_size;   /* 4K, 8K, or 16K. This should be replaced by fetching data from an address space? */
trunk/src/emu/video/resnet.h
r17907r17908
9494
9595/* Structures */
9696
97typedef struct _res_net_channel_info res_net_channel_info;
98struct _res_net_channel_info {
97struct res_net_channel_info {
9998   // per channel options
10099   UINT32   options;
101100   // Pullup resistor value in Ohms
r17907r17908
121120   double   vBias;
122121};
123122
124typedef struct _res_net_info res_net_info;
125struct _res_net_info {
123struct res_net_info {
126124   // global options
127125   UINT32   options;
128126   // The three color channels
r17907r17908
144142
145143#define RES_NET_MAX_COMP   3
146144
147typedef struct _res_net_decode_info res_net_decode_info;
148struct _res_net_decode_info {
145struct res_net_decode_info {
149146   int   numcomp;
150147   int   start;
151148   int   end;
trunk/src/emu/video/voodoo.h
r17907r17908
7171typedef void (*voodoo_stall_func)(device_t *device, int state);
7272
7373
74typedef struct _voodoo_config voodoo_config;
75struct _voodoo_config
74struct voodoo_config
7675{
7776   UINT8            fbmem;
7877   UINT8            tmumem0;
trunk/src/emu/video/i8275.c
r17907r17908
5757#define   LOG(x)      do { if (VERBOSE) logerror x; } while (0)
5858
5959
60typedef struct _i8275_t i8275_t;
61
62struct _i8275_t
60struct i8275_t
6361{
6462   devcb_resolved_write_line   out_drq_func;
6563   devcb_resolved_write_line   out_irq_func;
trunk/src/emu/video/s2636.c
r17907r17908
9696 *
9797 *************************************/
9898
99typedef struct _s2636_state  s2636_state;
100struct _s2636_state
99struct s2636_state
101100{
102101   UINT8     *work_ram;
103102   int       work_ram_size;
trunk/src/emu/video/i8275.h
r17907r17908
4747#define I8275_DISPLAY_PIXELS(name)   void name(device_t *device, int x, int y, UINT8 linecount, UINT8 charcode, UINT8 lineattr, UINT8 lten, UINT8 rvv, UINT8 vsp, UINT8 gpa, UINT8 hlgt)
4848
4949/* interface */
50typedef struct _i8275_interface i8275_interface;
51struct _i8275_interface
50struct i8275_interface
5251{
5352   const char *screen_tag;      /* screen we are acting on */
5453   int width;               /* char width in pixels */
trunk/src/emu/video/s2636.h
r17907r17908
1919 *
2020 *************************************/
2121
22typedef struct _s2636_interface s2636_interface;
23struct _s2636_interface
22struct s2636_interface
2423{
2524   const char *screen;
2625   int        work_ram_size;
trunk/src/emu/video/huc6202.h
r17907r17908
1616   MCFG_DEVICE_CONFIG( _intrf )
1717
1818
19typedef struct _huc6202_interface huc6202_interface;
20struct _huc6202_interface
19struct huc6202_interface
2120{
2221   /* First gfx input device */
2322   devcb_read16            device_0_next_pixel;
trunk/src/emu/video/tms9927.c
r17907r17908
3030#define CURSOR_ROW_ADDRESS(t)   ((t)->reg[8] & 0x3f)
3131
3232
33typedef struct _tms9927_state tms9927_state;
34struct _tms9927_state
33struct tms9927_state
3534{
3635   /* driver-controlled state */
3736   const tms9927_interface *intf;
trunk/src/emu/video/huc6261.h
r17907r17908
2323   MCFG_DEVICE_CONFIG( _intrf )
2424
2525
26typedef struct _huc6261_interface huc6261_interface;
27struct _huc6261_interface
26struct huc6261_interface
2827{
2928   /* Tag for the screen we will be drawing on */
3029   const char *screen_tag;
trunk/src/emu/video/tms9927.h
r17907r17908
7373
7474
7575/* interface */
76typedef struct _tms9927_interface tms9927_interface;
77struct _tms9927_interface
76struct tms9927_interface
7877{
7978   const char *screen_tag;         /* screen we are acting on */
8079   int hpixels_per_column;         /* number of pixels per video memory address */
trunk/src/emu/video/psx.h
r17907r17908
4444#define DEBUG_COORDS ( 10 )
4545#define DEBUG_MAX ( 512 )
4646
47typedef struct _psx_gpu_debug psx_gpu_debug;
48struct _psx_gpu_debug
47struct psx_gpu_debug
4948{
5049   bitmap_ind16 *mesh;
5150   int b_clear;
trunk/src/emu/video/poly.c
r17907r17908
4545
4646
4747/* tri_extent describes start/end points for a scanline */
48typedef struct _tri_extent tri_extent;
49struct _tri_extent
48struct tri_extent
5049{
5150   INT16      startx;                  /* starting X coordinate (inclusive) */
5251   INT16      stopx;                  /* ending X coordinate (exclusive) */
r17907r17908
5453
5554
5655/* single set of polygon per-parameter data */
57typedef struct _poly_param poly_param;
58struct _poly_param
56struct poly_param
5957{
6058   float      start;                  /* parameter value at starting X,Y */
6159   float      dpdx;                  /* dp/dx relative to starting X */
r17907r17908
6462
6563
6664/* poly edge is used internally for quad rendering */
67typedef struct _poly_edge poly_edge;
68struct _poly_edge
65struct poly_edge
6966{
7067   poly_edge *         next;               /* next edge in sequence */
7168   int               index;               /* index of this edge */
r17907r17908
7774
7875
7976/* poly section is used internally for quad rendering */
80typedef struct _poly_section poly_section;
81struct _poly_section
77struct poly_section
8278{
8379   const poly_edge *   ledge;               /* pointer to left edge */
8480   const poly_edge *   redge;               /* pointer to right edge */
r17907r17908
8783
8884
8985/* work_unit_shared is a common set of data shared between tris and quads */
90typedef struct _work_unit_shared work_unit_shared;
91struct _work_unit_shared
86struct work_unit_shared
9287{
9388   polygon_info *      polygon;            /* pointer to polygon */
9489   volatile UINT32      count_next;            /* number of scanlines and index of next item to process */
r17907r17908
10196
10297
10398/* tri_work_unit is a triangle-specific work-unit */
104typedef struct _tri_work_unit tri_work_unit;
105struct _tri_work_unit
99struct tri_work_unit
106100{
107101   work_unit_shared   shared;               /* shared data */
108102   tri_extent         extent[SCANLINES_PER_BUCKET]; /* array of scanline extents */
r17907r17908
110104
111105
112106/* quad_work_unit is a quad-specific work-unit */
113typedef struct _quad_work_unit quad_work_unit;
114struct _quad_work_unit
107struct quad_work_unit
115108{
116109   work_unit_shared   shared;               /* shared data */
117110   poly_extent         extent[SCANLINES_PER_BUCKET]; /* array of scanline extents */
trunk/src/emu/video/poly.h
r17907r17908
5959
6060
6161/* input vertex data */
62typedef struct _poly_vertex poly_vertex;
63struct _poly_vertex
62struct poly_vertex
6463{
6564   float      x;                     /* X coordinate */
6665   float      y;                     /* Y coordinate */
r17907r17908
6968
7069
7170/* poly_param_extent describes information for a single parameter in an extent */
72typedef struct _poly_param_extent poly_param_extent;
73struct _poly_param_extent
71struct poly_param_extent
7472{
7573   float      start;                  /* parameter value at starting X,Y */
7674   float      dpdx;                  /* dp/dx relative to starting X */
r17907r17908
7876
7977
8078/* poly_extent describes start/end points for a scanline, along with per-scanline parameters */
81typedef struct _poly_extent poly_extent;
82struct _poly_extent
79struct poly_extent
8380{
8481   INT16      startx;                  /* starting X coordinate (inclusive) */
8582   INT16      stopx;                  /* ending X coordinate (exclusive) */
trunk/src/emu/video/vector.c
r17907r17908
6666#define VECTOR_INT_SCALE         (255.0f * 1.5f)
6767
6868
69typedef struct _vector_texture vector_texture;
70struct _vector_texture
69struct vector_texture
7170{
7271   render_texture *   texture;
7372   bitmap_argb32 *      bitmap;
trunk/src/emu/video/huc6270.h
r17907r17908
3333   MCFG_DEVICE_CONFIG( _intrf )
3434
3535
36typedef struct _huc6270_interface huc6270_interface;
37struct _huc6270_interface
36struct huc6270_interface
3837{
3938   /* Size of Video ram (mandatory) */
4039   UINT32            vram_size;
trunk/src/emu/video/315_5124.h
r17907r17908
5252    TYPE DEFINITIONS
5353***************************************************************************/
5454
55typedef struct _sega315_5124_interface sega315_5124_interface;
56struct _sega315_5124_interface
55struct sega315_5124_interface
5756{
5857   bool               m_is_pal;             /* false = NTSC, true = PAL */
5958   const char         *m_screen_tag;
trunk/src/emu/hashfile.c
r17907r17908
1818    TYPE DEFINITIONS
1919***************************************************************************/
2020
21typedef struct _hash_info hash_info;
22struct _hash_info
21struct hash_info
2322{
2423   hash_collection *hashes;
2524   const char *extrainfo;
trunk/src/emu/output.c
r17907r17908
2626    TYPE DEFINITIONS
2727***************************************************************************/
2828
29typedef struct _output_notify output_notify;
30struct _output_notify
29struct output_notify
3130{
3231   output_notify *      next;         /* link to next item */
3332   output_notifier_func      notifier;      /* callback to call */
r17907r17908
3534};
3635
3736
38typedef struct _output_item output_item;
39struct _output_item
37struct output_item
4038{
4139   output_item *      next;         /* next item in list */
4240   const char *      name;         /* string name of the item */
trunk/src/emu/sound/262intf.h
r17907r17908
66#include "devlegcy.h"
77
88
9typedef struct _ymf262_interface ymf262_interface;
10struct _ymf262_interface
9struct ymf262_interface
1110{
1211   void (*handler)(device_t *device, int irq);
1312};
trunk/src/emu/sound/nes_apu.h
r17907r17908
3737 * processor, as each is shared.
3838 */
3939
40typedef struct _nes_interface nes_interface;
41struct _nes_interface
40struct nes_interface
4241{
4342   const char *cpu_tag;  /* CPU tag */
4443};
trunk/src/emu/sound/sp0256.c
r17907r17908
7272};
7373
7474
75typedef struct _sp0256_state sp0256_state;
76struct _sp0256_state
75struct sp0256_state
7776{
7877   device_t *device;
7978   sound_stream  *stream;           /* MAME core sound stream                       */
trunk/src/emu/sound/hc55516.c
r17907r17908
2121#define   SAMPLE_GAIN            10000.0
2222
2323
24typedef struct _hc55516_state hc55516_state;
25struct _hc55516_state
24struct hc55516_state
2625{
2726   sound_stream *channel;
2827   int      clock;      /* 0 = software driven, non-0 = oscillator */
trunk/src/emu/sound/sp0256.h
r17907r17908
5252#include "devlegcy.h"
5353
5454
55typedef struct _sp0256_interface sp0256_interface;
56struct _sp0256_interface
55struct sp0256_interface
5756{
5857   devcb_write_line lrq_callback;
5958   devcb_write_line sby_callback;
trunk/src/emu/sound/iremga20.c
r17907r17908
4545   UINT32 play;
4646};
4747
48typedef struct _ga20_state ga20_state;
49struct _ga20_state
48struct ga20_state
5049{
5150   UINT8 *rom;
5251   INT32 rom_size;
trunk/src/emu/sound/tms5110.c
r17907r17908
8484#define CTL_STATE_OUTPUT      (1)
8585#define CTL_STATE_NEXT_OUTPUT   (2)
8686
87typedef struct _tms5110_state tms5110_state;
88struct _tms5110_state
87struct tms5110_state
8988{
9089   /* coefficient tables */
9190   int variant;            /* Variant of the 5110 - see tms5110.h */
r17907r17908
163162   UINT8 romclk_hack_state;
164163};
165164
166typedef struct _tmsprom_state tmsprom_state;
167struct _tmsprom_state
165struct tmsprom_state
168166{
169167   /* Rom interface */
170168   UINT32 address;
trunk/src/emu/sound/2612intf.c
r17907r17908
1616#include "sound/2612intf.h"
1717
1818
19typedef struct _ym2612_state ym2612_state;
20struct _ym2612_state
19struct ym2612_state
2120{
2221   sound_stream *   stream;
2322   emu_timer *      timer[2];
trunk/src/emu/sound/tms5110.h
r17907r17908
2121/* usually 640000 for 8000 Hz sample rate or */
2222/* usually 800000 for 10000 Hz sample rate.  */
2323
24typedef struct _tms5110_interface tms5110_interface;
25struct _tms5110_interface
24struct tms5110_interface
2625{
2726   /* legacy interface */
2827   int (*M0_callback)(device_t *device);   /* function to be called when chip requests another bit */
r17907r17908
169168
170169/* PROM controlled TMS5110 interface */
171170
172typedef struct _tmsprom_interface tmsprom_interface;
173struct _tmsprom_interface
171struct tmsprom_interface
174172{
175173   const char *prom_region;      /* prom memory region - sound region is automatically assigned */
176174   UINT32 rom_size;            /* individual rom_size */
trunk/src/emu/sound/2612intf.h
r17907r17908
77
88void ym2612_update_request(void *param);
99
10typedef struct _ym2612_interface ym2612_interface;
11struct _ym2612_interface
10struct ym2612_interface
1211{
1312   void (*handler)(device_t *device, int irq);
1413};
r17907r17908
5554
5655
5756
58typedef struct _ym3438_interface ym3438_interface;
59struct _ym3438_interface
57struct ym3438_interface
6058{
6159   void (*handler)(device_t *device, int irq);
6260};
trunk/src/emu/sound/3526intf.c
r17907r17908
2222#include "sound/fmopl.h"
2323
2424
25typedef struct _ym3526_state ym3526_state;
26struct _ym3526_state
25struct ym3526_state
2726{
2827   sound_stream *   stream;
2928   emu_timer *      timer[2];
trunk/src/emu/sound/k051649.c
r17907r17908
3939   signed char waveram[32];
4040} k051649_sound_channel;
4141
42typedef struct _k051649_state k051649_state;
43struct _k051649_state
42struct k051649_state
4443{
4544   k051649_sound_channel channel_list[5];
4645
trunk/src/emu/sound/3526intf.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _ym3526_interface ym3526_interface;
9struct _ym3526_interface
8struct ym3526_interface
109{
1110   devcb_write_line out_int_func;
1211};
trunk/src/emu/sound/c140.c
r17907r17908
8686   long   sample_loop;
8787} VOICE;
8888
89typedef struct _c140_state c140_state;
90struct _c140_state
89struct c140_state
9190{
9291   int sample_rate;
9392   sound_stream *stream;
trunk/src/emu/sound/msm5205.c
r17907r17908
5252
5353 */
5454
55typedef struct _msm5205_state msm5205_state;
56struct _msm5205_state
55struct msm5205_state
5756{
5857   const msm5205_interface *intf;
5958   device_t *device;
trunk/src/emu/sound/qsound.c
r17907r17908
7070   INT32 offset;    /* current offset counter */
7171};
7272
73typedef struct _qsound_state qsound_state;
74struct _qsound_state
73struct qsound_state
7574{
7675   /* Private variables */
7776   sound_stream * stream;            /* Audio stream */
trunk/src/emu/sound/c140.h
r17907r17908
1919   C140_TYPE_ASIC219
2020};
2121
22typedef struct _c140_interface c140_interface;
23struct _c140_interface {
22struct c140_interface {
2423    int banking_type;
2524};
2625
trunk/src/emu/sound/msm5205.h
r17907r17908
2424#define MSM6585_S80   (6+8)  /* prescaler 1/80 (8KHz), data 4bit */
2525#define MSM6585_S20   (7+8)  /* prescaler 1/20(32KHz), data 4bit */
2626
27typedef struct _msm5205_interface msm5205_interface;
28struct _msm5205_interface
27struct msm5205_interface
2928{
3029   void (*vclk_callback)(device_t *);   /* VCLK callback              */
3130   int select;       /* prescaler / bit width selector        */
trunk/src/emu/sound/3812intf.c
r17907r17908
2222#include "sound/fmopl.h"
2323
2424
25typedef struct _ym3812_state ym3812_state;
26struct _ym3812_state
25struct ym3812_state
2726{
2827   sound_stream *   stream;
2928   emu_timer *      timer[2];
trunk/src/emu/sound/snkwave.c
r17907r17908
1515#define CLOCK_SHIFT 8
1616
1717
18typedef struct _snkwave_state snkwave_state;
19struct _snkwave_state
18struct snkwave_state
2019{
2120   /* global sound parameters */
2221   sound_stream * stream;
trunk/src/emu/sound/rf5c400.c
r17907r17908
1818#include "emu.h"
1919#include "rf5c400.h"
2020
21typedef struct _rf5c400_channel rf5c400_channel;
22struct _rf5c400_channel
21struct rf5c400_channel
2322{
2423   UINT16   startH;
2524   UINT16   startL;
r17907r17908
4746   double env_scale;
4847};
4948
50typedef struct _rf5c400_state rf5c400_state;
51struct _rf5c400_state
49struct rf5c400_state
5250{
5351   INT16 *rom;
5452   UINT32 rom_length;
trunk/src/emu/sound/3812intf.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _ym3812_interface ym3812_interface;
9struct _ym3812_interface
8struct ym3812_interface
109{
1110   void (*handler)(device_t *device, int linestate);
1211};
trunk/src/emu/sound/saa1099.c
r17907r17908
9696};
9797
9898/* this structure defines a SAA1099 chip */
99typedef struct _saa1099_state saa1099_state;
100struct _saa1099_state
99struct saa1099_state
101100{
102101   device_t *device;
103102   sound_stream * stream;         /* our stream */
trunk/src/emu/sound/cem3394.c
r17907r17908
103103
104104
105105/* this structure defines the parameters for a channel */
106typedef struct _cem3394_state cem3394_state;
107struct _cem3394_state
106struct cem3394_state
108107{
109108   sound_stream * stream;         /* our stream */
110109   void (*external)(device_t *, int, short *);/* callback to generate external samples */
trunk/src/emu/sound/cem3394.h
r17907r17908
1010
1111
1212/* interface */
13typedef struct _cem3394_interface cem3394_interface;
14struct _cem3394_interface
13struct cem3394_interface
1514{
1615   double vco_zero_freq;            /* frequency at 0V for VCO */
1716   double filter_zero_freq;         /* frequency at 0V for filter */
trunk/src/emu/sound/ymz280b.c
r17907r17908
7474   UINT8 irq_schedule;      /* 1 if the IRQ state is updated by timer */
7575};
7676
77typedef struct _ymz280b_state ymz280b_state;
78struct _ymz280b_state
77struct ymz280b_state
7978{
8079   sound_stream * stream;         /* which stream are we using */
8180   UINT8 *region_base;            /* pointer to the base of the region */
trunk/src/emu/sound/rf5c68.c
r17907r17908
99#define  NUM_CHANNELS    (8)
1010
1111
12typedef struct _pcm_channel pcm_channel;
13struct _pcm_channel
12struct pcm_channel
1413{
1514   UINT8      enable;
1615   UINT8      env;
r17907r17908
2221};
2322
2423
25typedef struct _rf5c68_state rf5c68_state;
26struct _rf5c68_state
24struct rf5c68_state
2725{
2826   sound_stream *      stream;
2927   pcm_channel         chan[NUM_CHANNELS];
trunk/src/emu/sound/ymz280b.h
r17907r17908
1313#include "devlegcy.h"
1414
1515
16typedef struct _ymz280b_interface ymz280b_interface;
17struct _ymz280b_interface
16struct ymz280b_interface
1817{
1918   void (*irq_callback)(device_t *device, int state);   /* irq callback */
2019   devcb_read8 ext_read;         /* external RAM read */
trunk/src/emu/sound/rf5c68.h
r17907r17908
1616READ8_DEVICE_HANDLER( rf5c68_mem_r );
1717WRITE8_DEVICE_HANDLER( rf5c68_mem_w );
1818
19typedef struct _rf5c68_interface rf5c68_interface;
20struct _rf5c68_interface
19struct rf5c68_interface
2120{
2221   void (*sample_end_callback)(device_t* device, int channel);
2322};
trunk/src/emu/sound/k005289.c
r17907r17908
3939   const unsigned char *wave;
4040} k005289_sound_channel;
4141
42typedef struct _k005289_state k005289_state;
43struct _k005289_state
42struct k005289_state
4443{
4544   k005289_sound_channel channel_list[2];
4645
trunk/src/emu/sound/sn76496.c
r17907r17908
122122#define NOISEMODE (R->Register[6]&4)?1:0
123123
124124
125typedef struct _sn76496_state sn76496_state;
126struct _sn76496_state
125struct sn76496_state
127126{
128127   sound_stream * Channel;
129128   INT32 VolTable[16];   /* volume table (for 4-bit to db conversion)*/
trunk/src/emu/sound/aica.h
r17907r17908
88
99#include "devlegcy.h"
1010
11typedef struct _aica_interface aica_interface;
12struct _aica_interface
11struct aica_interface
1312{
1413   int master;
1514   int roffset;            /* offset in the region */
trunk/src/emu/sound/astrocde.c
r17907r17908
4343#include "astrocde.h"
4444
4545
46typedef struct _astrocade_state astrocade_state;
47struct _astrocade_state
46struct astrocade_state
4847{
4948   sound_stream *stream;      /* sound stream */
5049
trunk/src/emu/sound/x1_010.c
r17907r17908
7777   unsigned char   reserve[2];
7878} X1_010_CHANNEL;
7979
80typedef struct _x1_010_state x1_010_state;
81struct _x1_010_state
80struct x1_010_state
8281{
8382   /* Variables only used here */
8483   int   rate;                        // Output sampling rate (Hz)
trunk/src/emu/sound/k056800.c
r17907r17908
99#include "emu.h"
1010#include "sound/k056800.h"
1111
12typedef struct _k056800_state k056800_state;
13struct _k056800_state
12struct k056800_state
1413{
1514   UINT8                host_reg[8];
1615   UINT8                sound_reg[8];
trunk/src/emu/sound/x1_010.h
r17907r17908
66#include "devlegcy.h"
77
88
9typedef struct _x1_010_interface x1_010_interface;
10struct _x1_010_interface
9struct x1_010_interface
1110{
1211   int adr;   /* address */
1312};
trunk/src/emu/sound/k056800.h
r17907r17908
1717typedef void (*k056800_irq_cb)(running_machine &, int);
1818
1919
20typedef struct _k056800_interface k056800_interface;
21struct _k056800_interface
20struct k056800_interface
2221{
2322   k056800_irq_cb       irq_cb;
2423};
trunk/src/emu/sound/upd7759.c
r17907r17908
167167
168168*************************************************************/
169169
170typedef struct _upd7759_state upd7759_state;
171struct _upd7759_state
170struct upd7759_state
172171{
173172   device_t *device;
174173   sound_stream *channel;               /* stream channel for playback */
trunk/src/emu/sound/n63701x.c
r17907r17908
2828} voice;
2929
3030
31typedef struct _namco_63701x namco_63701x;
32struct _namco_63701x
31struct namco_63701x
3332{
3433   voice voices[2];
3534   sound_stream * stream;      /* channel assigned by the mixer */
trunk/src/emu/sound/sp0250.c
r17907r17908
3232*/
3333#define CLOCK_DIVIDER (7*6*8)
3434
35typedef struct _sp0250_state sp0250_state;
36struct _sp0250_state
35struct sp0250_state
3736{
3837   INT16 amp;
3938   UINT8 pitch;
trunk/src/emu/sound/upd7759.h
r17907r17908
1515
1616#define UPD7759_STANDARD_CLOCK      XTAL_640kHz
1717
18typedef struct _upd7759_interface upd7759_interface;
19struct _upd7759_interface
18struct upd7759_interface
2019{
2120   void (*drqcallback)(device_t *device, int param);   /* drq callback (per chip, slave mode only) */
2221};
trunk/src/emu/sound/ymf271.h
r17907r17908
66#include "devlegcy.h"
77
88
9typedef struct _ymf271_interface ymf271_interface;
10struct _ymf271_interface
9struct ymf271_interface
1110{
1211   devcb_read8 ext_read;      /* external memory read */
1312   devcb_write8 ext_write;   /* external memory write */
trunk/src/emu/sound/speaker.c
r17907r17908
8484/* Internal oversampling factor (interm. samples vs stream samples) */
8585static const int RATE_MULTIPLIER = 4;
8686
87typedef struct _speaker_state speaker_state;
88struct _speaker_state
87struct speaker_state
8988{
9089   sound_stream *channel;
9190   const INT16 *levels;
trunk/src/emu/sound/cdda.c
r17907r17908
77#include "cdrom.h"
88#include "cdda.h"
99
10typedef struct _cdda_info cdda_info;
11struct _cdda_info
10struct cdda_info
1211{
1312   sound_stream *      stream;
1413   cdrom_file *      disc;
trunk/src/emu/sound/ay8910.c
r17907r17908
151151 *
152152 *************************************/
153153
154typedef struct _ay_ym_param ay_ym_param;
155struct _ay_ym_param
154struct ay_ym_param
156155{
157156   double r_up;
158157   double r_down;
r17907r17908
160159   double res[32];
161160};
162161
163typedef struct _ay8910_context ay8910_context;
164struct _ay8910_context
162struct ay8910_context
165163{
166164   device_t *device;
167165   int streams;
trunk/src/emu/sound/pokey.h
r17907r17908
112112
113113// ======================> pokey_interface
114114
115typedef struct _pokey_interface pokey_interface;
116struct _pokey_interface
115struct pokey_interface
117116{
118117   devcb_read8 m_pot_r_cb[8];
119118   devcb_read8 m_allpot_r_cb;
trunk/src/emu/sound/tms36xx.c
r17907r17908
1111/* the frequencies are later adjusted by "* clock / FSCALE" */
1212#define FSCALE   1024
1313
14typedef struct _tms_state tms_state;
15struct _tms_state {
14struct tms_state {
1615   char *subtype;      /* subtype name MM6221AA, TMS3615 or TMS3617 */
1716   sound_stream * channel;   /* returned by stream_create() */
1817
trunk/src/emu/sound/st0016.c
r17907r17908
99#define VERBOSE (0)
1010#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
1111
12typedef struct _st0016_state st0016_state;
13struct _st0016_state
12struct st0016_state
1413{
1514   sound_stream * stream;
1615   UINT8 **sound_ram;
trunk/src/emu/sound/tiaintf.c
r17907r17908
22#include "tiaintf.h"
33#include "tiasound.h"
44
5typedef struct _tia_state tia_state;
6struct _tia_state
5struct tia_state
76{
87   sound_stream * channel;
98   void *chip;
trunk/src/emu/sound/speaker.h
r17907r17908
1515
1616#define SPEAKER_TAG      "speaker"
1717
18typedef struct _speaker_interface speaker_interface;
19struct _speaker_interface
18struct speaker_interface
2019{
2120   int num_level;   /* optional: number of levels (if not two) */
2221   const INT16 *levels;   /* optional: pointer to level lookup table */
trunk/src/emu/sound/ay8910.h
r17907r17908
7777#define AY8910_INTERFACE(name) \
7878   const ay8910_interface (name) =
7979
80typedef struct _ay8910_interface ay8910_interface;
81struct _ay8910_interface
80struct ay8910_interface
8281{
8382   int               flags;         /* Flags */
8483   int               res_load[3];   /* Load on channel in ohms */
trunk/src/emu/sound/tms36xx.h
r17907r17908
1111#define TMS3617    17      /* Monster Bash (13 notes, six outputs) */
1212
1313/* The interface structure */
14typedef struct _tms36xx_interface tms36xx_interface;
15struct _tms36xx_interface
14struct tms36xx_interface
1615{
1716   int subtype;
1817   double decay[6];   /* decay times for the six harmonic notes */
trunk/src/emu/sound/st0016.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _st0016_interface st0016_interface;
9struct _st0016_interface
8struct st0016_interface
109{
1110   UINT8 **p_soundram;
1211};
trunk/src/emu/sound/c6280.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _c6280_interface c6280_interface;
9struct _c6280_interface
8struct c6280_interface
109{
1110   const char *   cpu;
1211};
trunk/src/emu/sound/discrete.h
r17907r17908
38323832 *
38333833 *************************************/
38343834
3835typedef struct _discrete_lfsr_desc discrete_lfsr_desc;
3836struct _discrete_lfsr_desc
3835struct discrete_lfsr_desc
38373836{
38383837   int clock_type;
38393838   int bitlength;
r17907r17908
38543853};
38553854
38563855
3857typedef struct _discrete_op_amp_osc_info discrete_op_amp_osc_info;
3858struct _discrete_op_amp_osc_info
3856struct discrete_op_amp_osc_info
38593857{
38603858   UINT32   type;
38613859   double   r1;
r17907r17908
38753873
38763874#define DEFAULT_74LS14_VALUES   1.6, 0.8, 3.4
38773875
3878typedef struct _discrete_schmitt_osc_desc discrete_schmitt_osc_desc;
3879struct _discrete_schmitt_osc_desc
3876struct discrete_schmitt_osc_desc
38803877{
38813878   double   rIn;
38823879   double   rFeedback;
r17907r17908
38883885};
38893886
38903887
3891typedef struct _discrete_comp_adder_table discrete_comp_adder_table;
3892struct _discrete_comp_adder_table
3888struct discrete_comp_adder_table
38933889{
38943890   int      type;
38953891   double   cDefault;            // Default componet.  0 if not used.
r17907r17908
38983894};
38993895
39003896
3901typedef struct _discrete_dac_r1_ladder discrete_dac_r1_ladder;
3902struct _discrete_dac_r1_ladder
3897struct discrete_dac_r1_ladder
39033898{
39043899   int      ladderLength;      // 2 to DISC_LADDER_MAXRES.  1 would be useless.
39053900   double   r[DISC_LADDER_MAXRES];   // Don't use 0 for valid resistors.  That is a short.
r17907r17908
39103905};
39113906
39123907
3913typedef struct _discrete_integrate_info discrete_integrate_info;
3914struct _discrete_integrate_info
3908struct discrete_integrate_info
39153909{
39163910   UINT32   type;
39173911   double   r1;      // r1a + r1b
r17907r17908
39273921
39283922
39293923#define DISC_MAX_MIXER_INPUTS   8
3930typedef struct _discrete_mixer_desc discrete_mixer_desc;
3931struct _discrete_mixer_desc
3924struct discrete_mixer_desc
39323925{
39333926   int      type;
39343927   double   r[DISC_MAX_MIXER_INPUTS];      /* static input resistance values.  These are in series with rNode, if used. */
r17907r17908
39433936};
39443937
39453938
3946typedef struct _discrete_op_amp_info discrete_op_amp_info;
3947struct _discrete_op_amp_info
3939struct discrete_op_amp_info
39483940{
39493941   UINT32   type;
39503942   double   r1;
r17907r17908
39573949};
39583950
39593951
3960typedef struct _discrete_op_amp_1sht_info discrete_op_amp_1sht_info;
3961struct _discrete_op_amp_1sht_info
3952struct discrete_op_amp_1sht_info
39623953{
39633954   UINT32   type;
39643955   double   r1;
r17907r17908
39733964};
39743965
39753966
3976typedef struct _discrete_op_amp_tvca_info discrete_op_amp_tvca_info;
3977struct _discrete_op_amp_tvca_info
3967struct discrete_op_amp_tvca_info
39783968{
39793969   double   r1;
39803970   double   r2;      // r2a + r2b
r17907r17908
40043994};
40053995
40063996
4007typedef struct _discrete_op_amp_filt_info discrete_op_amp_filt_info;
4008struct _discrete_op_amp_filt_info
3997struct discrete_op_amp_filt_info
40093998{
40103999   double   r1;
40114000   double   r2;
r17907r17908
40254014#define DEFAULT_555_HIGH      -1
40264015#define DEFAULT_555_VALUES      DEFAULT_555_CHARGE, DEFAULT_555_HIGH
40274016
4028typedef struct _discrete_555_desc discrete_555_desc;
4029struct _discrete_555_desc
4017struct discrete_555_desc
40304018{
40314019   int      options;   /* bit mapped options */
40324020   double   v_pos;      /* B+ voltage of 555 */
r17907r17908
40364024
40374025#define DEFAULT_555_CC_SOURCE   DEFAULT_555_CHARGE
40384026
4039typedef struct _discrete_555_cc_desc discrete_555_cc_desc;
4040struct _discrete_555_cc_desc
4027struct discrete_555_cc_desc
40414028{
40424029   int      options;      /* bit mapped options */
40434030   double   v_pos;         /* B+ voltage of 555 */
r17907r17908
40474034};
40484035
40494036
4050typedef struct _discrete_555_vco1_desc discrete_555_vco1_desc;
4051struct _discrete_555_vco1_desc
4037struct discrete_555_vco1_desc
40524038{
40534039   int    options;            /* bit mapped options */
40544040   double r1, r2, r3, r4, c;
r17907r17908
40584044};
40594045
40604046
4061typedef struct _discrete_adsr discrete_adsr;
4062struct _discrete_adsr
4047struct discrete_adsr
40634048{
40644049   double attack_time;  /* All times are in seconds */
40654050   double attack_value;
trunk/src/emu/sound/scsp.c
r17907r17908
175175
176176#define USEDSP
177177
178typedef struct _scsp_state scsp_state;
179struct _scsp_state
178struct scsp_state
180179{
181180   union
182181   {
trunk/src/emu/sound/2610intf.c
r17907r17908
1616#include "2610intf.h"
1717#include "fm.h"
1818
19typedef struct _ym2610_state ym2610_state;
20struct _ym2610_state
19struct ym2610_state
2120{
2221   sound_stream *   stream;
2322   emu_timer *      timer[2];
trunk/src/emu/sound/flt_rc.c
r17907r17908
11#include "emu.h"
22#include "flt_rc.h"
33
4typedef struct _filter_rc_state filter_rc_state;
5struct _filter_rc_state
4struct filter_rc_state
65{
76   device_t *device;
87   sound_stream *   stream;
trunk/src/emu/sound/beep.c
r17907r17908
1717
1818#define BEEP_RATE         48000
1919
20typedef struct _beep_state beep_state;
21struct _beep_state
20struct beep_state
2221{
2322   sound_stream *stream;   /* stream number */
2423   int enable;          /* enable beep */
trunk/src/emu/sound/scsp.h
r17907r17908
99
1010#include "devlegcy.h"
1111
12typedef struct _scsp_interface scsp_interface;
13struct _scsp_interface
12struct scsp_interface
1413{
1514   int roffset;            /* offset in the region */
1615   void (*irq_callback)(device_t *device, int state);   /* irq callback */
trunk/src/emu/sound/msm5232.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _msm5232_interface msm5232_interface;
9struct _msm5232_interface
8struct msm5232_interface
109{
1110   double capacity[8];   /* in Farads, capacitors connected to pins: 24,25,26,27 and 37,38,39,40 */
1211   void (*gate_handler)(device_t *device, int state);   /* callback called when the GATE output pin changes state */
trunk/src/emu/sound/flt_rc.h
r17907r17908
4545 *
4646 */
4747
48typedef struct _flt_rc_config flt_rc_config;
49struct _flt_rc_config
48struct flt_rc_config
5049{
5150   int   type;
5251   double   R1;
trunk/src/emu/sound/2610intf.h
r17907r17908
99
1010void ym2610_update_request(void *param);
1111
12typedef struct _ym2610_interface ym2610_interface;
13struct _ym2610_interface
12struct ym2610_interface
1413{
1514   void ( *handler )( device_t *device, int irq );   /* IRQ handler for the YM2610 */
1615};
trunk/src/emu/sound/tms3615.c
r17907r17908
88
99static const int divisor[TONES] = { 478, 451, 426, 402, 379, 358, 338, 319, 301, 284, 268, 253, 239 };
1010
11typedef struct _tms_state tms_state;
12struct _tms_state {
11struct tms_state {
1312   sound_stream *channel;   /* returned by stream_create() */
1413   int samplerate;       /* output sample rate */
1514   int basefreq;         /* chip's base frequency */
trunk/src/emu/sound/gaelco.c
r17907r17908
4949#define VOLUME_LEVELS         0x10
5050
5151/* this structure defines a channel */
52typedef struct _gaelco_sound_channel gaelco_sound_channel;
53struct _gaelco_sound_channel
52struct gaelco_sound_channel
5453{
5554   int active;         /* is it playing? */
5655   int loop;         /* = 0 no looping, = 1 looping */
r17907r17908
5857};
5958
6059/* this structure defines the Gaelco custom sound chip */
61typedef struct _gaelco_sound_state gaelco_sound_state;
62struct _gaelco_sound_state
60struct gaelco_sound_state
6361{
6462   sound_stream *stream;                           /* our stream */
6563   UINT8 *snd_data;                              /* PCM data */
trunk/src/emu/sound/gaelco.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _gaelcosnd_interface gaelcosnd_interface;
9struct _gaelcosnd_interface
8struct gaelcosnd_interface
109{
1110   const char *gfxregion;   /* shared gfx region name */
1211   int banks[4];         /* start of each ROM bank */
trunk/src/emu/sound/fm.h
r17907r17908
2828
2929/* --- external SSG(YM2149/AY-3-8910)emulator interface port */
3030/* used by YM2203,YM2608,and YM2610 */
31typedef struct _ssg_callbacks ssg_callbacks;
32struct _ssg_callbacks
31struct ssg_callbacks
3332{
3433   void (*set_clock)(void *param, int clock);
3534   void (*write)(void *param, int address, int data);
trunk/src/emu/sound/dmadac.c
r17907r17908
3939 *
4040 *************************************/
4141
42typedef struct _dmadac_state dmadac_state;
43struct _dmadac_state
42struct dmadac_state
4443{
4544   /* sound stream and buffers */
4645   sound_stream *   channel;
trunk/src/emu/sound/2608intf.c
r17907r17908
1616#include "2608intf.h"
1717#include "fm.h"
1818
19typedef struct _ym2608_state ym2608_state;
20struct _ym2608_state
19struct ym2608_state
2120{
2221   sound_stream *   stream;
2322   emu_timer *   timer[2];
trunk/src/emu/sound/s2636.c
r17907r17908
88#include "sound/s2636.h"
99
1010
11typedef struct _s2636_sound s2636_sound;
12struct _s2636_sound
11struct s2636_sound
1312{
1413    sound_stream *channel;
1514    UINT8 reg[1];
trunk/src/emu/sound/okim6376.c
r17907r17908
3434   INT32 step;
3535};
3636
37typedef struct _okim6376_state okim6376_state;
38struct _okim6376_state
37struct okim6376_state
3938{
4039   #define OKIM6376_VOICES      2
4140   struct ADPCMVoice voice[OKIM6376_VOICES];
trunk/src/emu/sound/2608intf.h
r17907r17908
1010
1111void ym2608_update_request(void *param);
1212
13typedef struct _ym2608_interface ym2608_interface;
14struct _ym2608_interface
13struct ym2608_interface
1514{
1615   const ay8910_interface ay8910_intf;
1716   void ( *handler )( device_t *device, int irq );   /* IRQ handler for the YM2608 */
trunk/src/emu/sound/zsg2.c
r17907r17908
4747#include "zsg2.h"
4848
4949// 16 registers per channel, 48 channels
50typedef struct _zchan zchan;
51struct _zchan
50struct zchan
5251{
5352   UINT16 v[16];
5453};
5554
56typedef struct _zsg2_state zsg2_state;
57struct _zsg2_state
55struct zsg2_state
5856{
5957   zchan zc[48];
6058   UINT16 act[3];
trunk/src/emu/sound/es5506.c
r17907r17908
135135***********************************************************************************************/
136136
137137/* struct describing a single playing voice */
138typedef struct _es5506_voice es5506_voice;
139struct _es5506_voice
138struct es5506_voice
140139{
141140   /* external state */
142141   UINT32      control;            /* control register */
r17907r17908
167166   UINT32      accum_mask;
168167};
169168
170typedef struct _es5506_state es5506_state;
171struct _es5506_state
169struct es5506_state
172170{
173171   sound_stream *stream;            /* which stream are we using */
174172   int         sample_rate;         /* current sample rate */
trunk/src/emu/sound/zsg2.h
r17907r17908
1010READ16_DEVICE_HANDLER( zsg2_r );
1111WRITE16_DEVICE_HANDLER( zsg2_w );
1212
13typedef struct _zsg2_interface zsg2_interface;
14struct _zsg2_interface
13struct zsg2_interface
1514{
1615   const char *samplergn;
1716};
trunk/src/emu/sound/filter.h
r17907r17908
1616typedef double filter_real;
1717#endif
1818
19typedef struct _filter filter;
20struct _filter
19struct filter
2120{
2221   filter_real xcoeffs[(FILTER_ORDER_MAX+1)/2];
2322   unsigned order;
2423};
2524
26typedef struct _filter_state filter_state;
27struct _filter_state
25struct filter_state
2826{
2927   unsigned prev_mac;
3028   filter_real xprev[FILTER_ORDER_MAX];
r17907r17908
6563
6664#define Q_TO_DAMP(q)   (1.0/q)
6765
68typedef struct _filter2_context filter2_context;
69struct _filter2_context
66struct filter2_context
7067{
7168   double x0, x1, x2;   /* x[k], x[k-1], x[k-2], current and previous 2 input values */
7269   double y0, y1, y2;   /* y[k], y[k-1], y[k-2], current and previous 2 output values */
trunk/src/emu/sound/es5506.h
r17907r17908
1212
1313#include "devlegcy.h"
1414
15typedef struct _es5505_interface es5505_interface;
16struct _es5505_interface
15struct es5505_interface
1716{
1817   const char * region0;                  /* memory region where the sample ROM lives */
1918   const char * region1;                  /* memory region where the sample ROM lives */
r17907r17908
5352
5453
5554
56typedef struct _es5506_interface es5506_interface;
57struct _es5506_interface
55struct es5506_interface
5856{
5957   const char * region0;                  /* memory region where the sample ROM lives */
6058   const char * region1;                  /* memory region where the sample ROM lives */
trunk/src/emu/sound/ymf278b.h
r17907r17908
88#define YMF278B_STD_CLOCK (33868800)         /* standard clock for OPL4 */
99
1010
11typedef struct _ymf278b_interface ymf278b_interface;
12struct _ymf278b_interface
11struct ymf278b_interface
1312{
1413   void (*irq_callback)(device_t *device, int state);   /* irq callback */
1514};
trunk/src/emu/sound/flt_vol.c
r17907r17908
22#include "flt_vol.h"
33
44
5typedef struct _filter_volume_state filter_volume_state;
6struct _filter_volume_state
5struct filter_volume_state
76{
87   sound_stream *   stream;
98   int            gain;
trunk/src/emu/sound/sid6581.h
r17907r17908
2323#define MOS6581_INTERFACE(name) \
2424   const sid6581_interface (name) =
2525
26typedef struct _sid6581_interface sid6581_interface;
27struct _sid6581_interface
26struct sid6581_interface
2827{
2928   devcb_read8 in_potx_cb;
3029   devcb_read8 in_poty_cb;
trunk/src/emu/sound/2151intf.c
r17907r17908
1212#include "ym2151.h"
1313
1414
15typedef struct _ym2151_state ym2151_state;
16struct _ym2151_state
15struct ym2151_state
1716{
1817   sound_stream *         stream;
1918   emu_timer *            timer[2];
trunk/src/emu/sound/2413intf.c
r17907r17908
1010
1111
1212/* for stream system */
13typedef struct _ym2413_state ym2413_state;
14struct _ym2413_state
13struct ym2413_state
1514{
1615   sound_stream *   stream;
1716   void *         chip;
trunk/src/emu/sound/k053260.c
r17907r17908
1313
1414#define BASE_SHIFT   16
1515
16typedef struct _k053260_channel k053260_channel;
17struct _k053260_channel
16struct k053260_channel
1817{
1918   UINT32      rate;
2019   UINT32      size;
r17907r17908
2928   int         ppcm_data;
3029};
3130
32typedef struct _k053260_state k053260_state;
33struct _k053260_state
31struct k053260_state
3432{
3533   sound_stream *            channel;
3634   int                     mode;
trunk/src/emu/sound/2151intf.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _ym2151_interface ym2151_interface;
9struct _ym2151_interface
8struct ym2151_interface
109{
1110   devcb_write_line irqhandler;
1211   devcb_write8 portwritehandler;
trunk/src/emu/sound/segapcm.c
r17907r17908
55#include "emu.h"
66#include "segapcm.h"
77
8typedef struct _segapcm_state segapcm_state;
9struct _segapcm_state
8struct segapcm_state
109{
1110   UINT8  *ram;
1211   UINT8 low[16];
trunk/src/emu/sound/k053260.h
r17907r17908
1111
1212#include "devlegcy.h"
1313
14typedef struct _k053260_interface k053260_interface;
15struct _k053260_interface {
14struct k053260_interface {
1615   const char *rgnoverride;
1716   timer_expired_func irq;         /* called on SH1 complete cycle ( clock / 32 ) */
1817};
trunk/src/emu/sound/segapcm.h
r17907r17908
1616#define   BANK_MASKF    (0xf0<<16)
1717#define   BANK_MASKF8   (0xf8<<16)
1818
19typedef struct _sega_pcm_interface sega_pcm_interface;
20struct _sega_pcm_interface
19struct sega_pcm_interface
2120{
2221   int  bank;
2322};
trunk/src/emu/sound/vrender0.c
r17907r17908
1212interrupts
1313*************/
1414
15typedef struct _vr0_state vr0_state;
16struct _vr0_state
15struct vr0_state
1716{
1817   UINT32 *TexBase;
1918   UINT32 *FBBase;
trunk/src/emu/sound/8950intf.c
r17907r17908
2222#include "sound/fmopl.h"
2323
2424
25typedef struct _y8950_state y8950_state;
26struct _y8950_state
25struct y8950_state
2726{
2827   sound_stream *   stream;
2928   emu_timer *      timer[2];
trunk/src/emu/sound/vrender0.h
r17907r17908
66#include "devlegcy.h"
77
88
9typedef struct _vr0_interface vr0_interface;
10struct _vr0_interface
9struct vr0_interface
1110{
1211   UINT32 RegBase;
1312};
trunk/src/emu/sound/t6w28.c
r17907r17908
3737
3838#define STEP 0x10000
3939
40typedef struct _t6w28_state t6w28_state;
41struct _t6w28_state
40struct t6w28_state
4241{
4342   sound_stream * Channel;
4443   int SampleRate;
trunk/src/emu/sound/8950intf.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _y8950_interface y8950_interface;
9struct _y8950_interface
8struct y8950_interface
109{
1110   void (*handler)(device_t *device, int linestate);
1211
trunk/src/emu/sound/namco.c
r17907r17908
5050} sound_channel;
5151
5252
53typedef struct _namco_sound namco_sound;
54struct _namco_sound
53struct namco_sound
5554{
5655   /* data about the sound system */
5756   sound_channel channel_list[MAX_VOICES];
trunk/src/emu/sound/sn76477.c
r17907r17908
193193 *
194194 *****************************************************************************/
195195
196typedef struct _sn76477_state sn76477_state;
197struct _sn76477_state
196struct sn76477_state
198197{
199198   /* chip's external interface */
200199   UINT32 enable;
trunk/src/emu/sound/namco.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _namco_interface namco_interface;
9struct _namco_interface
8struct namco_interface
109{
1110   int voices;      /* number of voices */
1211   int stereo;      /* set to 1 to indicate stereo (e.g., System 1) */
trunk/src/emu/sound/sn76477.h
r17907r17908
4949 *
5050 *****************************************************************************/
5151
52typedef struct _sn76477_interface sn76477_interface;
53struct _sn76477_interface
52struct sn76477_interface
5453{
5554   double noise_clock_res;
5655   double noise_filter_res;
trunk/src/emu/sound/vlm5030.c
r17907r17908
119119#define IP_SIZE_FAST    (120/FR_SIZE)
120120#define IP_SIZE_FASTER  ( 80/FR_SIZE)
121121
122typedef struct _vlm5030_state vlm5030_state;
123struct _vlm5030_state
122struct vlm5030_state
124123{
125124   device_t *device;
126125   const vlm5030_interface *intf;
trunk/src/emu/sound/2203intf.c
r17907r17908
33#include "fm.h"
44
55
6typedef struct _ym2203_state ym2203_state;
7struct _ym2203_state
6struct ym2203_state
87{
98   sound_stream *   stream;
109   emu_timer *      timer[2];
trunk/src/emu/sound/vlm5030.h
r17907r17908
55
66#include "devlegcy.h"
77
8typedef struct _vlm5030_interface vlm5030_interface;
9struct _vlm5030_interface
8struct vlm5030_interface
109{
1110   int memory_size;    /* memory size of speech rom (0=memory region length) */
1211};
trunk/src/emu/sound/tms5220.c
r17907r17908
343343
344344static const UINT8 reload_table[4] = { 0, 2, 4, 6 }; //sample count reload for 5220c only; 5200 and 5220 always reload with 0; keep in mind this is loaded on IP=0 PC=12 subcycle=1 so it immediately will increment after one sample, effectively being 1,3,5,7 as in the comments above.
345345
346typedef struct _tms5220_state tms5220_state;
347struct _tms5220_state
346struct tms5220_state
348347{
349348   /* coefficient tables */
350349   int variant;            /* Variant of the 5xxx - see tms5110r.h */
trunk/src/emu/sound/2203intf.h
r17907r17908
99
1010void ym2203_update_request(void *param);
1111
12typedef struct _ym2203_interface ym2203_interface;
13struct _ym2203_interface
12struct ym2203_interface
1413{
1514   const ay8910_interface ay8910_intf;
1615   devcb_write_line irqhandler;
trunk/src/emu/sound/k007232.h
r17907r17908
99
1010#include "devlegcy.h"
1111
12typedef struct _k007232_interface k007232_interface;
13struct _k007232_interface
12struct k007232_interface
1413{
1514   void (*portwritehandler)(device_t *, int);
1615};
trunk/src/emu/sound/tms5220.h
r17907r17908
1111/* usually 640000 for 8000 Hz sample rate or */
1212/* usually 800000 for 10000 Hz sample rate.  */
1313
14typedef struct _tms5220_interface tms5220_interface;
15struct _tms5220_interface
14struct tms5220_interface
1615{
1716   devcb_write_line irq_func;      /* IRQ callback function, active low, i.e. state=0 */
1817   devcb_write_line readyq_func;   /* Ready callback function, active low, i.e. state=0 */
trunk/src/emu/sound/okim6258.c
r17907r17908
2121
2222static const int dividers[4] = { 1024, 768, 512, 512 };
2323
24typedef struct _okim6258_state okim6258_state;
25struct _okim6258_state
24struct okim6258_state
2625{
2726   UINT8  status;
2827
trunk/src/emu/sound/nile.c
r17907r17908
5151
5252
5353
54typedef struct _nile_state nile_state;
55struct _nile_state
54struct nile_state
5655{
5756   sound_stream * stream;
5857   UINT8 *sound_ram;
trunk/src/emu/sound/okim6258.h
r17907r17908
77
88/* an interface for the OKIM6258 and similar chips */
99
10typedef struct _okim6258_interface okim6258_interface;
11struct _okim6258_interface
10struct okim6258_interface
1211{
1312   int divider;
1413   int adpcm_type;
trunk/src/emu/sound/es8712.c
r17907r17908
1919
2020
2121/* struct describing a playing ADPCM chip */
22typedef struct _es8712_state es8712_state;
23struct _es8712_state
22struct es8712_state
2423{
2524   UINT8 playing;         /* 1 if we're actively playing */
2625
trunk/src/emu/sound/262intf.c
r17907r17908
1010#include "ymf262.h"
1111
1212
13typedef struct _ymf262_state ymf262_state;
14struct _ymf262_state
13struct ymf262_state
1514{
1615   sound_stream *   stream;
1716   emu_timer *      timer[2];
trunk/src/emu/sound/nes_apu.c
r17907r17908
5555#define  SYNCS_MAX2     0x80
5656
5757/* GLOBAL VARIABLES */
58typedef struct _nesapu_state nesapu_state;
59struct _nesapu_state
58struct nesapu_state
6059{
6160   apu_t   APU;                /* Actual APUs */
6261   float   apu_incsize;           /* Adjustment increment */
trunk/src/emu/machine.h
r17907r17908
152152class debug_view_manager;
153153class osd_interface;
154154
155typedef struct _palette_private palette_private;
156typedef struct _romload_private romload_private;
157typedef struct _ui_input_private ui_input_private;
158typedef struct _debugcpu_private debugcpu_private;
159typedef struct _generic_machine_private generic_machine_private;
155struct palette_private;
156struct romload_private;
157struct ui_input_private;
158struct debugcpu_private;
159struct generic_machine_private;
160160
161161
162162// ======================> system_time
trunk/src/emu/crsshair.c
r17907r17908
3030    TYPE DEFINITIONS
3131***************************************************************************/
3232
33typedef struct _crosshair_global crosshair_global;
34struct _crosshair_global
33struct crosshair_global
3534{
3635   UINT8            usage;               /* true if any crosshairs are used */
3736   UINT8            used[MAX_PLAYERS];      /* usage per player */
trunk/src/emu/ioport.h
r17907r17908
685685struct ioport_field_live;
686686class ioport_manager;
687687class emu_timer;
688typedef struct _xml_data_node xml_data_node;
688struct xml_data_node;
689689class analog_field;
690690
691691// constructor function pointer
trunk/src/emu/ui.h
r17907r17908
9393
9494typedef INT32 (*slider_update)(running_machine &machine, void *arg, astring *string, INT32 newval);
9595
96typedef struct _slider_state slider_state;
97struct _slider_state
96struct slider_state
9897{
9998   slider_state *   next;            /* pointer to next slider */
10099   slider_update   update;            /* callback */
trunk/src/emu/crsshair.h
r17907r17908
4343***************************************************************************/
4444
4545/* user-controllable settings for a player */
46typedef struct _crosshair_user_settings crosshair_user_settings;
47struct _crosshair_user_settings
46struct crosshair_user_settings
4847{
4948   UINT8         used;      /* is used */
5049   UINT8         mode;      /* visibility mode */
trunk/src/emu/emupal.c
r17907r17908
2929***************************************************************************/
3030
3131/* information about a shadow table */
32typedef struct _shadow_table_data shadow_table_data;
33struct _shadow_table_data
32struct shadow_table_data
3433{
3534   UINT32 *         base;            /* pointer to the base of the table */
3635   INT16            dr;               /* delta red value */
r17907r17908
4140
4241
4342/* typedef struct _palette_private palette_private; */
44struct _palette_private
43struct palette_private
4544{
4645   bitmap_format      format;            /* format assumed for palette data */
4746
trunk/src/emu/render.h
r17907r17908
171171class screen_device;
172172class render_container;
173173class render_manager;
174typedef struct _xml_data_node xml_data_node;
174struct xml_data_node;
175175class render_font;
176176struct object_transform;
177177class layout_element;
trunk/src/emu/romload.c
r17907r17908
5757};
5858
5959
60typedef struct _romload_private rom_load_data;
61struct _romload_private
60struct romload_private
6261{
6362   running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
6463
r17907r17908
283282    from SystemBios structure and OPTION_BIOS
284283-------------------------------------------------*/
285284
286static void determine_bios_rom(rom_load_data *romdata, device_t *device,const char *specbios)
285static void determine_bios_rom(romload_private *romdata, device_t *device,const char *specbios)
287286{
288287   const char *defaultname = NULL;
289288   const rom_entry *rom;
r17907r17908
337336    that will need to be loaded
338337-------------------------------------------------*/
339338
340static void count_roms(rom_load_data *romdata)
339static void count_roms(romload_private *romdata)
341340{
342341   const rom_entry *region, *rom;
343342
r17907r17908
375374    for missing files
376375-------------------------------------------------*/
377376
378static void handle_missing_file(rom_load_data *romdata, const rom_entry *romp)
377static void handle_missing_file(romload_private *romdata, const rom_entry *romp)
379378{
380379   /* optional files are okay */
381380   if (ROM_ISOPTIONAL(romp))
r17907r17908
406405    correct checksums for a given ROM
407406-------------------------------------------------*/
408407
409static void dump_wrong_and_correct_checksums(rom_load_data *romdata, const hash_collection &hashes, const hash_collection &acthashes)
408static void dump_wrong_and_correct_checksums(romload_private *romdata, const hash_collection &hashes, const hash_collection &acthashes)
410409{
411410   astring tempstr;
412411   romdata->errorstring.catprintf("    EXPECTED: %s\n", hashes.macro_string(tempstr));
r17907r17908
419418    and hash signatures of a file
420419-------------------------------------------------*/
421420
422static void verify_length_and_hash(rom_load_data *romdata, const char *name, UINT32 explength, const hash_collection &hashes)
421static void verify_length_and_hash(romload_private *romdata, const char *name, UINT32 explength, const hash_collection &hashes)
423422{
424423   /* we've already complained if there is no file */
425424   if (romdata->file == NULL)
r17907r17908
463462    messages about ROM loading to the user
464463-------------------------------------------------*/
465464
466static void display_loading_rom_message(rom_load_data *romdata, const char *name)
465static void display_loading_rom_message(romload_private *romdata, const char *name)
467466{
468467   char buffer[200];
469468
r17907r17908
483482    results of ROM loading
484483-------------------------------------------------*/
485484
486static void display_rom_load_results(rom_load_data *romdata)
485static void display_rom_load_results(romload_private *romdata)
487486{
488487   /* final status display */
489488   display_loading_rom_message(romdata, NULL);
r17907r17908
512511    byte swapping and inverting data as necessary
513512-------------------------------------------------*/
514513
515static void region_post_process(rom_load_data *romdata, const char *rgntag, bool invert)
514static void region_post_process(romload_private *romdata, const char *rgntag, bool invert)
516515{
517516   memory_region *region = romdata->machine().root_device().memregion(rgntag);
518517   UINT8 *base;
r17907r17908
553552    up the parent and loading by checksum
554553-------------------------------------------------*/
555554
556static int open_rom_file(rom_load_data *romdata, const char *regiontag, const rom_entry *romp)
555static int open_rom_file(romload_private *romdata, const char *regiontag, const rom_entry *romp)
557556{
558557   file_error filerr = FILERR_NOT_FOUND;
559558   UINT32 romsize = rom_file_size(romp);
r17907r17908
651650    random data for a NULL file
652651-------------------------------------------------*/
653652
654static int rom_fread(rom_load_data *romdata, UINT8 *buffer, int length, const rom_entry *parent_region)
653static int rom_fread(romload_private *romdata, UINT8 *buffer, int length, const rom_entry *parent_region)
655654{
656655   /* files just pass through */
657656   if (romdata->file != NULL)
r17907r17908
670669    entry
671670-------------------------------------------------*/
672671
673static int read_rom_data(rom_load_data *romdata, const rom_entry *parent_region, const rom_entry *romp)
672static int read_rom_data(romload_private *romdata, const rom_entry *parent_region, const rom_entry *romp)
674673{
675674   int datashift = ROM_GETBITSHIFT(romp);
676675   int datamask = ((1 << ROM_GETBITWIDTH(romp)) - 1) << datashift;
r17907r17908
790789    fill_rom_data - fill a region of ROM space
791790-------------------------------------------------*/
792791
793static void fill_rom_data(rom_load_data *romdata, const rom_entry *romp)
792static void fill_rom_data(romload_private *romdata, const rom_entry *romp)
794793{
795794   UINT32 numbytes = ROM_GETLENGTH(romp);
796795   UINT8 *base = romdata->region->base() + ROM_GETOFFSET(romp);
r17907r17908
812811    copy_rom_data - copy a region of ROM space
813812-------------------------------------------------*/
814813
815static void copy_rom_data(rom_load_data *romdata, const rom_entry *romp)
814static void copy_rom_data(romload_private *romdata, const rom_entry *romp)
816815{
817816   UINT8 *base = romdata->region->base() + ROM_GETOFFSET(romp);
818817   const char *srcrgntag = ROM_GETNAME(romp);
r17907r17908
846845    for a region
847846-------------------------------------------------*/
848847
849static void process_rom_entries(rom_load_data *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, device_t *device)
848static void process_rom_entries(romload_private *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, device_t *device)
850849{
851850   UINT32 lastflags = 0;
852851
r17907r17908
11371136    for a region
11381137-------------------------------------------------*/
11391138
1140static void process_disk_entries(rom_load_data *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, const char *locationtag)
1139static void process_disk_entries(romload_private *romdata, const char *regiontag, const rom_entry *parent_region, const rom_entry *romp, const char *locationtag)
11411140{
11421141   /* loop until we hit the end of this region */
11431142   for ( ; !ROMENTRY_ISREGIONEND(romp); romp++)
r17907r17908
12621261void load_software_part_region(device_t *device, char *swlist, char *swname, rom_entry *start_region)
12631262{
12641263   astring locationtag(swlist), breakstr("%");
1265   rom_load_data *romdata = device->machine().romload_data;
1264   romload_private *romdata = device->machine().romload_data;
12661265   const rom_entry *region;
12671266   astring regiontag;
12681267
r17907r17908
13751374    process_region_list - process a region list
13761375-------------------------------------------------*/
13771376
1378static void process_region_list(rom_load_data *romdata)
1377static void process_region_list(romload_private *romdata)
13791378{
13801379   astring regiontag;
13811380
r17907r17908
14421441
14431442void rom_init(running_machine &machine)
14441443{
1445   rom_load_data *romdata;
1444   romload_private *romdata;
14461445
14471446   /* allocate private data */
14481447   machine.romload_data = romdata = auto_alloc_clear(machine, romload_private);
trunk/src/emu/imagedev/flopdrv.c
r17907r17908
2929    TYPE DEFINITIONS
3030***************************************************************************/
3131
32typedef struct _floppy_drive floppy_drive;
33struct _floppy_drive
32struct floppy_drive
3433{
3534   /* callbacks */
3635   devcb_resolved_write_line out_idx_func;
r17907r17908
9190};
9291
9392
94typedef struct _floppy_error_map floppy_error_map;
95struct _floppy_error_map
93struct floppy_error_map
9694{
9795   floperr_t ferr;
9896   image_error_t ierr;
trunk/src/emu/imagedev/bitbngr.c
r17907r17908
331331
332332void bitbanger_device::device_config_complete(void)
333333{
334   const _bitbanger_config *intf = reinterpret_cast<const _bitbanger_config *>(static_config());
334   const bitbanger_config *intf = reinterpret_cast<const bitbanger_config *>(static_config());
335335   if(intf != NULL)
336336   {
337      *static_cast<_bitbanger_config *>(this) = *intf;
337      *static_cast<bitbanger_config *>(this) = *intf;
338338   }
339339   else
340340   {
trunk/src/emu/imagedev/bitbngr.h
r17907r17908
6565    TYPE DEFINITIONS
6666***************************************************************************/
6767
68typedef struct _bitbanger_config bitbanger_config;
69struct _bitbanger_config
68struct bitbanger_config
7069{
7170   /* callback to driver */
7271   devcb_write_line      m_input_callback;
r17907r17908
8584
8685class bitbanger_device :   public device_t,
8786                     public device_image_interface,
88                     public _bitbanger_config
87                     public bitbanger_config
8988{
9089public:
9190   // construction/destruction
trunk/src/emu/config.c
r17907r17908
2424    TYPE DEFINITIONS
2525***************************************************************************/
2626
27typedef struct _config_type config_type;
28struct _config_type
27struct config_type
2928{
30   struct _config_type *   next;            /* next in line */
29   config_type *         next;            /* next in line */
3130   const char *         name;            /* node name */
3231   config_saveload_delegate load;            /* load callback */
3332   config_saveload_delegate save;            /* save callback */
trunk/src/emu/uigfx.c
r17907r17908
2323    TYPE DEFINITIONS
2424***************************************************************************/
2525
26typedef struct _ui_gfx_state ui_gfx_state;
27struct _ui_gfx_state
26struct ui_gfx_state
2827{
2928   UINT8         mode;            /* which mode are we in? */
3029
trunk/src/emu/uiinput.c
r17907r17908
3434***************************************************************************/
3535
3636/* private input port state */
37struct _ui_input_private
37struct ui_input_private
3838{
3939   /* pressed states; retrieved with ui_input_pressed() */
4040   osd_ticks_t               next_repeat[IPT_COUNT];
trunk/src/emu/uiinput.h
r17907r17908
2121    TYPE DEFINITIONS
2222***************************************************************************/
2323
24enum _ui_event_type
24enum ui_event_type
2525{
2626   UI_EVENT_NONE,
2727   UI_EVENT_MOUSE_MOVE,
r17907r17908
3131   UI_EVENT_MOUSE_DOUBLE_CLICK,
3232   UI_EVENT_CHAR
3333};
34typedef enum _ui_event_type ui_event_type;
3534
3635
37typedef struct _ui_event ui_event;
38struct _ui_event
36struct ui_event
3937{
4038   ui_event_type      event_type;
4139   render_target *      target;
trunk/src/emu/machine/adc1213x.c
r17907r17908
2020    TYPE DEFINITIONS
2121***************************************************************************/
2222
23typedef struct _adc12138_state adc12138_state;
24struct _adc12138_state
23struct adc12138_state
2524{
2625   adc1213x_input_convert_func input_callback_r;
2726
trunk/src/emu/machine/adc1213x.h
r17907r17908
7373
7474typedef double (*adc1213x_input_convert_func)(device_t *device, UINT8 input);
7575
76typedef struct _adc12138_interface adc12138_interface;
77struct _adc12138_interface
76struct adc12138_interface
7877{
7978   adc1213x_input_convert_func input_callback_r;
8079};
trunk/src/emu/machine/74153.c
r17907r17908
3737#include "machine/74153.h"
3838
3939
40typedef struct _ttl74153_state ttl74153_state;
41struct _ttl74153_state
40struct ttl74153_state
4241{
4342   /* callback */
4443   void (*output_cb)(device_t *device);
trunk/src/emu/machine/74153.h
r17907r17908
3939#include "devlegcy.h"
4040
4141
42typedef struct _ttl74153_config ttl74153_config;
43struct _ttl74153_config
42struct ttl74153_config
4443{
4544   void (*output_cb)(device_t *device);
4645};
trunk/src/emu/machine/tms6100.c
r17907r17908
7373#define TMS6100_READ_PENDING      0x01
7474#define TMS6100_NEXT_READ_IS_DUMMY   0x02
7575
76typedef struct _tms6100_state tms6100_state;
77struct _tms6100_state
76struct tms6100_state
7877{
7978   /* Rom interface */
8079   UINT32 address;
trunk/src/emu/machine/smc91c9x.c
r17907r17908
106106    TYPE DEFINITIONS
107107***************************************************************************/
108108
109typedef struct _smc91c9x_state smc91c9x_state;
110struct _smc91c9x_state
109struct smc91c9x_state
111110{
112111   device_t *device;
113112   smc91c9x_irq_func irq_handler;
trunk/src/emu/machine/smc91c9x.h
r17907r17908
1919typedef void (*smc91c9x_irq_func)(device_t *device, int state);
2020
2121
22typedef struct _smc91c9x_config smc91c9x_config;
23struct _smc91c9x_config
22struct smc91c9x_config
2423{
2524   smc91c9x_irq_func   interrupt;
2625};
trunk/src/emu/machine/adc083x.c
r17907r17908
4444    TYPE DEFINITIONS
4545***************************************************************************/
4646
47typedef struct _adc0831_state adc0831_state;
48struct _adc0831_state
47struct adc0831_state
4948{
5049   adc083x_input_convert_func input_callback_r;
5150
trunk/src/emu/machine/adc083x.h
r17907r17908
101101
102102typedef double (*adc083x_input_convert_func)(device_t *device, UINT8 input);
103103
104typedef struct _adc083x_interface adc083x_interface;
105struct _adc083x_interface
104struct adc083x_interface
106105{
107106   adc083x_input_convert_func input_callback_r;
108107};
trunk/src/emu/machine/msm6242.h
r17907r17908
2525
2626// ======================> msm6242_interface
2727
28typedef struct _msm6242_interface msm6242_interface;
29struct _msm6242_interface
28struct msm6242_interface
3029{
3130   devcb_write_line   m_out_int_cb;
3231};
trunk/src/emu/machine/upd4701.c
r17907r17908
1515    TYPE DEFINITIONS
1616***************************************************************************/
1717
18typedef struct _upd4701_state upd4701_state;
19struct _upd4701_state
18struct upd4701_state
2019{
2120   int cs;
2221   int xy;
trunk/src/emu/machine/wd17xx.c
r17907r17908
287287    TYPE DEFINITIONS
288288***************************************************************************/
289289
290typedef struct _wd1770_state wd1770_state;
291struct _wd1770_state
290struct wd1770_state
292291{
293292   /* callbacks */
294293   devcb_resolved_read_line in_dden_func;
trunk/src/emu/machine/adc1038.c
r17907r17908
1414    TYPE DEFINITIONS
1515***************************************************************************/
1616
17typedef struct _adc1038_state adc1038_state;
18struct _adc1038_state
17struct adc1038_state
1918{
2019   int cycle;
2120   int clk;
trunk/src/emu/machine/wd17xx.h
r17907r17908
233233***************************************************************************/
234234
235235/* Interface */
236typedef struct _wd17xx_interface wd17xx_interface;
237struct _wd17xx_interface
236struct wd17xx_interface
238237{
239238   devcb_read_line in_dden_func;
240239   devcb_write_line out_intrq_func;
trunk/src/emu/machine/s3c2440.h
r17907r17908
7373typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin);
7474typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data);
7575
76typedef struct _s3c2440_interface_core s3c2440_interface_core;
77struct _s3c2440_interface_core
76struct s3c2440_interface_core
7877{
7978   s3c24xx_core_pin_r_func pin_r;
8079   s3c24xx_core_pin_w_func pin_w;
8180};
8281
83typedef struct _s3c2440_interface_gpio s3c2440_interface_gpio;
84struct _s3c2440_interface_gpio
82struct s3c2440_interface_gpio
8583{
8684   s3c24xx_gpio_port_r_func port_r;
8785   s3c24xx_gpio_port_w_func port_w;
8886};
8987
90typedef struct _s3c2440_interface_i2c s3c2440_interface_i2c;
91struct _s3c2440_interface_i2c
88struct s3c2440_interface_i2c
9289{
9390   write_line_device_func scl_w;
9491   read_line_device_func sda_r;
9592   write_line_device_func sda_w;
9693};
9794
98typedef struct _s3c2440_interface_adc s3c2440_interface_adc;
99struct _s3c2440_interface_adc
95struct s3c2440_interface_adc
10096{
10197   read32_device_func data_r;
10298};
10399
104typedef struct _s3c2440_interface_i2s s3c2440_interface_i2s;
105struct _s3c2440_interface_i2s
100struct s3c2440_interface_i2s
106101{
107102   write16_device_func data_w;
108103};
109104
110typedef struct _s3c2440_interface_nand s3c2440_interface_nand;
111struct _s3c2440_interface_nand
105struct s3c2440_interface_nand
112106{
113107   write8_device_func command_w;
114108   write8_device_func address_w;
r17907r17908
116110   write8_device_func data_w;
117111};
118112
119typedef struct _s3c2440_interface_lcd s3c2440_interface_lcd;
120struct _s3c2440_interface_lcd
113struct s3c2440_interface_lcd
121114{
122115   int flags;
123116};
124117
125typedef struct _s3c2440_interface s3c2440_interface;
126struct _s3c2440_interface
118struct s3c2440_interface
127119{
128120   s3c2440_interface_core core;
129121   s3c2440_interface_gpio gpio;
trunk/src/emu/machine/adc1038.h
r17907r17908
1919
2020typedef int (*adc1038_input_read_func)(device_t *device, int input);
2121
22typedef struct _adc1038_interface adc1038_interface;
23struct _adc1038_interface
22struct adc1038_interface
2423{
2524   int gticlub_hack;
2625   adc1038_input_read_func input_callback_r;
trunk/src/emu/machine/latch8.c
r17907r17908
1010#include "sound/discrete.h"
1111#include "latch8.h"
1212
13typedef struct _latch8_t latch8_t;
14struct _latch8_t
13struct latch8_t
1514{
1615   latch8_config   *intf;
1716   UINT8          value;
trunk/src/emu/machine/latch8.h
r17907r17908
2121    TYPE DEFINITIONS
2222***************************************************************************/
2323
24typedef struct _latch8_devread latch8_devread;
25struct _latch8_devread
24struct latch8_devread
2625{
2726   /* only for byte reads, does not affect bit reads and node_map */
2827   UINT32               from_bit;
r17907r17908
3130   read8_space_func      read_handler;
3231};
3332
34typedef struct _latch8_config latch8_config;
35struct _latch8_config
33struct latch8_config
3634{
3735   /* only for byte reads, does not affect bit reads and node_map */
3836   UINT32               maskout;
trunk/src/emu/machine/mb14241.c
r17907r17908
77#include "emu.h"
88#include "machine/mb14241.h"
99
10typedef struct _mb14241_state  mb14241_state;
11struct _mb14241_state
10struct mb14241_state
1211{
1312   UINT16 shift_data;   /* 15 bits only */
1413   UINT8 shift_count;   /* 3 bits */
trunk/src/emu/machine/idectrl.c
r17907r17908
103103/***************************************************************************
104104    TYPE DEFINITIONS
105105***************************************************************************/
106typedef struct _ide_device ide_device;
107struct _ide_device
106struct ide_device
108107{
109108   UINT16         cur_cylinder;
110109   UINT8         cur_sector;
r17907r17908
115114};
116115
117116
118typedef struct _ide_state ide_state;
119struct _ide_state
117struct ide_state
120118{
121119   device_t *device;
122120
trunk/src/emu/machine/74148.c
r17907r17908
4242#include "machine/74148.h"
4343
4444
45typedef struct _ttl74148_state ttl74148_state;
46struct _ttl74148_state
45struct ttl74148_state
4746{
4847   /* callback */
4948   void (*output_cb)(device_t *device);
trunk/src/emu/machine/idectrl.h
r17907r17908
130130    TYPE DEFINITIONS
131131***************************************************************************/
132132
133typedef struct _ide_config ide_config;
134struct _ide_config
133struct ide_config
135134{
136135   void   (*interrupt)(device_t *device, int state);
137136   const char *bmcpu;      /* name of bus master CPU */
trunk/src/emu/machine/74148.h
r17907r17908
4444#include "devlegcy.h"
4545
4646
47typedef struct _ttl74148_config ttl74148_config;
48struct _ttl74148_config
47struct ttl74148_config
4948{
5049   void (*output_cb)(device_t *device);
5150};
trunk/src/emu/machine/68681.h
r17907r17908
33
44#include "devlegcy.h"
55
6typedef struct _duart68681_config duart68681_config;
7struct _duart68681_config
6struct duart68681_config
87{
98   void (*irq_handler)(device_t *device, int state, UINT8 vector);
109   void (*tx_callback)(device_t *device, int channel, UINT8 data);
trunk/src/emu/machine/pd4990a.c
r17907r17908
4848    TYPE DEFINITIONS
4949***************************************************************************/
5050
51typedef struct _upd4990a_state upd4990a_state;
52struct _upd4990a_state
51struct upd4990a_state
5352{
5453   int seconds;   /* seconds BCD */
5554   int minutes;   /* minutes BCD */
trunk/src/emu/machine/s3c2400.h
r17907r17908
6565typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin);
6666typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data);
6767
68typedef struct _s3c2400_interface_core s3c2400_interface_core;
69struct _s3c2400_interface_core
68struct s3c2400_interface_core
7069{
7170   s3c24xx_core_pin_r_func pin_r;
7271   s3c24xx_core_pin_w_func pin_w;
7372};
7473
75typedef struct _s3c2400_interface_gpio s3c2400_interface_gpio;
76struct _s3c2400_interface_gpio
74struct s3c2400_interface_gpio
7775{
7876   s3c24xx_gpio_port_r_func port_r;
7977   s3c24xx_gpio_port_w_func port_w;
8078};
8179
82typedef struct _s3c2400_interface_i2c s3c2400_interface_i2c;
83struct _s3c2400_interface_i2c
80struct s3c2400_interface_i2c
8481{
8582   write_line_device_func scl_w;
8683   read_line_device_func sda_r;
8784   write_line_device_func sda_w;
8885};
8986
90typedef struct _s3c2400_interface_adc s3c2400_interface_adc;
91struct _s3c2400_interface_adc
87struct s3c2400_interface_adc
9288{
9389   read32_device_func data_r;
9490};
9591
96typedef struct _s3c2400_interface_i2s s3c2400_interface_i2s;
97struct _s3c2400_interface_i2s
92struct s3c2400_interface_i2s
9893{
9994   write16_device_func data_w;
10095};
10196
102typedef struct _s3c2400_interface_lcd s3c2400_interface_lcd;
103struct _s3c2400_interface_lcd
97struct s3c2400_interface_lcd
10498{
10599   int flags;
106100};
107101
108typedef struct _s3c2400_interface s3c2400_interface;
109struct _s3c2400_interface
102struct s3c2400_interface
110103{
111104   s3c2400_interface_core core;
112105   s3c2400_interface_gpio gpio;
trunk/src/emu/machine/generic.c
r17907r17908
2828    TYPE DEFINITIONS
2929***************************************************************************/
3030
31struct _generic_machine_private
31struct generic_machine_private
3232{
3333   /* tickets and coin counters */
3434   UINT32      dispensed_tickets;
trunk/src/emu/machine/rp5h01.c
r17907r17908
2929    TYPE DEFINITIONS
3030***************************************************************************/
3131
32typedef struct _rp5h01_state rp5h01_state;
33struct _rp5h01_state
32struct rp5h01_state
3433{
3534   int counter;
3635   int counter_mode;   /* test pin */
trunk/src/emu/machine/s3c2410.h
r17907r17908
7575typedef int (*s3c24xx_core_pin_r_func)( device_t *device, int pin);
7676typedef void (*s3c24xx_core_pin_w_func)( device_t *device, int pin, int data);
7777
78typedef struct _s3c2410_interface_core s3c2410_interface_core;
79struct _s3c2410_interface_core
78struct s3c2410_interface_core
8079{
8180   s3c24xx_core_pin_r_func pin_r;
8281   s3c24xx_core_pin_w_func pin_w;
8382};
8483
85typedef struct _s3c2410_interface_gpio s3c2410_interface_gpio;
86struct _s3c2410_interface_gpio
84struct s3c2410_interface_gpio
8785{
8886   s3c24xx_gpio_port_r_func port_r;
8987   s3c24xx_gpio_port_w_func port_w;
9088};
9189
92typedef struct _s3c2410_interface_i2c s3c2410_interface_i2c;
93struct _s3c2410_interface_i2c
90struct s3c2410_interface_i2c
9491{
9592   write_line_device_func scl_w;
9693   read_line_device_func sda_r;
9794   write_line_device_func sda_w;
9895};
9996
100typedef struct _s3c2410_interface_adc s3c2410_interface_adc;
101struct _s3c2410_interface_adc
97struct s3c2410_interface_adc
10298{
10399   read32_device_func data_r;
104100};
105101
106typedef struct _s3c2410_interface_i2s s3c2410_interface_i2s;
107struct _s3c2410_interface_i2s
102struct s3c2410_interface_i2s
108103{
109104   write16_device_func data_w;
110105};
111106
112typedef struct _s3c2410_interface_nand s3c2410_interface_nand;
113struct _s3c2410_interface_nand
107struct s3c2410_interface_nand
114108{
115109   write8_device_func command_w;
116110   write8_device_func address_w;
r17907r17908
118112   write8_device_func data_w;
119113};
120114
121typedef struct _s3c2410_interface_lcd s3c2410_interface_lcd;
122struct _s3c2410_interface_lcd
115struct s3c2410_interface_lcd
123116{
124117   int flags;
125118};
126119
127typedef struct _s3c2410_interface s3c2410_interface;
128struct _s3c2410_interface
120struct s3c2410_interface
129121{
130122   s3c2410_interface_core core;
131123   s3c2410_interface_gpio gpio;
trunk/src/emu/machine/6525tpi.c
r17907r17908
106106    TYPE DEFINITIONS
107107***************************************************************************/
108108
109typedef struct _tpi6525_state tpi6525_state;
110struct _tpi6525_state
109struct tpi6525_state
111110{
112111   devcb_resolved_write_line   out_irq_func;
113112   devcb_resolved_read8      in_pa_func;
trunk/src/emu/machine/6525tpi.h
r17907r17908
3434    TYPE DEFINITIONS
3535***************************************************************************/
3636
37typedef struct _tpi6525_interface tpi6525_interface;
38struct _tpi6525_interface
37struct tpi6525_interface
3938{
4039   devcb_write_line   out_irq_func;
4140
trunk/src/emu/machine/k053252.c
r17907r17908
5555#include "emu.h"
5656#include "k053252.h"
5757
58typedef struct _k053252_state k053252_state;
59struct _k053252_state
58struct k053252_state
6059{
6160   UINT8   regs[16];
6261   UINT16  hc,hfp,hbp;
trunk/src/emu/machine/mb87078.c
r17907r17908
7171#include "emu.h"
7272#include "machine/mb87078.h"
7373
74typedef struct _mb87078_state  mb87078_state;
75struct _mb87078_state
74struct mb87078_state
7675{
7776   int          gain[4];      /* gain index 0-63,64,65 */
7877   int          channel_latch;   /* current channel */
trunk/src/emu/machine/pit8253.c
r17907r17908
8282   UINT32 cycles_to_output;      /* cycles until output callback called */
8383};
8484
85typedef struct _pit8253_t   pit8253_t;
86struct _pit8253_t
85struct    pit8253_t
8786{
88   const struct pit8253_config *config;
87   const pit8253_config *config;
8988   int   device_type;
90   struct pit8253_timer timers[MAX_TIMER];
89   pit8253_timer timers[MAX_TIMER];
9190};
9291
9392#define   CTRL_ACCESS(control)      (((control)   >> 4) &   0x03)
r17907r17908
111110}
112111
113112
114static struct pit8253_timer   *get_timer(struct _pit8253_t *pit,int which)
113static pit8253_timer   *get_timer(pit8253_t *pit,int which)
115114{
116115   which &= 3;
117116   if (which < MAX_TIMER)
r17907r17908
120119}
121120
122121
123static int pit8253_gate(struct pit8253_timer *timer)
122static int pit8253_gate(pit8253_timer *timer)
124123{
125124   if (!timer->in_gate_func.isnull())
126125      return timer->in_gate_func();
r17907r17908
159158/* This function subtracts 1 from timer->value "cycles" times, taking into
160159   account binary or BCD operation, and wrapping around from 0 to 0xFFFF or
161160   0x9999 as necessary. */
162static void   decrease_counter_value(struct pit8253_timer   *timer,UINT64 cycles)
161static void   decrease_counter_value(pit8253_timer   *timer,UINT64 cycles)
163162{
164163   UINT16 value;
165164   int units, tens, hundreds, thousands;
r17907r17908
215214
216215
217216/* Counter loading: transfer of a count from the CR to the CE */
218static void load_counter_value(device_t *device, struct pit8253_timer *timer)
217static void load_counter_value(device_t *device, pit8253_timer *timer)
219218{
220219   timer->value = timer->count;
221220   timer->null_count = 1;
r17907r17908
224223}
225224
226225
227static void   set_output(device_t *device, struct pit8253_timer *timer,int output)
226static void   set_output(device_t *device, pit8253_timer *timer,int output)
228227{
229228   if (output != timer->output)
230229   {
r17907r17908
236235
237236/* This emulates timer "timer" for "elapsed_cycles" cycles and assumes no
238237   callbacks occur during that time. */
239static void   simulate2(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles)
238static void   simulate2(device_t *device, pit8253_timer *timer, INT64 elapsed_cycles)
240239{
241240   UINT32 adjusted_value;
242241   int   bcd   = CTRL_BCD(timer->control);
r17907r17908
639638   inaccurate by more than one cycle, and the output changed multiple
640639   times during the discrepancy. In practice updates should still be O(1).
641640*/
642static void   simulate(device_t *device, struct pit8253_timer *timer, INT64 elapsed_cycles)
641static void   simulate(device_t *device, pit8253_timer *timer, INT64 elapsed_cycles)
643642{
644643   if ( elapsed_cycles > 0 )
645644      simulate2(device, timer, elapsed_cycles);
r17907r17908
650649
651650
652651/* This brings timer "timer" up to date */
653static void   update(device_t *device, struct pit8253_timer *timer)
652static void   update(device_t *device, pit8253_timer *timer)
654653{
655654   /* With the 82C54's maximum clockin of 10MHz, 64 bits is nearly 60,000
656655       years of time. Should be enough for now. */
r17907r17908
677676{
678677   device_t *device = (device_t *)ptr;
679678   pit8253_t   *pit8253 = get_safe_token(device);
680   struct pit8253_timer *timer = get_timer(pit8253,param);
679   pit8253_timer *timer = get_timer(pit8253,param);
681680
682681   LOG2(("pit8253: output_changed(): timer %d\n",param));
683682
r17907r17908
688687/* We recycle bit 0 of timer->value to hold the phase in mode 3 when count is
689688   odd. Since read commands in mode 3 always return even numbers, we need to
690689   mask this bit off. */
691static UINT16 masked_value(struct pit8253_timer   *timer)
690static UINT16 masked_value(pit8253_timer   *timer)
692691{
693692   LOG2(("pit8253: masked_value\n"));
694693
r17907r17908
705704READ8_DEVICE_HANDLER( pit8253_r )
706705{
707706   pit8253_t   *pit8253 = get_safe_token(device);
708   struct pit8253_timer *timer   = get_timer(pit8253,offset);
707   pit8253_timer *timer   = get_timer(pit8253,offset);
709708   UINT8   data;
710709   UINT16 value;
711710
r17907r17908
773772
774773
775774/* Loads a new value from the bus to the count register (CR) */
776static void   load_count(device_t *device, struct pit8253_timer *timer, UINT16 newcount)
775static void   load_count(device_t *device, pit8253_timer *timer, UINT16 newcount)
777776{
778777   int   mode = CTRL_MODE(timer->control);
779778
r17907r17908
806805}
807806
808807
809static void   readback(device_t *device, struct pit8253_timer *timer,int command)
808static void   readback(device_t *device, pit8253_timer *timer,int command)
810809{
811810   UINT16 value;
812811   update(device, timer);
r17907r17908
861860WRITE8_DEVICE_HANDLER( pit8253_w )
862861{
863862   pit8253_t   *pit8253 = get_safe_token(device);
864   struct pit8253_timer *timer   = get_timer(pit8253,offset);
863   pit8253_timer *timer   = get_timer(pit8253,offset);
865864   int   read_command;
866865
867866   LOG2(("pit8253_w(): offset=%d data=0x%02x\n", offset, data));
r17907r17908
984983static void pit8253_gate_w(device_t *device, int gate, int state)
985984{
986985   pit8253_t   *pit8253 = get_safe_token(device);
987   struct pit8253_timer *timer   = get_timer(pit8253, gate);
986   pit8253_timer *timer   = get_timer(pit8253, gate);
988987
989988   LOG2(("pit8253_gate_w(): gate=%d state=%d\n", gate, state));
990989
r17907r17908
10221021int   pit8253_get_output(device_t *device, int timerno)
10231022{
10241023   pit8253_t   *pit8253 = get_safe_token(device);
1025   struct pit8253_timer *timer   = get_timer(pit8253,timerno);
1024   pit8253_timer *timer   = get_timer(pit8253,timerno);
10261025   int   result;
10271026
10281027   update(device, timer);
r17907r17908
10361035void pit8253_set_clockin(device_t *device, int timerno, double new_clockin)
10371036{
10381037   pit8253_t   *pit8253 = get_safe_token(device);
1039   struct pit8253_timer *timer   = get_timer(pit8253,timerno);
1038   pit8253_timer *timer   = get_timer(pit8253,timerno);
10401039
10411040   LOG2(("pit8253_set_clockin(): PIT timer=%d, clockin = %lf\n", timerno,new_clockin));
10421041
r17907r17908
10491048static void pit8253_set_clock_signal(device_t *device, int timerno, int state)
10501049{
10511050   pit8253_t   *pit8253 = get_safe_token(device);
1052   struct pit8253_timer *timer = get_timer(pit8253,timerno);
1051   pit8253_timer *timer = get_timer(pit8253,timerno);
10531052
10541053   LOG2(("pit8253_set_clock_signal(): PIT timer=%d, state = %d\n", timerno, state));
10551054
r17907r17908
10771076   /* register for state saving */
10781077   for (timerno = 0; timerno < MAX_TIMER; timerno++)
10791078   {
1080      struct pit8253_timer *timer = get_timer(pit8253, timerno);
1079      pit8253_timer *timer = get_timer(pit8253, timerno);
10811080
10821081      /* initialize timer */
10831082      timer->clockin = pit8253->config->timer[timerno].clockin;
r17907r17908
11271126
11281127   for (i = 0; i < MAX_TIMER; i++)
11291128   {
1130      struct pit8253_timer *timer = get_timer(pit,i);
1129      pit8253_timer *timer = get_timer(pit,i);
11311130      /* According to Intel's 8254 docs, the state of a timer is undefined
11321131           until the first mode control word is written. Here we define this
11331132           undefined behaviour */
trunk/src/emu/machine/k053252.h
r17907r17908
3030
3131
3232
33typedef struct _k053252_interface k053252_interface;
34struct _k053252_interface
33struct k053252_interface
3534{
3635   const char         *screen;
3736   devcb_write_line   int1_en;
trunk/src/emu/machine/mb87078.h
r17907r17908
1818
1919typedef void (*mb87078_gain_changed_cb)(running_machine &machine, int channel, int percent /*, float decibels*/);
2020
21typedef struct _mb87078_interface mb87078_interface;
22struct _mb87078_interface
21struct mb87078_interface
2322{
2423   mb87078_gain_changed_cb   gain_changed_cb;
2524};
trunk/src/emu/debugger.c
r17907r17908
2626    TYPE DEFINITIONS
2727***************************************************************************/
2828
29typedef struct _machine_entry machine_entry;
30struct _machine_entry
29struct machine_entry
3130{
3231   machine_entry *      next;
3332   running_machine *   machine;
trunk/src/emu/fileio.h
r17907r17908
5555//**************************************************************************
5656
5757// forward declarations
58typedef struct _zip_file_header zip_file_header;
59typedef struct _zip_file zip_file;
58struct zip_file_header;
59struct zip_file;
6060
61typedef struct __7z_file_header _7z_file_header;
62typedef struct __7z_file _7z_file;
61struct _7z_file_header;
62struct _7z_file;
6363
6464// ======================> path_iterator
6565
trunk/src/emu/debugint/debugint.c
r17907r17908
108108    TYPE DEFINITIONS
109109***************************************************************************/
110110
111typedef struct _adjustment adjustment;
112struct _adjustment
111struct adjustment
113112{
114113   int      visible;
115114   int      lower;
trunk/src/lib/util/palette.c
r17907r17908
4848***************************************************************************/
4949
5050/* object to track dirty states */
51typedef struct _dirty_state dirty_state;
52struct _dirty_state
51struct dirty_state
5352{
5453   UINT32 *      dirty;                  /* bitmap of dirty entries */
5554   UINT32         mindirty;               /* minimum dirty entry */
trunk/src/lib/util/aviio.c
r17907r17908
107107    TYPE DEFINITIONS
108108***************************************************************************/
109109
110typedef struct _avi_chunk avi_chunk;
111struct _avi_chunk
110struct avi_chunk
112111{
113112   UINT64            offset;               /* file offset of chunk header */
114113   UINT64            size;               /* size of this chunk */
r17907r17908
117116};
118117
119118
120typedef struct _avi_chunk_list avi_chunk_list;
121struct _avi_chunk_list
119struct avi_chunk_list
122120{
123121   UINT64            offset;               /* offset in the file of header */
124122   UINT32            length;               /* length of the chunk including header */
125123};
126124
127125
128typedef struct _huffyuv_table huffyuv_table;
129struct _huffyuv_table
126struct huffyuv_table
130127{
131128   UINT8            shift[256];            /* bit shift amounts */
132129   UINT32            bits[256];            /* bit match values */
r17907r17908
136133};
137134
138135
139typedef struct _huffyuv_data huffyuv_data;
140struct _huffyuv_data
136struct huffyuv_data
141137{
142138   UINT8            predictor;            /* predictor */
143139   huffyuv_table      table[3];            /* array of tables */
144140};
145141
146142
147typedef struct _avi_stream avi_stream;
148struct _avi_stream
143struct avi_stream
149144{
150145   UINT32            type;               /* subtype of stream */
151146   UINT32            format;               /* format of stream data */
trunk/src/lib/util/cdrom.h
r17907r17908
9292
9393typedef struct _cdrom_file cdrom_file;
9494
95
9695struct cdrom_track_info
9796{
9897   /* fields used by CHDMAN and in MAME */
trunk/src/lib/util/aviio.h
r17907r17908
107107typedef struct _avi_file avi_file;
108108
109109
110typedef struct _avi_movie_info avi_movie_info;
111struct _avi_movie_info
110struct avi_movie_info
112111{
113112   UINT32         video_format;            /* format of video data */
114113   UINT32         video_timescale;         /* timescale for video data */
trunk/src/lib/util/opresolv.h
r17907r17908
5757   OPTIONTYPE_ENUM_VALUE
5858};
5959
60typedef struct _option_guide option_guide;
61struct _option_guide
60struct option_guide
6261{
6362   enum option_type option_type;
6463   int parameter;
trunk/src/lib/util/vbiparse.h
r17907r17908
8787    TYPE DEFINITIONS
8888***************************************************************************/
8989
90typedef struct _vbi_metadata vbi_metadata;
91struct _vbi_metadata
90struct vbi_metadata
9291{
9392   UINT8      white;            /* white flag: on or off */
9493   UINT32      line16;            /* line 16 code */
trunk/src/lib/util/png.c
r17907r17908
5050    TYPE DEFINITIONS
5151***************************************************************************/
5252
53typedef struct _image_data_chunk image_data_chunk;
54struct _image_data_chunk
53struct image_data_chunk
5554{
5655   image_data_chunk *   next;
5756   int               length;
r17907r17908
5958};
6059
6160
62typedef struct _png_private png_private;
63struct _png_private
61struct png_private
6462{
6563   png_info *         pnginfo;
6664   image_data_chunk *   idata;
trunk/src/lib/util/png.h
r17907r17908
109109    TYPE DEFINITIONS
110110***************************************************************************/
111111
112typedef struct _png_text png_text;
113struct _png_text
112struct png_text
114113{
115114   png_text *      next;
116115   const char *   keyword;      /* this is allocated */
r17907r17908
118117};
119118
120119
121typedef struct _png_info png_info;
122struct _png_info
120struct png_info
123121{
124122   UINT8 *         image;
125123   UINT32         width, height;
trunk/src/lib/util/jedparse.c
r17907r17908
6565    TYPE DEFINITIONS
6666***************************************************************************/
6767
68typedef struct _parse_info parse_info;
69struct _parse_info
68struct parse_info
7069{
7170   UINT16      checksum;            /* checksum value */
7271   UINT32      explicit_numfuses;      /* explicitly specified number of fuses */
trunk/src/lib/util/xmlfile.c
r17907r17908
5454    TYPE DEFINITIONS
5555***************************************************************************/
5656
57typedef struct _xml_parse_info xml_parse_info;
58struct _xml_parse_info
57struct xml_parse_info
5958{
6059   XML_Parser         parser;
6160   xml_data_node *      rootnode;
trunk/src/lib/util/jedparse.h
r17907r17908
6262    TYPE DEFINITIONS
6363***************************************************************************/
6464
65typedef struct _jed_data jed_data;
66struct _jed_data
65struct jed_data
6766{
6867   UINT32      numfuses;         /* number of defined fuses */
6968   UINT8      fusemap[JED_MAX_FUSES / 8];/* array of bit-packed data */
trunk/src/lib/util/xmlfile.h
r17907r17908
7575
7676
7777/* a node representing an attribute */
78typedef struct _xml_attribute_node xml_attribute_node;
79struct _xml_attribute_node
78struct xml_attribute_node
8079{
8180   xml_attribute_node *   next;         /* pointer to next attribute node */
8281   const char *         name;         /* pointer to copy of tag name */
r17907r17908
8584
8685
8786/* a node representing a data item and its relationships */
88typedef struct _xml_data_node xml_data_node;
89struct _xml_data_node
87struct xml_data_node
9088{
9189   xml_data_node *         next;         /* pointer to next sibling node */
9290   xml_data_node *         parent;         /* pointer to parent node */
r17907r17908
9997
10098
10199/* extended error information from parsing */
102typedef struct _xml_parse_error xml_parse_error;
103struct _xml_parse_error
100struct xml_parse_error
104101{
105102   const char *         error_message;
106103   int                  error_line;
r17907r17908
109106
110107
111108/* parsing options */
112typedef struct _xml_parse_options xml_parse_options;
113struct _xml_parse_options
109struct xml_parse_options
114110{
115111   xml_parse_error *      error;
116112   void               (*init_parser)(struct XML_ParserStruct *parser);
trunk/src/lib/util/un7z.h
r17907r17908
120120***************************************************************************/
121121
122122/* describes an open _7Z file */
123typedef struct __7z_file _7z_file;
124struct __7z_file
123struct  _7z_file
125124{
126125   const char *   filename;            /* copy of _7Z filename (for caching) */
127126
trunk/src/lib/util/pool.c
r17907r17908
5858***************************************************************************/
5959
6060/* an object type entry */
61typedef struct _objtype_entry objtype_entry;
62struct _objtype_entry
61struct objtype_entry
6362{
6463   objtype_entry *      next;
6564   UINT32            type;
r17907r17908
6968
7069
7170/* an entry in a pool */
72typedef struct _object_entry object_entry;
73struct _object_entry
71struct object_entry
7472{
7573   object_entry *      next;
7674   object_entry *      globalnext;
r17907r17908
8482
8583
8684/* a block of entry items */
87typedef struct _object_entry_block object_entry_block;
88struct _object_entry_block
85struct object_entry_block
8986{
9087   object_entry_block *next;
9188   object_entry      entry[OBJECT_ENTRY_BLOCK];
trunk/src/lib/util/unzip.h
r17907r17908
7373***************************************************************************/
7474
7575/* contains extracted file header information */
76typedef struct _zip_file_header zip_file_header;
77struct _zip_file_header
76struct zip_file_header
7877{
7978   UINT32         signature;            /* central file header signature */
8079   UINT16         version_created;      /* version made by */
r17907r17908
102101
103102
104103/* contains extracted end of central directory information */
105typedef struct _zip_ecd zip_ecd;
106struct _zip_ecd
104struct zip_ecd
107105{
108106   UINT32         signature;            /* end of central dir signature */
109107   UINT16         disk_number;         /* number of this disk */
r17907r17908
121119
122120
123121/* describes an open ZIP file */
124typedef struct _zip_file zip_file;
125struct _zip_file
122struct zip_file
126123{
127124   const char *   filename;            /* copy of ZIP filename (for caching) */
128125   osd_file *      file;               /* OSD file handle */
trunk/src/lib/util/corefile.c
r17907r17908
8282typedef enum _text_file_type text_file_type;
8383
8484
85typedef struct _zlib_data zlib_data;
86struct _zlib_data
85struct zlib_data
8786{
8887   z_stream      stream;
8988   UINT8         buffer[1024];
trunk/src/mess/tools/imgtool/library.h
r17907r17908
241241
242242
243243
244typedef struct _imgtool_partition_info imgtool_partition_info;
245struct _imgtool_partition_info
244struct imgtool_partition_info
246245{
247246   imgtool_get_info get_info;
248247   UINT64 base_block;
r17907r17908
334333
335334
336335
337typedef struct _imgtool_module imgtool_module;
338struct _imgtool_module
336struct imgtool_module
339337{
340338   imgtool_module *previous;
341339   imgtool_module *next;
trunk/src/mess/tools/imgtool/imgtool.h
r17907r17908
5050 * ---------------------------------------------------------------------------
5151 */
5252
53typedef struct _imgtool_module_features imgtool_module_features;
54struct _imgtool_module_features
53struct imgtool_module_features
5554{
5655   unsigned int supports_create : 1;
5756   unsigned int supports_open : 1;
r17907r17908
6059   unsigned int is_read_only : 1;
6160};
6261
63typedef struct _imgtool_partition_features imgtool_partition_features;
64struct _imgtool_partition_features
62struct imgtool_partition_features
6563{
6664   unsigned int supports_reading : 1;
6765   unsigned int supports_writing : 1;
trunk/src/mess/tools/imgtool/filtbas.c
r17907r17908
3636    TYPE DEFINITIONS
3737***************************************************************************/
3838
39typedef struct _basictoken_tableent basictoken_tableent;
40struct _basictoken_tableent
39struct basictoken_tableent
4140{
4241   UINT8 shift;
4342   UINT8 base;
r17907r17908
4746
4847
4948
50typedef struct _basictokens basictokens;
51struct _basictokens
49struct basictokens
5250{
5351   UINT16 baseaddress;
5452   unsigned int skip_bytes : 15;
trunk/src/mess/tools/imgtool/modules/pc_hard.c
r17907r17908
7070extern void fat_get_info(const imgtool_class *imgclass, UINT32 state, union imgtoolinfo *info);
7171
7272
73typedef struct _pc_chd_image_info pc_chd_image_info;
74struct _pc_chd_image_info
73struct pc_chd_image_info
7574{
7675   struct mess_hard_disk_file hard_disk;
7776
trunk/src/mess/tools/imgtool/modules/prodos.c
r17907r17908
131131#define   ROOTDIR_BLOCK         2
132132#define BLOCK_SIZE            512
133133
134typedef struct _prodos_diskinfo prodos_diskinfo;
135struct _prodos_diskinfo
134struct prodos_diskinfo
136135{
137136   imgtoolerr_t (*load_block)(imgtool_image *image, int block, void *buffer);
138137   imgtoolerr_t (*save_block)(imgtool_image *image, int block, const void *buffer);
r17907r17908
142141   UINT16 total_blocks;
143142};
144143
145typedef struct _prodos_direnum prodos_direnum;
146struct _prodos_direnum
144struct prodos_direnum
147145{
148146   UINT32 block;
149147   UINT32 index;
150148   UINT8 block_data[BLOCK_SIZE];
151149};
152150
153typedef struct _prodos_dirent prodos_dirent;
154struct _prodos_dirent
151struct prodos_dirent
155152{
156153   char filename[16];
157154   UINT8 storage_type;
trunk/src/mess/tools/imgtool/modules/os9.c
r17907r17908
2020   CREATE_DIR
2121} creation_policy_t;
2222
23typedef struct _os9_diskinfo os9_diskinfo;
24struct _os9_diskinfo
23struct os9_diskinfo
2524{
2625   UINT32 total_sectors;
2726   UINT32 sectors_per_track;
trunk/src/mess/tools/imgtool/modules/fat.c
r17907r17908
144144
145145#define LOG(x)
146146
147typedef struct _fat_partition_info fat_partition_info;
148struct _fat_partition_info
147struct fat_partition_info
149148{
150149   UINT32 fat_bits;
151150   UINT32 sectors_per_cluster;
r17907r17908
158157   UINT32 total_clusters;
159158};
160159
161typedef struct _fat_file fat_file;
162struct _fat_file
160struct fat_file
163161{
164162   unsigned int root : 1;
165163   unsigned int directory : 1;
r17907r17908
174172   UINT32 dirent_sector_offset;
175173};
176174
177typedef struct _fat_dirent fat_dirent;
178struct _fat_dirent
175struct fat_dirent
179176{
180177   char long_filename[512];
181178   char short_filename[13];
r17907r17908
189186   time_t lastmodified_time;
190187};
191188
192typedef struct _fat_freeentry_info fat_freeentry_info;
193struct _fat_freeentry_info
189struct fat_freeentry_info
194190{
195191   UINT32 required_size;
196192   UINT32 candidate_position;
197193   UINT32 position;
198194};
199195
200typedef struct _fat_mediatype fat_mediatype;
201struct _fat_mediatype
196struct fat_mediatype
202197{
203198   UINT8 media_descriptor;
204199   UINT8 heads;
trunk/src/mess/tools/imgtool/modules/amiga.c
r17907r17908
6767} sec_type;
6868
6969
70typedef struct _amiga_date amiga_date;
71struct _amiga_date
70struct amiga_date
7271{
7372   UINT32 days;  /* days since 1 jan 78 */
7473   UINT32 mins;  /* minutes past midnight */
r17907r17908
7675};
7776
7877
79typedef struct _root_block root_block;
80struct _root_block
78struct root_block
8179{
8280   UINT32 ht_size;      /* Hash table size in long */
8381   UINT32 chksum;       /* Rootblock checksum */
r17907r17908
9391};
9492
9593
96typedef struct _bitmap_block bitmap_block;
97struct _bitmap_block
94struct bitmap_block
9895{
9996   UINT32 chksum;      /* checksum, normal algorithm */
10097   UINT32 map[MSIZE];  /* bitmap */
10198};
10299
103100
104typedef struct _bitmap_ext_block bitmap_ext_block;
105struct _bitmap_ext_block
101struct bitmap_ext_block
106102{
107103   UINT32 map[MSIZE];  /* bitmap */
108104   UINT32 next;        /* next extension block */
109105};
110106
111107
112typedef struct _file_block file_block;
113struct _file_block
108struct file_block
114109{
115110   UINT32 header_key;   /* self pointer (to this block) */
116111   UINT32 high_seq;     /* number of data block ptr stored here */
r17907r17908
134129};
135130
136131
137typedef struct _file_ext_block file_ext_block;
138struct _file_ext_block
132struct file_ext_block
139133{
140134   UINT32 header_key;   /* self pointer (to this block) */
141135   UINT32 high_seq;     /* number of data block ptr stored here */
r17907r17908
146140};
147141
148142
149typedef struct _data_block data_block;
150struct _data_block
143struct data_block
151144{
152145   UINT32 header_key;     /* self pointer (to this block) */
153146   UINT32 seq_num;        /* file data block number */
r17907r17908
158151};
159152
160153
161typedef struct _dir_block dir_block;
162struct _dir_block
154struct dir_block
163155{
164156   UINT32 header_key;   /* self pointer (to this block) */
165157   UINT32 chksum;       /* same algorithm as rootblock */
r17907r17908
179171};
180172
181173
182typedef struct _hardlink_block hardlink_block;
183struct _hardlink_block
174struct hardlink_block
184175{
185176   UINT32 header_key;   /* self pointer (to this block) */
186177   UINT32 chksum;       /* same algorithm as rootblock */
r17907r17908
198189};
199190
200191
201typedef struct _softlink_block softlink_block;
202struct _softlink_block
192struct softlink_block
203193{
204194   UINT32 header_key;   /* self pointer (to this block) */
205195   UINT32 chksum;       /* same algorithm as rootblock */
r17907r17908
216206
217207
218208/* Basic Amiga floppy disk image info */
219typedef struct _amiga_floppy amiga_floppy;
220struct _amiga_floppy
209struct amiga_floppy
221210{
222211   imgtool_stream *stream;
223212   UINT8 sectors;
r17907r17908
225214
226215
227216/* iterator used to walk through directory entries */
228typedef struct _amiga_iterator amiga_iterator;
229struct _amiga_iterator
217struct amiga_iterator
230218{
231219   unsigned int index;    /* current file index */
232220   int block;             /* block number we are iterating */
trunk/src/mess/tools/imgtool/modules/cybiko.c
r17907r17908
1010
1111#include <zlib.h>
1212
13typedef struct _cybiko_file_system cybiko_file_system;
14struct _cybiko_file_system
13struct cybiko_file_system
1514{
1615   imgtool_stream *stream;
1716   UINT32 page_count, page_size, block_count_boot, block_count_file;
1817   UINT16 write_count;
1918};
2019
21typedef struct _cybiko_iter cybiko_iter;
22struct _cybiko_iter
20struct cybiko_iter
2321{
2422   UINT16 block;
2523};
2624
27typedef struct _cfs_file cfs_file;
28struct _cfs_file
25struct cfs_file
2926{
3027   char name[64]; // name of the file
3128   UINT32 date;   // date/time of the file (seconds since 1900/01/01)
trunk/src/mess/tools/imgtool/modules/cybikoxt.c
r17907r17908
1010
1111#include <zlib.h>
1212
13typedef struct _cybiko_file_system cybiko_file_system;
14struct _cybiko_file_system
13struct cybiko_file_system
1514{
1615   imgtool_stream *stream;
1716   UINT32 page_count, page_size, block_count_boot, block_count_file;
1817   UINT16 write_count;
1918};
2019
21typedef struct _cybiko_iter cybiko_iter;
22struct _cybiko_iter
20struct cybiko_iter
2321{
2422   UINT16 block;
2523};
2624
27typedef struct _cfs_file cfs_file;
28struct _cfs_file
25struct cfs_file
2926{
3027   char name[64]; // name of the file
3128   UINT32 date;   // date/time of the file (seconds since 1900/01/01)
trunk/src/mess/audio/mac.c
r17907r17908
3030    TYPE DEFINITIONS
3131***************************************************************************/
3232
33typedef struct _mac_sound mac_sound;
34struct _mac_sound
33struct mac_sound
3534{
3635   sound_stream *mac_stream;
3736   int sample_enable;
trunk/src/mess/audio/gmaster.c
r17907r17908
77#include "cpu/upd7810/upd7810.h"
88#include "includes/gmaster.h"
99
10typedef struct _gmaster_sound gmaster_sound;
11struct _gmaster_sound
10struct gmaster_sound
1211{
1312   /*bool*/int level;
1413   sound_stream *mixer_channel;
trunk/src/mess/audio/upd1771.c
r17907r17908
118118#define STATE_TONE    2
119119#define STATE_ADPCM   3
120120
121typedef struct _upd1771_state upd1771_state;
122struct _upd1771_state
121struct upd1771_state
123122{
124123    sound_stream *channel;
125124    devcb_resolved_write_line ack_out_func;
trunk/src/mess/audio/vc4000.c
r17907r17908
88#include "includes/vc4000.h"
99
1010
11typedef struct _vc4000_sound vc4000_sound;
12struct _vc4000_sound
11struct vc4000_sound
1312{
1413    sound_stream *channel;
1514    UINT8 reg[1];
trunk/src/mess/audio/upd1771.h
r17907r17908
1313    TYPE DEFINITIONS
1414***************************************************************************/
1515
16typedef struct _upd1771_interface upd1771_interface;
17struct _upd1771_interface
16struct upd1771_interface
1817{
1918   devcb_write_line   ack_callback;
2019};
trunk/src/mess/audio/channelf.c
r17907r17908
33
44static const int max_amplitude = 0x7fff;
55
6typedef struct _channelf_sound_state channelf_sound_state;
7struct _channelf_sound_state
6struct channelf_sound_state
87{
98   sound_stream *channel;
109   int sound_mode;
trunk/src/mess/audio/dave.c
r17907r17908
2828    TYPE DEFINITIONS
2929***************************************************************************/
3030
31typedef struct _dave_t dave_t;
32struct _dave_t
31struct dave_t
3332{
3433   devcb_resolved_read8 reg_r;
3534   devcb_resolved_write8 reg_w;
trunk/src/mess/audio/mea8000.h
r17907r17908
3434
3535/* ---------- configuration ------------ */
3636
37typedef struct _mea8000_interface mea8000_interface;
38struct _mea8000_interface
37struct mea8000_interface
3938{
4039   /* output channel */
4140   const char *           channel;
trunk/src/mess/audio/special.c
r17907r17908
99
1010#include "includes/special.h"
1111
12typedef struct _specimx_sound_state specimx_sound_state;
13struct _specimx_sound_state
12struct specimx_sound_state
1413{
1514   sound_stream *mixer_channel;
1615   int specimx_input[3];
trunk/src/mess/audio/t6721.c
r17907r17908
5757#include "audio/t6721.h"
5858
5959
60typedef struct _t6721_state  t6721_state;
61struct _t6721_state
60struct t6721_state
6261{
6362   emu_timer *timer;
6463
trunk/src/mess/audio/dave.h
r17907r17908
6060    TYPE DEFINITIONS
6161***************************************************************************/
6262
63typedef struct _dave_interface dave_interface;
64struct _dave_interface
63struct dave_interface
6564{
6665   devcb_read8 reg_r;
6766   devcb_write8 reg_w;
trunk/src/mess/audio/gb.c
r17907r17908
147147};
148148
149149
150typedef struct _gb_sound_t gb_sound_t;
151struct _gb_sound_t
150struct gb_sound_t
152151{
153152   sound_stream *channel;
154153   int rate;
trunk/src/mess/audio/lynx.c
r17907r17908
9999    int count;
100100} LYNX_AUDIO;
101101
102typedef struct _lynx_sound_state lynx_sound_state;
103struct _lynx_sound_state
102struct lynx_sound_state
104103{
105104   sound_stream *mixer_channel;
106105   float usec_per_sample;
trunk/src/mess/audio/svision.c
r17907r17908
4545   int count;
4646} SVISION_CHANNEL;
4747
48typedef struct _svision_sound_state svision_sound_state;
49struct _svision_sound_state
48struct svision_sound_state
5049{
5150   sound_stream *mixer_channel;
5251   SVISION_DMA dma;
trunk/src/mess/machine/omti8621.h
r17907r17908
2222
2323typedef void (*omti8621_set_irq)(const running_machine*, int);
2424
25typedef struct _omti8621_config omti8621_config;
26struct _omti8621_config {
25struct omti8621_config {
2726   omti8621_set_irq set_irq;
2827};
2928
trunk/src/mess/machine/keyboard.c
r17907r17908
188188
189189void generic_keyboard_device::device_config_complete()
190190{
191   const _keyboard_interface *intf = reinterpret_cast<const _keyboard_interface *>(static_config());
191   const keyboard_interface *intf = reinterpret_cast<const keyboard_interface *>(static_config());
192192   if(intf != NULL)
193193   {
194      *static_cast<_keyboard_interface *>(this) = *intf;
194      *static_cast<keyboard_interface *>(this) = *intf;
195195   }
196196   else
197197   {
trunk/src/mess/machine/cococart.h
r17907r17908
4141};
4242typedef enum _cococart_line_value cococart_line_value;
4343
44typedef struct _coco_cartridge_line coco_cartridge_line;
45struct _coco_cartridge_line
44struct coco_cartridge_line
4645{
4746   emu_timer               *timer[TIMER_POOL];
4847   int                       timer_index;
trunk/src/mess/machine/keyboard.h
r17907r17908
88    TYPE DEFINITIONS
99***************************************************************************/
1010
11typedef struct _keyboard_interface keyboard_interface;
12struct _keyboard_interface
11struct keyboard_interface
1312{
1413   devcb_write8 m_keyboard_cb;
1514};
r17907r17908
4039
4140class generic_keyboard_device :
4241   public device_t,
43   public _keyboard_interface
42   public keyboard_interface
4443{
4544public:
4645   generic_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
trunk/src/mess/machine/ataricrt.c
r17907r17908
296296}
297297#endif
298298
299typedef struct _a800_pcb  a800_pcb;
300struct _a800_pcb
299struct a800_pcb
301300{
302301   const char              *pcb_name;
303302   int                     pcb_id;
trunk/src/mess/machine/mos6530.c
r17907r17908
3838    TYPE DEFINITIONS
3939***************************************************************************/
4040
41typedef struct _mos6530_port mos6530_port;
42struct _mos6530_port
41struct mos6530_port
4342{
4443   devcb_resolved_read8      in_port_func;
4544   devcb_resolved_write8      out_port_func;
r17907r17908
5049};
5150
5251
53typedef struct _mos6530_state mos6530_state;
54struct _mos6530_state
52struct mos6530_state
5553{
5654   devcb_resolved_write_line   out_irq_func;
5755
trunk/src/mess/machine/mos6530.h
r17907r17908
6969    TYPE DEFINITIONS
7070***************************************************************************/
7171
72typedef struct _mos6530_interface mos6530_interface;
73struct _mos6530_interface
72struct mos6530_interface
7473{
7574   devcb_read8            in_pa_func;
7675   devcb_write8         out_pa_func;
trunk/src/mess/machine/mc6854.h
r17907r17908
5353
5454/* ---------- configuration ------------ */
5555
56typedef struct _mc6854_interface mc6854_interface;
57struct _mc6854_interface
56struct mc6854_interface
5857{
5958  devcb_write_line  out_irq_func; /* interrupt request */
6059
trunk/src/mess/machine/smartmed.h
r17907r17908
1111    TYPE DEFINITIONS
1212***************************************************************************/
1313
14typedef struct _smartmedia_cartslot_config smartmedia_cartslot_config;
15struct _smartmedia_cartslot_config
14struct smartmedia_cartslot_config
1615{
1716   const char *               interface;
1817};
r17907r17908
4746#define NAND_CHIP_K9F1G08U0B   { 5, { 0xEC, 0xF1, 0x00, 0x95, 0x40 }, 2048, 64,  64, 1024, 2, 2, 0 } /* K9F1G08U0B */
4847#define NAND_CHIP_K9LAG08U0M   { 5, { 0xEC, 0xD5, 0x55, 0x25, 0x68 }, 2048, 64, 128, 8192, 2, 3, 0 } /* K9LAG08U0M */
4948
50typedef struct _nand_chip nand_chip;
51struct _nand_chip
49struct nand_chip
5250{
5351   int id_len;
5452   UINT8 id[5];
trunk/src/mess/machine/mc6846.h
r17907r17908
3232
3333/* ---------- configuration ------------ */
3434
35typedef struct _mc6846_interface mc6846_interface;
36struct _mc6846_interface
35struct mc6846_interface
3736{
3837  /* CPU write to the outside through chip */
3938  write8_device_func out_port_func;  /* 8-bit output */
trunk/src/mess/machine/sst39vfx.c
r17907r17908
1818    TYPE DEFINITIONS
1919***************************************************************************/
2020
21typedef struct _sst39vfx_t sst39vfx_t;
22struct _sst39vfx_t
21struct sst39vfx_t
2322{
2423   UINT8 *data;
2524   UINT32 size;
trunk/src/mess/machine/sst39vfx.h
r17907r17908
1818    TYPE DEFINITIONS
1919***************************************************************************/
2020
21typedef struct _sst39vfx_config sst39vfx_config;
22struct _sst39vfx_config
21struct sst39vfx_config
2322{
2423   int cpu_datawidth;
2524   int cpu_endianess;
trunk/src/mess/machine/upd71071.c
r17907r17908
9797   UINT8 mask;
9898};
9999
100typedef struct _upd71071_t upd71071_t;
101struct _upd71071_t
100struct upd71071_t
102101{
103102   struct upd71071_reg reg;
104103   int selected_channel;
trunk/src/mess/machine/upd71071.h
r17907r17908
33
44#include "emu.h"
55
6typedef struct _upd71071_interface upd71071_intf;
7struct _upd71071_interface
6struct upd71071_intf
87{
98   const char* cputag;
109   int clock;
trunk/src/mess/machine/e05a03.c
r17907r17908
1212    TYPE DEFINITIONS
1313***************************************************************************/
1414
15typedef struct _e05a03_state e05a03_state;
16struct _e05a03_state
15struct e05a03_state
1716{
1817   /* 24-bit shift register, port 0x00, 0x01 and 0x02 */
1918   UINT32 shift;
trunk/src/mess/machine/e05a03.h
r17907r17908
1414    TYPE DEFINITIONS
1515***************************************************************************/
1616
17typedef struct _e05a03_interface e05a03_interface;
18struct _e05a03_interface
17struct e05a03_interface
1918{
2019   devcb_read8 in_data_func;
2120
trunk/src/mess/machine/990_tap.c
r17907r17908
4444   unsigned int wp : 1;   /* TRUE if tape is write-protected */
4545} tape_unit_t;
4646
47typedef struct _tap_990_t tap_990_t;
48struct _tap_990_t
47struct tap_990_t
4948{
5049   UINT16 w[8];
5150
r17907r17908
5453   tape_unit_t t[MAX_TAPE_UNIT];
5554};
5655
57typedef struct _ti990_tape_t ti990_tape_t;
58struct _ti990_tape_t
56struct ti990_tape_t
5957{
6058   int dummy;
6159};
trunk/src/mess/machine/990_tap.h
r17907r17908
88    TYPE DEFINITIONS
99***************************************************************************/
1010
11typedef struct _ti990_tpc_interface ti990_tpc_interface;
12struct _ti990_tpc_interface
11struct ti990_tpc_interface
1312{
1413   void (*interrupt_callback)(running_machine &machine, int state);
1514};
trunk/src/mess/machine/ds1315.c
r17907r17908
2222} ds1315_mode_t;
2323
2424
25typedef struct _ds1315_t ds1315_t;
26struct _ds1315_t
25struct ds1315_t
2726{
2827   int count;
2928   ds1315_mode_t mode;
trunk/src/mess/machine/pc_lpt.c
r17907r17908
2121    TYPE DEFINITIONS
2222***************************************************************************/
2323
24typedef struct _pc_lpt_state pc_lpt_state;
25struct _pc_lpt_state
24struct pc_lpt_state
2625{
2726   centronics_device *centronics;
2827
trunk/src/mess/machine/pc_lpt.h
r17907r17908
1515    TYPE DEFINITIONS
1616***************************************************************************/
1717
18typedef struct _pc_lpt_interface pc_lpt_interface;
19struct _pc_lpt_interface
18struct pc_lpt_interface
2019{
2120   devcb_write_line out_irq_func;
2221};
trunk/src/mess/machine/s3c44b0.h
r17907r17908
6363typedef UINT32 (*s3c44b0_gpio_port_r_func)( device_t *device, int port);
6464typedef void (*s3c44b0_gpio_port_w_func)( device_t *device, int port, UINT32 data);
6565
66typedef struct _s3c44b0_interface_gpio s3c44b0_interface_gpio;
67struct _s3c44b0_interface_gpio
66struct s3c44b0_interface_gpio
6867{
6968   s3c44b0_gpio_port_r_func port_r;
7069   s3c44b0_gpio_port_w_func port_w;
7170};
7271
73typedef struct _s3c44b0_interface_i2c s3c44b0_interface_i2c;
74struct _s3c44b0_interface_i2c
72struct s3c44b0_interface_i2c
7573{
7674   write_line_device_func scl_w;
7775   read_line_device_func sda_r;
7876   write_line_device_func sda_w;
7977};
8078
81typedef struct _s3c44b0_interface_adc s3c44b0_interface_adc;
82struct _s3c44b0_interface_adc
79struct s3c44b0_interface_adc
8380{
8481   read32_device_func data_r;
8582};
8683
87typedef struct _s3c44b0_interface_i2s s3c44b0_interface_i2s;
88struct _s3c44b0_interface_i2s
84struct s3c44b0_interface_i2s
8985{
9086   write16_device_func data_w;
9187};
9288
93typedef struct _s3c44b0_interface s3c44b0_interface;
94struct _s3c44b0_interface
89struct s3c44b0_interface
9590{
9691   s3c44b0_interface_gpio gpio;
9792   s3c44b0_interface_i2c i2c;
trunk/src/mess/machine/nes_ines.c
r17907r17908
66
77****************************************************************************************/
88
9typedef struct _nes_mmc  nes_mmc;
10struct _nes_mmc
9struct nes_mmc
1110{
1211   int    iNesMapper; /* iNES Mapper # */
1312   int    pcb_id;
trunk/src/mess/machine/micropolis.c
r17907r17908
6262    TYPE DEFINITIONS
6363***************************************************************************/
6464
65typedef struct _micropolis_state micropolis_state;
66struct _micropolis_state
65struct micropolis_state
6766{
6867   /* register */
6968   UINT8 data;
trunk/src/mess/machine/micropolis.h
r17907r17908
4545***************************************************************************/
4646
4747/* Interface */
48typedef struct _micropolis_interface micropolis_interface;
49struct _micropolis_interface
48struct micropolis_interface
5049{
5150   devcb_read_line in_dden_func;
5251   devcb_write_line out_intrq_func;
trunk/src/mess/machine/tf20.c
r17907r17908
3030    TYPE DEFINITIONS
3131***************************************************************************/
3232
33typedef struct _tf20_state tf20_state;
34struct _tf20_state
33struct tf20_state
3534{
3635   ram_device *ram;
3736   device_t *upd765a;
trunk/src/mess/machine/tf20.h
r17907r17908
1717***************************************************************************/
1818
1919#if 0
20typedef struct _tf20_interface tf20_interface;
21struct _tf20_interface
20struct tf20_interface
2221{
2322};
2423#endif
trunk/src/mess/machine/hd63450.c
r17907r17908
66
77#include "hd63450.h"
88
9typedef struct _hd63450_regs hd63450_regs;
10struct _hd63450_regs
9struct hd63450_regs
1110{  // offsets in bytes
1211   unsigned char csr;  // [00] Channel status register (R/W)
1312   unsigned char cer;  // [01] Channel error register (R)
r17907r17908
2928   unsigned char gcr;  // [3f]  General Control Register (R/W)
3029};
3130
32typedef struct _hd63450_t hd63450_t;
33struct _hd63450_t
31struct hd63450_t
3432{
3533   hd63450_regs reg[4];
3634   emu_timer* timer[4];  // for timing data reading/writing each channel
trunk/src/mess/machine/hd63450.h
r17907r17908
44
55#include "emu.h"
66
7typedef struct _hd63450_interface hd63450_intf;
8struct _hd63450_interface
7struct hd63450_intf
98{
109   const char *cpu_tag;
1110   attotime clock[4];
trunk/src/mess/machine/kr2376.c
r17907r17908
6464   }
6565};
6666
67typedef struct _kr2376_t kr2376_t;
68struct _kr2376_t
67struct kr2376_t
6968{
7069   const kr2376_interface *intf;
7170   int   pins[41];
trunk/src/mess/machine/kr2376.h
r17907r17908
7979} kr2376_output_pin_t;
8080
8181/* interface */
82typedef struct _kr2376_interface kr2376_interface;
83struct _kr2376_interface
82struct kr2376_interface
8483{
8584   /* The clock of the chip (Typical 50 kHz) */
8685   int clock;
trunk/src/mess/machine/applefdc.c
r17907r17908
119119    TYPE DEFINITIONS
120120***************************************************************************/
121121
122typedef struct _applefdc_token applefdc_token;
123struct _applefdc_token
122struct applefdc_token
124123{
125124   /* data that is constant for the lifetime of the emulation */
126125   emu_timer *motor_timer;
trunk/src/mess/machine/applefdc.h
r17907r17908
8686    TYPE DEFINITIONS
8787***************************************************************************/
8888
89typedef struct _applefdc_interface applefdc_interface;
90struct _applefdc_interface
89struct applefdc_interface
9190{
9291   void (*set_lines)(device_t *device, UINT8 lines);
9392   void (*set_enable_lines)(device_t *device, int enable_mask);
trunk/src/mess/machine/upd765.c
r17907r17908
8484
8585#define UPD765_BAD_MEDIA 0x100
8686
87typedef struct _upd765_t upd765_t;
88struct _upd765_t
87struct upd765_t
8988{
9089   devcb_resolved_write_line   out_int_func;
9190   devcb_resolved_write_line   out_drq_func;
trunk/src/mess/machine/at45dbxx.c
r17907r17908
5858   UINT32 size, pos;
5959} AT45DBXX_IO;
6060
61typedef struct _at45dbxx_t at45dbxx_t;
62struct _at45dbxx_t
61struct at45dbxx_t
6362{
6463   UINT8 *data;
6564   UINT32 size;
trunk/src/mess/machine/6883sam.h
r17907r17908
1919
2020
2121/* interface */
22typedef struct _sam6883_interface sam6883_interface;
23struct _sam6883_interface
22struct sam6883_interface
2423{
2524   /* the CPU/space from which the SAM reads data */
2625   const char *      m_cpu_tag;
trunk/src/mess/machine/kb_keytro.c
r17907r17908
8181    TYPE DEFINITIONS
8282***************************************************************************/
8383
84typedef struct _kb_keytr_state kb_keytr_state;
85struct _kb_keytr_state
84struct kb_keytr_state
8685{
8786   device_t *cpu;
8887
trunk/src/mess/machine/terminal.c
r17907r17908
333333
334334void generic_terminal_device::device_config_complete()
335335{
336   const _terminal_interface *intf = reinterpret_cast<const _terminal_interface *>(static_config());
336   const terminal_interface *intf = reinterpret_cast<const terminal_interface *>(static_config());
337337   if(intf != NULL)
338338   {
339      *static_cast<_terminal_interface *>(this) = *intf;
339      *static_cast<terminal_interface *>(this) = *intf;
340340   }
341341   else
342342   {
trunk/src/mess/machine/terminal.h
r17907r17908
1010    TYPE DEFINITIONS
1111***************************************************************************/
1212
13typedef struct _terminal_interface terminal_interface;
14struct _terminal_interface
13struct terminal_interface
1514{
1615   devcb_write8 m_keyboard_cb;
1716};
r17907r17908
4948
5049class generic_terminal_device :
5150   public device_t,
52   public _terminal_interface
51   public terminal_interface
5352{
5453public:
5554   generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
trunk/src/mess/machine/er59256.c
r17907r17908
2121    TYPE DEFINITIONS
2222***************************************************************************/
2323
24typedef struct _er59256_t er59256_t;
25struct _er59256_t
24struct er59256_t
2625{
2726    /* The actual memory */
2827   UINT16  eerom[EEROM_WORDS];
trunk/src/mess/machine/nes_pcb.c
r17907r17908
44
55****************************************************************************************/
66
7typedef struct _nes_pcb  nes_pcb;
8struct _nes_pcb
7struct nes_pcb
98{
109   const char              *pcb_name;
1110   int                     pcb_id;
r17907r17908
1189411893   const char        *read_name;
1189511894};
1189611895
11897typedef struct _nes_pcb_intf  nes_pcb_intf;
11898struct _nes_pcb_intf
11896struct nes_pcb_intf
1189911897{
1190011898   int                     mmc_pcb;
1190111899   nes_memory_accessor     mmc_l;  /* $4100-$5fff read/write routines */
trunk/src/mess/machine/null_modem.c
r17907r17908
99{
1010}
1111
12static struct _bitbanger_config null_modem_image_config =
12static bitbanger_config null_modem_image_config =
1313{
1414   DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, null_modem_device, read),
1515   BITBANGER_MODEM,
trunk/src/mess/machine/pf10.c
r17907r17908
1818    TYPE DEFINITIONS
1919***************************************************************************/
2020
21typedef struct _pf10_state pf10_state;
22struct _pf10_state
21struct pf10_state
2322{
2423   UINT8 dummy;
2524};
trunk/src/mess/machine/pf10.h
r17907r17908
1717***************************************************************************/
1818
1919#if 0
20typedef struct _pf10_interface pf10_interface;
21struct _pf10_interface
20struct pf10_interface
2221{
2322};
2423#endif
trunk/src/mess/machine/isa_gus.h
r17907r17908
6262#define IRQ_VOLUME_RAMP   0x40
6363#define IRQ_DRAM_TC_DMA   0x80
6464
65struct _gus_voice
65struct gus_voice
6666{
6767   UINT8 voice_ctrl;
6868   UINT16 freq_ctrl;
r17907r17908
7979   bool rollover;
8080    INT16 sample;  // current sample data
8181};
82typedef struct _gus_voice gus_voice;
83
84struct _gf1_interface
82struct gf1_interface
8583{
8684   devcb_write_line wave_irq_cb;
8785   devcb_write_line ramp_irq_cb;
r17907r17908
9391   devcb_write_line drq2_cb;
9492   devcb_write_line nmi_cb;
9593};
96typedef struct _gf1_interface gf1_interface;
9794
9895class gf1_device :
9996      public device_t,
trunk/src/mess/machine/pcf8593.c
r17907r17908
4242    TYPE DEFINITIONS
4343***************************************************************************/
4444
45typedef struct _pcf8593_t pcf8593_t;
46struct _pcf8593_t
45struct pcf8593_t
4746{
4847   UINT8 data[16];
4948   int pin_scl, pin_sda, inp;
trunk/src/mess/machine/i8271.c
r17907r17908
2222it is from cpu to fdc */
2323#define I8271_FLAGS_DATA_DIRECTION 0x02
2424
25typedef struct _i8271_t i8271_t;
26struct _i8271_t
25struct i8271_t
2726{
2827   int flags;
2928   int state;
trunk/src/mess/machine/beta.c
r17907r17908
1717    TYPE DEFINITIONS
1818***************************************************************************/
1919
20typedef struct _beta_disk_state beta_disk_state;
21struct _beta_disk_state
20struct beta_disk_state
2221{
2322   UINT8 betadisk_status;
2423   UINT8 betadisk_active;
trunk/src/mess/machine/ay31015.c
r17907r17908
8484} state_t;
8585
8686
87typedef struct _ay31015_t ay31015_t;
88struct _ay31015_t
87struct ay31015_t
8988{
9089   const ay31015_config   *config;
9190
trunk/src/mess/machine/ay31015.h
r17907r17908
4949} ay31015_output_pin_t;
5050
5151
52typedef struct _ay31015_config   ay31015_config;
53struct _ay31015_config
52struct    ay31015_config
5453{
5554   ay31015_type_t      type;               /* Type of chip */
5655   double            transmitter_clock;      /* TCP - pin 40 */
trunk/src/mess/machine/mm58274c.c
r17907r17908
2121#include "emu.h"
2222#include "mm58274c.h"
2323
24typedef struct _mm58274c_t mm58274c_t;
25
26struct _mm58274c_t
24struct mm58274c_t
2725{
2826   const mm58274c_interface *intf;
2927
trunk/src/mess/machine/mc6843.h
r17907r17908
3333
3434/* ---------- configuration ------------ */
3535
36typedef struct _mc6843_interface mc6843_interface;
37struct _mc6843_interface
36struct mc6843_interface
3837{
3938   void ( * irq_func ) ( device_t *device, int state );
4039};
trunk/src/mess/machine/mm58274c.h
r17907r17908
3636    to 6 (saturday) and is needed to correctly retrieve the day-of-week
3737    from the host system clock.
3838*/
39typedef struct _mm58274c_interface mm58274c_interface;
40struct _mm58274c_interface
39struct mm58274c_interface
4140{
4241   int   mode24;      /* 24/12 mode */
4342   int   day1;      /* first day of week */
trunk/src/mess/machine/atarifdc.c
r17907r17908
2222#define VERBOSE_SERIAL   0
2323#define VERBOSE_CHKSUM   0
2424
25typedef struct _atari_drive atari_drive;
26struct _atari_drive
25struct atari_drive
2726{
2827   UINT8 *image;      /* malloc'd image */
2928   int type;         /* type of image (XFD, ATR, DSK) */
r17907r17908
3837   int sectors;      /* total sectors, ie. tracks x heads x spt */
3938};
4039
41typedef struct _atari_fdc_t atari_fdc_t;
42struct _atari_fdc_t
40struct atari_fdc_t
4341{
4442   int  serout_count;
4543   int  serout_offs;
r17907r17908
8785 * It is used to determine the format of a XFD image by it's size only
8886 *****************************************************************************/
8987
90typedef struct _dsk_format dsk_format;
91struct _dsk_format
88struct dsk_format
9289{
9390   UINT8 density;
9491   UINT8 tracks;
r17907r17908
108105};
109106
110107/* combined with the size the image should have */
111typedef struct _xfd_format xfd_format;
112struct _xfd_format
108struct xfd_format
113109{
114110   int size;
115111   dsk_format dsk;
trunk/src/mess/machine/omti8621.c
r17907r17908
128128#define OMTI_CMD_READ_CONFIGURATION 0xec
129129#define OMTI_CMD_INVALID_COMMAND 0xff
130130
131typedef struct _disk_data disk_data;
132struct _disk_data
131struct disk_data
133132{
134133   device_t *device;
135134    UINT16 type;
r17907r17908
148147   UINT8 esdi_defect_list[256];
149148};
150149
151typedef struct _omti8621_state omti8621_state;
152struct _omti8621_state {
150struct omti8621_state {
153151   device_t *device;
154152   omti8621_set_irq irq_handler;
155153
trunk/src/mess/includes/mc68328.h
r17907r17908
9494    TYPE DEFINITIONS
9595***************************************************************************/
9696
97typedef struct _mc68328_interface mc68328_interface;
98struct _mc68328_interface
97struct mc68328_interface
9998{
10099    const char *m68k_cpu_tag;
101100
trunk/src/mess/includes/c64_legacy.h
r17907r17908
2323   int addr, size, index, start;
2424} C64_ROM;
2525
26typedef struct _c64_cart_t c64_cart_t;
27struct _c64_cart_t {
26struct c64_cart_t {
2827   C64_ROM     bank[C64_MAX_ROMBANK];
2928   INT8        game;
3029   INT8        exrom;
trunk/src/mess/includes/apple2.h
r17907r17908
8888   A2MEM_DUAL      = 2      /* this is a bank where read and write can go different places */
8989} bank_disposition_t;
9090
91typedef struct _apple2_meminfo apple2_meminfo;
92struct _apple2_meminfo
91struct apple2_meminfo
9392{
9493   UINT32 read_mem;
9594   read8_delegate *read_handler;
r17907r17908
9796   write8_delegate *write_handler;
9897};
9998
100typedef struct _apple2_memmap_entry apple2_memmap_entry;
101struct _apple2_memmap_entry
99struct apple2_memmap_entry
102100{
103101   offs_t begin;
104102   offs_t end;
r17907r17908
106104   bank_disposition_t bank_disposition;
107105};
108106
109typedef struct _apple2_memmap_config apple2_memmap_config;
110struct _apple2_memmap_config
107struct apple2_memmap_config
111108{
112109   int first_bank;
113110   UINT8 *auxmem;
trunk/src/mess/video/newport.c
r17907r17908
186186   UINT32 nPalette[0x10000];
187187} CMAP_t;
188188
189typedef struct _newport_video_t newport_video_t;
190struct _newport_video_t
189struct newport_video_t
191190{
192191   VC2_t VC2;
193192   XMAP_t XMAP0;
trunk/src/mess/video/apollo.c
r17907r17908
7171#define CR2_SHIFT_ACCESS 0x02
7272#define CR2_PLANE_ACCESS 0x03
7373
74typedef struct _screen_data screen_data_t;
75struct _screen_data {
74struct screen_data_t {
7675   UINT16 width;
7776   UINT16 height;
7877   UINT16 buffer_width;
trunk/src/mess/video/crtc_ega.h
r17907r17908
3636
3737
3838/* interface */
39typedef struct _crtc_ega_interface crtc_ega_interface;
40struct _crtc_ega_interface
39struct crtc_ega_interface
4140{
4241   const char *m_screen_tag;      /* screen we are acting on */
4342   int m_hpixels_per_column;      /* number of pixels per video memory address */
trunk/src/mess/video/vic4567.c
r17907r17908
3131   UINT8 bitmap[8][SPRITE_BASE_X_SIZE * 2 / 8 + 1  /*for simplier sprite collision detection*/];
3232};
3333
34typedef struct _vic3_state  vic3_state;
35struct _vic3_state
34struct vic3_state
3635{
3736   vic3_type  type;
3837
trunk/src/mess/video/vic4567.h
r17907r17908
3232   VIC4567_PAL
3333} vic3_type;
3434
35typedef struct _vic3_interface vic3_interface;
36struct _vic3_interface
35struct vic3_interface
3736{
3837   const char         *screen;
3938   const char         *cpu;
trunk/src/mess/video/vtvideo.c
r17907r17908
2525    TYPE DEFINITIONS
2626***************************************************************************/
2727
28typedef struct _vt_video_t vt_video_t;
29struct _vt_video_t
28struct vt_video_t
3029{
3130   devcb_resolved_read8      in_ram_func;
3231   devcb_resolved_write8      clear_video_interrupt;
trunk/src/mess/video/vtvideo.h
r17907r17908
4848    TYPE DEFINITIONS
4949***************************************************************************/
5050
51typedef struct _vt_video_interface vt_video_interface;
52struct _vt_video_interface
51struct vt_video_interface
5352{
5453   const char *screen_tag;      /* screen we are acting on */
5554   const char *char_rom_region_tag; /* character rom region */
trunk/src/mess/video/mc6847.h
r17907r17908
4040   MCFG_SCREEN_VBLANK_TIME(0)                           \
4141
4242/* interface */
43typedef struct _mc6847_interface mc6847_interface;
44struct _mc6847_interface
43struct mc6847_interface
4544{
4645   /* screen we are acting on */
4746   const char *m_screen_tag;
trunk/src/mess/video/vdc8563.c
r17907r17908
2222#include "emu.h"
2323#include "video/vdc8563.h"
2424
25typedef struct _vdc8563_state vdc8563_state;
26struct _vdc8563_state
25struct vdc8563_state
2726{
2827   screen_device *screen;
2928
trunk/src/mess/video/vdc8563.h
r17907r17908
1818    TYPE DEFINITIONS
1919***************************************************************************/
2020
21typedef struct _vdc8563_interface vdc8563_interface;
22struct _vdc8563_interface
21struct vdc8563_interface
2322{
2423   const char         *screen;
2524   int                ram16konly;
trunk/src/mess/video/vic6567.c
r17907r17908
7474#include "emu.h"
7575#include "video/vic6567.h"
7676
77typedef struct _vic2_state  vic2_state;
78struct _vic2_state
77struct vic2_state
7978{
8079   vic2_type  type;
8180
trunk/src/mess/video/vic6567.h
r17907r17908
2222   VIC8566   // VIC IIe PAL
2323} vic2_type;
2424
25typedef struct _vic2_interface vic2_interface;
26struct _vic2_interface
25struct vic2_interface
2726{
2827   const char         *screen;
2928   const char         *cpu;
trunk/src/mess/video/crt.h
r17907r17908
1212
1313/*----------- defined in video/crt.c -----------*/
1414
15typedef struct _crt_interface crt_interface;
16struct _crt_interface
15struct crt_interface
1716{
1817   int num_levels;
1918   int offset_x, offset_y;
trunk/src/mess/video/dl1416.c
r17907r17908
9595    TYPE DEFINITIONS
9696***************************************************************************/
9797
98typedef struct _dl1416_state dl1416_state;
99struct _dl1416_state
98struct dl1416_state
10099{
101100   int write_enable;
102101   int chip_enable;
trunk/src/mess/video/dl1416.h
r17907r17908
2222
2323typedef void (*dl1416_update_func)(device_t *device, int digit, int data);
2424
25typedef struct _dl1416_interface dl1416_interface;
26struct _dl1416_interface
25struct dl1416_interface
2726{
2827   dl1416_update_func update;
2928};
trunk/src/mess/video/gime.h
r17907r17908
2121//**************************************************************************
2222
2323/* interface */
24typedef struct _gime_interface gime_interface;
25struct _gime_interface
24struct gime_interface
2625{
2726   const char *m_screen_tag;   /* screen we are acting on */
2827   const char *m_maincpu_tag;   /* tag of main CPU */
trunk/src/mess/video/k1ge.h
r17907r17908
5252   MCFG_DEVICE_CONFIG( _config )
5353
5454
55typedef struct _k1ge_interface k1ge_interface;
56struct _k1ge_interface
55struct k1ge_interface
5756{
5857   const char      *screen_tag;      /* screen we are drawing on */
5958   const char      *vram_tag;         /* memory region we will use for video ram */
trunk/src/mess/formats/cbm_crt.h
r17907r17908
116116//  TYPE DEFINITIONS
117117//**************************************************************************
118118
119typedef struct _cbm_crt_header cbm_crt_header;
120struct _cbm_crt_header
119struct cbm_crt_header
121120{
122121   UINT8 signature[16];
123122   UINT8 header_length[4];
r17907r17908
130129};
131130
132131
133typedef struct _cbm_crt_chip cbm_crt_chip;
134struct _cbm_crt_chip
132struct cbm_crt_chip
135133{
136134   UINT8 signature[4];
137135   UINT8 packet_length[4];
trunk/src/mess/formats/studio2_st2.c
r17907r17908
2222    TYPE DEFINITIONS
2323***************************************************************************/
2424
25typedef struct _st2_header st2_header;
26struct _st2_header
25struct st2_header
2726{
2827   UINT8 header[4];         /* "RCA2" in ASCII code */
2928   UINT8 blocks;            /* Total number of 256 byte blocks in file (including this one) */
trunk/src/mess/drivers/vboy.c
r17907r17908
4141   UINT32 tcr, wcr, kcr;
4242};
4343
44typedef struct _vip_regs_t vip_regs_t;
45struct _vip_regs_t
44struct vip_regs_t
4645{
4746
4847   UINT16 INTPND;
r17907r17908
13371336   GFXDECODE_ENTRY( "pcg",     0x00000, vboy_pcg_8x8,      0, 1 )
13381337GFXDECODE_END
13391338
1340typedef struct _vboy_pcb  vboy_pcb;
1341struct _vboy_pcb
1339struct vboy_pcb
13421340{
13431341   const char              *pcb_name;
13441342   int                     pcb_id;
trunk/src/mess/drivers/pasogo.c
r17907r17908
1818  rtc interrupt irq 2
1919 */
2020
21typedef struct _vg230_t vg230_t;
22struct _vg230_t
21struct vg230_t
2322{
2423   UINT8 index;
2524   UINT8 data[0x100];
r17907r17908
4039   } pmu;
4140};
4241
43typedef struct _ems_t ems_t;
44struct _ems_t
42struct ems_t
4543{
4644   UINT8 data;
4745   int index;
r17907r17908
6664   DECLARE_WRITE8_MEMBER(ems_w);
6765   DECLARE_READ8_MEMBER(vg230_io_r);
6866   DECLARE_WRITE8_MEMBER(vg230_io_w);
69   struct _vg230_t m_vg230;
70   struct _ems_t m_ems;
67   vg230_t m_vg230;
68   ems_t m_ems;
7169   DECLARE_DRIVER_INIT(pasogo);
7270   virtual void machine_reset();
7371   virtual void palette_init();
r17907r17908
467465
468466//static const unsigned i86_address_mask = 0x000fffff;
469467
470static const struct pit8253_config pc_pit8254_config =
468static const pit8253_config pc_pit8254_config =
471469{
472470   {
473471      {
r17907r17908
492490   device->machine().device("maincpu")->execute().set_input_line(0, state ? HOLD_LINE : CLEAR_LINE);
493491}
494492
495static const struct pic8259_interface pasogo_pic8259_config =
493static const pic8259_interface pasogo_pic8259_config =
496494{
497495   DEVCB_LINE(pasogo_pic8259_set_int_line),
498496   DEVCB_LINE_VCC,
trunk/src/mess/drivers/supracan.c
r17907r17908
9292
9393#define ENABLE_VERBOSE_LOG (1)
9494
95typedef struct _acan_dma_regs_t acan_dma_regs_t;
96struct _acan_dma_regs_t
95struct acan_dma_regs_t
9796{
9897   UINT32 source[2];
9998   UINT32 dest[2];
r17907r17908
101100   UINT16 control[2];
102101};
103102
104typedef struct _acan_sprdma_regs_t acan_sprdma_regs_t;
105struct _acan_sprdma_regs_t
103struct acan_sprdma_regs_t
106104{
107105   UINT32 src;
108106   UINT16 src_inc;
trunk/src/mess/drivers/pcfx.c
r17907r17908
1313#include "video/huc6270.h"
1414#include "video/huc6272.h"
1515
16typedef struct _pcfx_pad_t pcfx_pad_t;
17
18struct _pcfx_pad_t
16struct pcfx_pad_t
1917{
2018   UINT8 ctrl[2];
2119   UINT8 status[2];
trunk/src/mess/drivers/gba.c
r17907r17908
29762976   return chip;
29772977}
29782978
2979typedef struct _gba_pcb  gba_pcb;
2980struct _gba_pcb
2979struct gba_pcb
29812980{
29822981   const char              *pcb_name;
29832982   int                     pcb_id;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team