summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2015-01-28 09:20:10 +0100
committerGravatarGravatar Miodrag Milanovic <mmicko@gmail.com>2015-01-28 09:20:10 +0100
commit26e7a17b6326aa5a75a6276e52cf84a94c16d7a0 (patch) (github)
treebab4468226c59d590688e0ece892f5bfbca58736
parent13b862c4fae88f0f819c2c4416d49249e4de45b9 (diff)
downloadmame-26e7a17b6326aa5a75a6276e52cf84a94c16d7a0.tar.bz2
mame-26e7a17b6326aa5a75a6276e52cf84a94c16d7a0.zip
Cleanups and version bumpmame0158
-rw-r--r--hash/lantutor.xml4
-rw-r--r--hash/pasogo.xml2
-rw-r--r--src/emu/bus/a8sio/a8sio.c1
-rw-r--r--src/emu/bus/a8sio/cassette.c1
-rw-r--r--src/emu/bus/nes_ctrl/4score.c18
-rw-r--r--src/emu/bus/nes_ctrl/4score.h10
-rw-r--r--src/emu/bus/nes_ctrl/arkpaddle.c4
-rw-r--r--src/emu/bus/nes_ctrl/arkpaddle.h2
-rw-r--r--src/emu/bus/nes_ctrl/bcbattle.c26
-rw-r--r--src/emu/bus/nes_ctrl/ctrl.c22
-rw-r--r--src/emu/bus/nes_ctrl/ctrl.h6
-rw-r--r--src/emu/bus/nes_ctrl/fckeybrd.c78
-rw-r--r--src/emu/bus/nes_ctrl/ftrainer.c2
-rw-r--r--src/emu/bus/nes_ctrl/hori.c20
-rw-r--r--src/emu/bus/nes_ctrl/hori.h10
-rw-r--r--src/emu/bus/nes_ctrl/joypad.c63
-rw-r--r--src/emu/bus/nes_ctrl/joypad.h12
-rw-r--r--src/emu/bus/nes_ctrl/konamihs.c2
-rw-r--r--src/emu/bus/nes_ctrl/miracle.c19
-rw-r--r--src/emu/bus/nes_ctrl/mjpanel.c50
-rw-r--r--src/emu/bus/nes_ctrl/pachinko.c8
-rw-r--r--src/emu/bus/nes_ctrl/partytap.c2
-rw-r--r--src/emu/bus/nes_ctrl/powerpad.c2
-rw-r--r--src/emu/bus/nes_ctrl/suborkey.c84
-rw-r--r--src/emu/bus/nes_ctrl/zapper.c4
-rw-r--r--src/emu/bus/sms_ctrl/joypad.c8
-rw-r--r--src/emu/bus/vcs/dpc.c2
-rw-r--r--src/emu/clifront.c38
-rw-r--r--src/emu/cliopts.c3
-rw-r--r--src/emu/cpu/arcompact/arcompact.c2
-rw-r--r--src/emu/cpu/arcompact/arcompact.h14
-rw-r--r--src/emu/cpu/arcompact/arcompact_execute.c4
-rw-r--r--src/emu/cpu/i386/i386dasm.c4
-rw-r--r--src/emu/cpu/m68000/m68k_in.c2
-rw-r--r--src/emu/cpu/m68000/m68kcpu.c2
-rw-r--r--src/emu/cpu/m68000/m68kfpu.inc7
-rw-r--r--src/emu/cpu/tms0980/tms0980.c6
-rw-r--r--src/emu/devfind.c16
-rw-r--r--src/emu/devfind.h2
-rw-r--r--src/emu/distate.c2
-rw-r--r--src/emu/emucore.c100
-rw-r--r--src/emu/emuopts.c8
-rw-r--r--src/emu/emuopts.h10
-rw-r--r--src/emu/luaengine.c4
-rw-r--r--src/emu/machine.c4
-rw-r--r--src/emu/machine/intelfsh.c2
-rw-r--r--src/emu/machine/jvshost.c18
-rw-r--r--src/emu/machine/netlist.c12
-rw-r--r--src/emu/mame.c2
-rw-r--r--src/emu/netlist/analog/nld_ms_direct.h44
-rw-r--r--src/emu/netlist/analog/nld_ms_gauss_seidel.h46
-rw-r--r--src/emu/netlist/analog/nld_opamps.c2
-rw-r--r--src/emu/netlist/analog/nld_solver.c16
-rw-r--r--src/emu/netlist/analog/nld_solver.h12
-rw-r--r--src/emu/netlist/devices/net_lib.c3
-rw-r--r--src/emu/netlist/devices/nld_4020.c2
-rw-r--r--src/emu/netlist/devices/nld_cmos.h10
-rw-r--r--src/emu/netlist/devices/nld_system.h41
-rw-r--r--src/emu/netlist/nl_base.c1
-rw-r--r--src/emu/netlist/nl_base.h6
-rw-r--r--src/emu/netlist/nl_config.h30
-rw-r--r--src/emu/netlist/nl_factory.c16
-rw-r--r--src/emu/netlist/nl_setup.c10
-rw-r--r--src/emu/netlist/nl_setup.h10
-rw-r--r--src/emu/netlist/plists.h4
-rw-r--r--src/emu/netlist/pstate.c10
-rw-r--r--src/emu/parameters.c1
-rw-r--r--src/emu/render.c310
-rw-r--r--src/emu/render.h32
-rw-r--r--src/emu/rendfont.c20
-rw-r--r--src/emu/sound/qs1000.c2
-rw-r--r--src/emu/sound/tiasound.c2
-rw-r--r--src/emu/ui/barcode.c14
-rw-r--r--src/emu/ui/devctrl.h6
-rw-r--r--src/emu/ui/devopt.c34
-rw-r--r--src/emu/ui/devopt.h4
-rw-r--r--src/emu/ui/filemngr.c18
-rw-r--r--src/emu/ui/imgcntrl.c2
-rw-r--r--src/emu/ui/imgcntrl.h4
-rw-r--r--src/emu/ui/info.c10
-rw-r--r--src/emu/ui/inputmap.c20
-rw-r--r--src/emu/ui/sliders.c8
-rw-r--r--src/emu/ui/slotopt.h4
-rw-r--r--src/emu/ui/tapectrl.c22
-rw-r--r--src/emu/video/h63484.c2
-rw-r--r--src/emu/video/h63484.h2
-rw-r--r--src/lib/util/coretmpl.h12
-rw-r--r--src/lib/util/palette.h2
-rw-r--r--src/mame/audio/mario.c398
-rw-r--r--src/mame/drivers/aleck64.c20
-rw-r--r--src/mame/drivers/btime.c2
-rw-r--r--src/mame/drivers/calomega.c2
-rw-r--r--src/mame/drivers/cps1.c2
-rw-r--r--src/mame/drivers/ddenlovr.c4
-rw-r--r--src/mame/drivers/dec0.c2
-rw-r--r--src/mame/drivers/dgpix.c10
-rw-r--r--src/mame/drivers/dkong.c2
-rw-r--r--src/mame/drivers/dynax.c2
-rw-r--r--src/mame/drivers/eolith.c2
-rw-r--r--src/mame/drivers/eolith16.c6
-rw-r--r--src/mame/drivers/eolithsp.c2
-rw-r--r--src/mame/drivers/exidy.c4
-rw-r--r--src/mame/drivers/funkball.c2
-rw-r--r--src/mame/drivers/galaxian.c4
-rw-r--r--src/mame/drivers/gticlub.c8
-rw-r--r--src/mame/drivers/gts80a.c12
-rw-r--r--src/mame/drivers/model2.c10
-rw-r--r--src/mame/drivers/model3.c25
-rw-r--r--src/mame/drivers/overdriv.c2
-rw-r--r--src/mame/drivers/psychic5.c1
-rw-r--r--src/mame/drivers/seta2.c4
-rw-r--r--src/mame/drivers/stv.c2
-rw-r--r--src/mame/drivers/taitottl.c24
-rw-r--r--src/mame/drivers/tourtabl.c2
-rw-r--r--src/mame/drivers/twinkle.c14
-rw-r--r--src/mame/drivers/vegaeo.c2
-rw-r--r--src/mame/drivers/vicdual.c1
-rw-r--r--src/mame/includes/bogeyman.h12
-rw-r--r--src/mame/includes/calomega.h6
-rw-r--r--src/mame/includes/dec0.h16
-rw-r--r--src/mame/includes/dynax.h14
-rw-r--r--src/mame/includes/eolith.h16
-rw-r--r--src/mame/includes/exidy.h16
-rw-r--r--src/mame/includes/hyhoo.h8
-rw-r--r--src/mame/includes/m58.h12
-rw-r--r--src/mame/includes/mario.h8
-rw-r--r--src/mame/includes/model2.h2
-rw-r--r--src/mame/includes/nb1413m3.h4
-rw-r--r--src/mame/includes/paradise.h18
-rw-r--r--src/mame/includes/pastelg.h9
-rw-r--r--src/mame/includes/senjyo.h12
-rw-r--r--src/mame/includes/stadhero.h8
-rw-r--r--src/mame/includes/stfight.h2
-rw-r--r--src/mame/includes/stlforce.h10
-rw-r--r--src/mame/includes/strnskil.h12
-rw-r--r--src/mame/includes/vaportra.h6
-rw-r--r--src/mame/includes/xyonix.h10
-rw-r--r--src/mame/layout/gts80a_caveman.lay4
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.c54
-rw-r--r--src/mame/machine/315-5881_crypt.c42
-rw-r--r--src/mame/machine/dec0.c4
-rw-r--r--src/mame/machine/stfight.c2
-rw-r--r--src/mame/machine/stvprot.c4
-rw-r--r--src/mame/mame.lst12
-rw-r--r--src/mame/video/eolith.c2
-rw-r--r--src/mame/video/gp9001.c2
-rw-r--r--src/mame/video/pastelg.c2
-rw-r--r--src/mame/video/taitoair.c4
-rw-r--r--src/mame/video/tia.c2
-rw-r--r--src/mame/video/tia.h2
-rw-r--r--src/mess/drivers/a2600.c2
-rw-r--r--src/mess/drivers/banctec.c4
-rw-r--r--src/mess/drivers/cat.c20
-rw-r--r--src/mess/drivers/gamate.c215
-rw-r--r--src/mess/drivers/hp16500.c10
-rw-r--r--src/mess/drivers/hp9k_3xx.c88
-rw-r--r--src/mess/drivers/nes.c2
-rw-r--r--src/mess/drivers/ngen.c32
-rw-r--r--src/mess/drivers/pasogo.c2
-rw-r--r--src/mess/drivers/splitsec.c6
-rw-r--r--src/mess/drivers/tispeak.c2
-rw-r--r--src/mess/includes/mac.h6
-rw-r--r--src/mess/machine/amstrad.c4
-rw-r--r--src/mess/machine/macadb.c2
-rw-r--r--src/mess/machine/nes.c8
-rw-r--r--src/osd/modules/debugger/debug_module.h8
-rw-r--r--src/osd/modules/debugger/debugint.c24
-rw-r--r--src/osd/modules/debugger/debugqt.c26
-rw-r--r--src/osd/modules/debugger/debugwin.c26
-rw-r--r--src/osd/modules/debugger/none.c26
-rw-r--r--src/osd/modules/font/font_module.h4
-rw-r--r--src/osd/modules/font/font_none.c29
-rw-r--r--src/osd/modules/font/font_osx.c266
-rw-r--r--src/osd/modules/font/font_sdl.c512
-rw-r--r--src/osd/modules/font/font_windows.c406
-rw-r--r--src/osd/modules/lib/osdlib_macosx.c160
-rw-r--r--src/osd/modules/lib/osdlib_os2.c199
-rw-r--r--src/osd/modules/lib/osdlib_unix.c80
-rw-r--r--src/osd/modules/lib/osdlib_win32.c268
-rw-r--r--src/osd/modules/lib/osdobj_common.c279
-rw-r--r--src/osd/modules/lib/osdobj_common.h172
-rw-r--r--src/osd/modules/midi/none.c14
-rw-r--r--src/osd/modules/midi/portmidi.c692
-rw-r--r--src/osd/modules/osdmodule.c134
-rw-r--r--src/osd/modules/osdmodule.h78
-rw-r--r--src/osd/modules/sound/direct_sound.c32
-rw-r--r--src/osd/modules/sound/js_sound.c52
-rw-r--r--src/osd/modules/sound/none.c20
-rw-r--r--src/osd/modules/sound/sdl_sound.c270
-rw-r--r--src/osd/modules/sound/sound_module.h14
-rw-r--r--src/osd/modules/sync/sync_mini.c1
-rw-r--r--src/osd/modules/sync/sync_ntc.c3
-rw-r--r--src/osd/modules/sync/sync_os2.c2
-rw-r--r--src/osd/modules/sync/sync_sdl.c5
-rw-r--r--src/osd/modules/sync/sync_tc.c3
-rw-r--r--src/osd/modules/sync/sync_windows.c2
-rw-r--r--src/osd/modules/sync/work_osd.c24
-rw-r--r--src/osd/osdcore.c7
-rw-r--r--src/osd/osdepend.h8
-rw-r--r--src/osd/osdmini/minimisc.c1
-rw-r--r--src/osd/sdl/blit13.h4
-rw-r--r--src/osd/sdl/draw13.c263
-rw-r--r--src/osd/sdl/drawogl.c156
-rw-r--r--src/osd/sdl/input.c18
-rw-r--r--src/osd/sdl/netdev_pcap.c10
-rw-r--r--src/osd/sdl/netdev_pcap_osx.c10
-rw-r--r--src/osd/sdl/osdsdl.h10
-rw-r--r--src/osd/sdl/sdl.mak2
-rw-r--r--src/osd/sdl/sdldir.c1
-rw-r--r--src/osd/sdl/sdlfile.c108
-rw-r--r--src/osd/sdl/sdlmain.c4
-rw-r--r--src/osd/sdl/sdlos_macosx.c1
-rw-r--r--src/osd/sdl/sdlos_unix.c3
-rw-r--r--src/osd/sdl/sdlos_win32.c1
-rw-r--r--src/osd/sdl/sdlptty_unix.c8
-rw-r--r--src/osd/sdl/strconv.c14
-rw-r--r--src/osd/sdl/video.c6
-rw-r--r--src/osd/sdl/window.c64
-rw-r--r--src/osd/sdl/window.h4
-rw-r--r--src/osd/windows/vconv.c2
-rw-r--r--src/osd/windows/windows.mak2
-rw-r--r--src/tools/chdman.c4
-rw-r--r--src/tools/nltool.c14
-rw-r--r--src/version.c2
224 files changed, 3673 insertions, 3714 deletions
diff --git a/hash/lantutor.xml b/hash/lantutor.xml
index a07d3575f93..f62f968eae1 100644
--- a/hash/lantutor.xml
+++ b/hash/lantutor.xml
@@ -38,8 +38,8 @@
<publisher>Texas Instruments</publisher>
<part name="cart" interface="lantutor">
<dataarea name="rom" size="0x10000">
-<!-- <rom name="cd2315.vsm" size="0x4000" crc="" sha1="" offset="0x0000" /> -->
-<!-- <rom name="cd2316.vsm" size="0x4000" crc="" sha1="" offset="0x4000" /> -->
+<!-- <rom name="cd2315.vsm" size="0x4000" crc="" sha1="" offset="0x0000" /> -->
+<!-- <rom name="cd2316.vsm" size="0x4000" crc="" sha1="" offset="0x4000" /> -->
<rom name="cd2317.vsm" size="0x4000" crc="53231c0b" sha1="472117c3d0e28437fa8faa054f98088e06efc2a1" offset="0x8000" />
<rom name="cd2318.vsm" size="0x4000" crc="6c0727bc" sha1="132e39755b122f2cbec6f3e767f5d256a9c1e7ae" offset="0xc000" />
</dataarea>
diff --git a/hash/pasogo.xml b/hash/pasogo.xml
index 11f5223417e..1d756c50043 100644
--- a/hash/pasogo.xml
+++ b/hash/pasogo.xml
@@ -2,7 +2,7 @@
<!DOCTYPE softwarelist SYSTEM "softwarelist.dtd">
<softwarelist name="pasogo" description="Koei PasoGo cartridges">
-<!--
+<!--
Koei PasoGo (パソ碁) undumped games
Taikyoku-kun I ~ 対局くん I [KS-1001]
diff --git a/src/emu/bus/a8sio/a8sio.c b/src/emu/bus/a8sio/a8sio.c
index 520faa1e40f..fd64d077b50 100644
--- a/src/emu/bus/a8sio/a8sio.c
+++ b/src/emu/bus/a8sio/a8sio.c
@@ -217,4 +217,3 @@ WRITE_LINE_MEMBER( device_a8sio_card_interface::motor_w )
SLOT_INTERFACE_START(a8sio_cards)
SLOT_INTERFACE("cassette", A8SIO_CASSETTE)
SLOT_INTERFACE_END
-
diff --git a/src/emu/bus/a8sio/cassette.c b/src/emu/bus/a8sio/cassette.c
index cc2af705dad..45d33173bac 100644
--- a/src/emu/bus/a8sio/cassette.c
+++ b/src/emu/bus/a8sio/cassette.c
@@ -115,4 +115,3 @@ void a8sio_cassette_device::device_timer(emu_timer &timer, device_timer_id id, i
break;
}
}
-
diff --git a/src/emu/bus/nes_ctrl/4score.c b/src/emu/bus/nes_ctrl/4score.c
index ef384855612..a631804f7a7 100644
--- a/src/emu/bus/nes_ctrl/4score.c
+++ b/src/emu/bus/nes_ctrl/4score.c
@@ -4,15 +4,15 @@
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
-
-
- TODO: current implementation is a HACK, due to limitations of the
+
+
+ TODO: current implementation is a HACK, due to limitations of the
slot system!
A real Four Score would be connected to both the controller ports of
the NES, but current core cannot emulate something like this until
devices can live their own life and being connected to other devices
at request.
- In current implementation the device has to be mounted separately in
+ In current implementation the device has to be mounted separately in
the two ports and each enables 2 inputs (this is more or less as hacky
as the non-slot previous one, where the 4 ports were always available
to the emulated system, but it's not a great consolation :( )
@@ -22,7 +22,7 @@
since we could at best have two switches to disable the second player
inputs.
- Note: Two Pads are hardcoded in inputs below, instead of acting as
+ Note: Two Pads are hardcoded in inputs below, instead of acting as
passthrough for 2 standard joypad devices, in order to show in the
internal UI that they belong to P1+P3 and P2+P4, otherwise they would
be listed as P1+P2 and P3+P4 respectively. This *HAS* to be changed
@@ -171,10 +171,10 @@ void nes_4score_p1p3_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
// P3 & P4 inputs in NES Four Score are read serially with P1 & P2
m_latch = m_joypad1->read();
- m_latch |= (m_joypad3->read() << 8); // pad 3
+ m_latch |= (m_joypad3->read() << 8); // pad 3
m_latch |= (0x08 << 16); // signature
}
@@ -182,9 +182,9 @@ void nes_4score_p2p4_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
// P3 & P4 inputs in NES Four Score are read serially with P1 & P2
m_latch = m_joypad2->read();
- m_latch |= (m_joypad4->read() << 8); // pad 4
+ m_latch |= (m_joypad4->read() << 8); // pad 4
m_latch |= (0x04 << 16); // signature
}
diff --git a/src/emu/bus/nes_ctrl/4score.h b/src/emu/bus/nes_ctrl/4score.h
index f7a688fb162..9d1d4a348fa 100644
--- a/src/emu/bus/nes_ctrl/4score.h
+++ b/src/emu/bus/nes_ctrl/4score.h
@@ -47,12 +47,12 @@ class nes_4score_p1p3_device : public nes_4score_device
public:
// construction/destruction
nes_4score_p1p3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
-
+
protected:
virtual void write(UINT8 data);
-
+
private:
required_ioport m_joypad1;
required_ioport m_joypad3;
@@ -67,10 +67,10 @@ public:
nes_4score_p2p4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
virtual ioport_constructor device_input_ports() const;
-
+
protected:
virtual void write(UINT8 data);
-
+
private:
required_ioport m_joypad2;
required_ioport m_joypad4;
diff --git a/src/emu/bus/nes_ctrl/arkpaddle.c b/src/emu/bus/nes_ctrl/arkpaddle.c
index 14faf6a2a43..2ab6aef468b 100644
--- a/src/emu/bus/nes_ctrl/arkpaddle.c
+++ b/src/emu/bus/nes_ctrl/arkpaddle.c
@@ -105,9 +105,9 @@ UINT8 nes_vaus_device::read_bit34()
UINT8 nes_vausfc_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
ret = m_button->read() << 1;
- else //$4017
+ else //$4017
{
ret = (m_latch & 0x80) >> 6;
m_latch <<= 1;
diff --git a/src/emu/bus/nes_ctrl/arkpaddle.h b/src/emu/bus/nes_ctrl/arkpaddle.h
index a683f3e9904..73f0ff864d0 100644
--- a/src/emu/bus/nes_ctrl/arkpaddle.h
+++ b/src/emu/bus/nes_ctrl/arkpaddle.h
@@ -56,7 +56,7 @@ class nes_vausfc_device : public nes_vaus_device
public:
// construction/destruction
nes_vausfc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
protected:
virtual UINT8 read_bit34() { return 0; }
virtual UINT8 read_exp(offs_t offset);
diff --git a/src/emu/bus/nes_ctrl/bcbattle.c b/src/emu/bus/nes_ctrl/bcbattle.c
index 403bdeec1ae..c845627487e 100644
--- a/src/emu/bus/nes_ctrl/bcbattle.c
+++ b/src/emu/bus/nes_ctrl/bcbattle.c
@@ -5,7 +5,7 @@
TODO: this should be actually emulated as a standalone system with
a few 7segments LEDs, once we get a dump of its BIOS
At the moment we only emulated the connection with a Famicom
-
+
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
@@ -57,26 +57,26 @@ void nes_bcbattle_device::device_timer(emu_timer &timer, device_timer_id id, int
if (m_reader->get_byte_length() == 13)
{
for (int i = 0; i < 13; i++)
- m_current_barcode[i] = m_reader->read_code() + '0';
+ m_current_barcode[i] = m_reader->read_code() + '0';
}
else if (m_reader->get_byte_length() == 8)
{
for (int i = 0; i < 5; i++)
- m_current_barcode[i] = 0x20;
+ m_current_barcode[i] = 0x20;
for (int i = 5; i < 13; i++)
- m_current_barcode[i] = m_reader->read_code() + '0';
+ m_current_barcode[i] = m_reader->read_code() + '0';
}
// read one more, to reset the internal byte counter
m_reader->read_code();
// the string "SUNSOFT" is accepted as well by Barcode World
- m_current_barcode[13] = 'E';
- m_current_barcode[14] = 'P';
- m_current_barcode[15] = 'O';
- m_current_barcode[16] = 'C';
- m_current_barcode[17] = 'H';
- m_current_barcode[18] = 0x0d;
- m_current_barcode[19] = 0x0a;
+ m_current_barcode[13] = 'E';
+ m_current_barcode[14] = 'P';
+ m_current_barcode[15] = 'O';
+ m_current_barcode[16] = 'C';
+ m_current_barcode[17] = 'H';
+ m_current_barcode[18] = 0x0d;
+ m_current_barcode[19] = 0x0a;
m_pending_code = 1;
}
m_new_code = m_reader->get_pending_code();
@@ -110,7 +110,7 @@ void nes_bcbattle_device::device_start()
// and sending the proper serial bits, instead of our read_current_bit() function!
battler_timer = timer_alloc(TIMER_BATTLER);
battler_timer->adjust(attotime::zero, 0, machine().device<cpu_device>("maincpu")->cycles_to_attotime(1000));
-
+
save_item(NAME(m_current_barcode));
save_item(NAME(m_new_code));
save_item(NAME(m_pending_code));
@@ -184,7 +184,7 @@ int nes_bcbattle_device::read_current_bit()
UINT8 nes_bcbattle_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) //$4017
+ if (offset == 1) //$4017
{
ret |= read_current_bit() << 2;
}
diff --git a/src/emu/bus/nes_ctrl/ctrl.c b/src/emu/bus/nes_ctrl/ctrl.c
index c90b2bf82e5..9e81d228f6a 100644
--- a/src/emu/bus/nes_ctrl/ctrl.c
+++ b/src/emu/bus/nes_ctrl/ctrl.c
@@ -1,6 +1,6 @@
/**********************************************************************
- Nintendo Family Computer & Entertainment System controller ports
+ Nintendo Family Computer & Entertainment System controller ports
and Family Computer expansion port emulation
Here we emulate in fact 3 different kind of ports, which are
@@ -9,15 +9,15 @@
corresponding address ($4016 for port1, $4017 for port2)
- FC controller ports: these are only hooked to bit 0 of the
corresponding address (so that e.g. a NES Zapper could not
- be connected to a later FC AV model, because its inputs
+ be connected to a later FC AV model, because its inputs
would not be detected)
- FC expansion port: this is hooked to bits 0-4 of both addresses
To make things a little bit more complex, old FC models have the
controller hardwired to the unit, and the P2 controllers are
- directly hooked also to one of the expansion port lines (namely,
+ directly hooked also to one of the expansion port lines (namely,
microphone inputs from P2 go to $4016 bit 2)
- Even if the controller port and the expansion port are
+ Even if the controller port and the expansion port are
physically different (the FC expansion is a 15pin port, while
the controller ports are 7pin), we emulate them as variants of a
common device, exposing the following handlers:
@@ -25,15 +25,15 @@
inputs from controllers
- read_bit34: for bit3,4 reading, expected to be at the correct
offset (but we don't currently check for read_bit34 & 0xf8==0)
- - read_exp: for reads going through the expansion, with a offset
+ - read_exp: for reads going through the expansion, with a offset
parameter to decide whether we are reading from $4016 and $4017
- write: to acknowledge writes to $4016
- The driver emulation will take care to only call the correct
- handlers they have hooks for: Basic usage is that the expansion
- port calls read_exp, FC ctrl ports call read_bit0, and NES ctrl
- ports call both read_bit0 and read_bit34. However, to cope with
- the original FC microphone, we will have the second controller
+ The driver emulation will take care to only call the correct
+ handlers they have hooks for: Basic usage is that the expansion
+ port calls read_exp, FC ctrl ports call read_bit0, and NES ctrl
+ ports call both read_bit0 and read_bit34. However, to cope with
+ the original FC microphone, we will have the second controller
port calling read_exp too.
Copyright MESS Team.
@@ -168,7 +168,7 @@ SLOT_INTERFACE_START( nes_control_port1_devices )
SLOT_INTERFACE("joypad", NES_JOYPAD)
SLOT_INTERFACE("zapper", NES_ZAPPER)
SLOT_INTERFACE("4score_p1p3", NES_4SCORE_P1P3)
-// SLOT_INTERFACE("miracle_piano", NES_MIRACLE)
+// SLOT_INTERFACE("miracle_piano", NES_MIRACLE)
SLOT_INTERFACE_END
SLOT_INTERFACE_START( nes_control_port2_devices )
diff --git a/src/emu/bus/nes_ctrl/ctrl.h b/src/emu/bus/nes_ctrl/ctrl.h
index a87b3c9dc9f..79d981827de 100644
--- a/src/emu/bus/nes_ctrl/ctrl.h
+++ b/src/emu/bus/nes_ctrl/ctrl.h
@@ -1,6 +1,6 @@
/**********************************************************************
- Nintendo Family Computer & Entertainment System controller port
+ Nintendo Family Computer & Entertainment System controller port
emulation
Copyright MESS Team.
@@ -32,12 +32,12 @@ public:
// construction/destruction
device_nes_control_port_interface(const machine_config &mconfig, device_t &device);
virtual ~device_nes_control_port_interface();
-
+
virtual UINT8 read_bit0() { return 0; };
virtual UINT8 read_bit34() { return 0; };
virtual UINT8 read_exp(offs_t offset) { return 0; };
virtual void write(UINT8 data) { };
-
+
protected:
nes_control_port_device *m_port;
};
diff --git a/src/emu/bus/nes_ctrl/fckeybrd.c b/src/emu/bus/nes_ctrl/fckeybrd.c
index f31fc04e848..53f3584780c 100644
--- a/src/emu/bus/nes_ctrl/fckeybrd.c
+++ b/src/emu/bus/nes_ctrl/fckeybrd.c
@@ -18,27 +18,27 @@ const device_type NES_FCKEYBOARD = &device_creator<nes_fckeybrd_device>;
static INPUT_PORTS_START( fc_keyboard )
PORT_START("FCKEY.0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Kana")
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("FCKEY.1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@')
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_')
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('_')
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CHAR('/')
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^')
PORT_START("FCKEY.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
@@ -48,7 +48,7 @@ static INPUT_PORTS_START( fc_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
PORT_START("FCKEY.3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
@@ -58,7 +58,7 @@ static INPUT_PORTS_START( fc_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
PORT_START("FCKEY.4")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
@@ -68,7 +68,7 @@ static INPUT_PORTS_START( fc_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
PORT_START("FCKEY.5")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
@@ -78,7 +78,7 @@ static INPUT_PORTS_START( fc_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4')
PORT_START("FCKEY.6")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
@@ -88,24 +88,24 @@ static INPUT_PORTS_START( fc_keyboard )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
PORT_START("FCKEY.7")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC))
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(ESC))
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Grph") PORT_CODE(KEYCODE_LALT)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2')
PORT_START("FCKEY.8")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Clr")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Ins") PORT_CODE(KEYCODE_INSERT)
INPUT_PORTS_END
@@ -183,7 +183,7 @@ void nes_fckeybrd_device::device_reset()
UINT8 nes_fckeybrd_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
{
// FC Keyboard: tape input
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)
@@ -195,7 +195,7 @@ UINT8 nes_fckeybrd_device::read_exp(offs_t offset)
ret |= 0x02;
}
}
- else //$4017
+ else //$4017
{
// FC Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
if (m_fck_scan < 9)
@@ -216,16 +216,16 @@ void nes_fckeybrd_device::write(UINT8 data)
// tape output (not fully tested)
if ((m_cassette->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_RECORD)
m_cassette->output(((data & 0x07) == 0x07) ? +1.0 : -1.0);
-
+
if (BIT(data, 2)) // keyboard active
{
UINT8 out = BIT(data, 1); // scan
-
+
if (m_fck_mode && !out && ++m_fck_scan > 9)
m_fck_scan = 0;
-
+
m_fck_mode = out; // access lower or upper 4 bits
-
+
if (BIT(data, 0)) // reset
m_fck_scan = 0;
}
diff --git a/src/emu/bus/nes_ctrl/ftrainer.c b/src/emu/bus/nes_ctrl/ftrainer.c
index 38fdc326ed6..b8a7a3a22c2 100644
--- a/src/emu/bus/nes_ctrl/ftrainer.c
+++ b/src/emu/bus/nes_ctrl/ftrainer.c
@@ -119,7 +119,7 @@ void nes_ftrainer_device::device_reset()
UINT8 nes_ftrainer_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) //$4017
+ if (offset == 1) //$4017
{
if (!BIT(m_row_scan, 0))
{
diff --git a/src/emu/bus/nes_ctrl/hori.c b/src/emu/bus/nes_ctrl/hori.c
index e9d48a98bf3..720552c7799 100644
--- a/src/emu/bus/nes_ctrl/hori.c
+++ b/src/emu/bus/nes_ctrl/hori.c
@@ -1,8 +1,8 @@
/**********************************************************************
Nintendo Family Computer Hori Twin (and 4P?) adapters
-
- Emulation of the 4Players adapter is quite pointless: if 2P mode
+
+ Emulation of the 4Players adapter is quite pointless: if 2P mode
(default mode) it behaves like a Hori Twin adapter, in 4P mode
it has P1 and P2 inputs overwriting the inputs coming from the
main controllers (possibly creating a bit of confusion, since
@@ -117,9 +117,9 @@ nes_hori4p_device::nes_hori4p_device(const machine_config &mconfig, const char *
UINT8 nes_horitwin_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
ret |= (m_port1->read_bit0() << 1);
- else //$4017
+ else //$4017
ret |= (m_port2->read_bit0() << 1);
return ret;
}
@@ -127,21 +127,21 @@ UINT8 nes_horitwin_device::read_exp(offs_t offset)
UINT8 nes_hori4p_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (m_cfg->read() == 0) // 2P
+ if (m_cfg->read() == 0) // 2P
{
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
ret |= (m_port1->read_bit0() << 1);
- else //$4017
+ else //$4017
ret |= (m_port2->read_bit0() << 1);
}
- else // 4P
+ else // 4P
{
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
{
ret |= (m_port1->read_bit0() << 0);
ret |= (m_port3->read_bit0() << 1);
}
- else //$4017
+ else //$4017
{
ret |= (m_port2->read_bit0() << 0);
ret |= (m_port4->read_bit0() << 1);
diff --git a/src/emu/bus/nes_ctrl/hori.h b/src/emu/bus/nes_ctrl/hori.h
index 15601a7cc8e..3f9626221c9 100644
--- a/src/emu/bus/nes_ctrl/hori.h
+++ b/src/emu/bus/nes_ctrl/hori.h
@@ -51,17 +51,17 @@ class nes_hori4p_device : public device_t,
public:
// construction/destruction
nes_hori4p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
virtual machine_config_constructor device_mconfig_additions() const;
-
-protected:
+
+protected:
// device-level overrides
virtual void device_start() {}
-
+
virtual UINT8 read_exp(offs_t offset);
virtual void write(UINT8 data);
-
+
private:
required_device<nes_control_port_device> m_port1;
required_device<nes_control_port_device> m_port2;
diff --git a/src/emu/bus/nes_ctrl/joypad.c b/src/emu/bus/nes_ctrl/joypad.c
index 538235e7cf5..9d1a853901b 100644
--- a/src/emu/bus/nes_ctrl/joypad.c
+++ b/src/emu/bus/nes_ctrl/joypad.c
@@ -3,16 +3,16 @@
Nintendo Family Computer & Entertainment System Joypads
The original Famicom had two hardwired controller, with the second
- controller slightly different from the first one: it featured no
+ controller slightly different from the first one: it featured no
Start nor Select buttons, but had a built-in microphone (with
very limited capabilities, since it basically only detected two
states: something blowing into it / nothing blowing into it) for
some games to react to users "talking" into it
-
- Crazy Climber Pads are not really a kind of separate controllers,
- but just a couple of small sticks to be put on top of d-pads of
- the regular controllers. Users should then control the game by
- using both controllers, turned 90 degrees, as a couple of dual
+
+ Crazy Climber Pads are not really a kind of separate controllers,
+ but just a couple of small sticks to be put on top of d-pads of
+ the regular controllers. Users should then control the game by
+ using both controllers, turned 90 degrees, as a couple of dual
sticks like in the arcade control panel. However, we emulate them
separately so to map the controls to a friendlier default.
@@ -20,9 +20,9 @@
by Hori, but possibly licensed by Nintendo, since it use the official
logo and brand) which fits into the expansion port and allows to
daisy chain a second controller to the first one, to play 4players
- game (an image of such connection is shown e.g. in Nekketsu Koukou
+ game (an image of such connection is shown e.g. in Nekketsu Koukou
Dodgeball Bu manual)
-
+
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
@@ -45,8 +45,8 @@ static INPUT_PORTS_START( nes_joypad )
PORT_START("JOYPAD")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -58,7 +58,7 @@ static INPUT_PORTS_START( nes_fcpad_p2 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Microphone")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -69,8 +69,8 @@ static INPUT_PORTS_START( nes_ccpad_left )
PORT_START("JOYPAD")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
@@ -81,8 +81,8 @@ static INPUT_PORTS_START( nes_ccpad_right )
PORT_START("JOYPAD")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
@@ -103,14 +103,14 @@ static INPUT_PORTS_START( nes_arcstick )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_CONDITION("CONFIG", 0x01, EQUALS, 0x00)
INPUT_PORTS_END
//-------------------------------------------------
@@ -245,7 +245,7 @@ UINT8 nes_joypad_device::read_bit0()
UINT8 nes_fcpad2_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (!offset) // microphone input
+ if (!offset) // microphone input
ret |= m_joypad->read() & 0x04;
return ret;
@@ -260,9 +260,9 @@ UINT8 nes_fcpad2_device::read_exp(offs_t offset)
UINT8 nes_arcstick_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
{
- if ((m_cfg->read() & 2) == 0) // we are P1 input
+ if ((m_cfg->read() & 2) == 0) // we are P1 input
{
ret |= (m_latch & 1) << 1;
m_latch >>= 1;
@@ -270,9 +270,9 @@ UINT8 nes_arcstick_device::read_exp(offs_t offset)
else
ret |= m_daisychain->read_exp(0);
}
- else //$4017
+ else //$4017
{
- if ((m_cfg->read() & 2) == 2) // we are P2 input
+ if ((m_cfg->read() & 2) == 2) // we are P2 input
{
ret |= (m_latch & 1) << 1;
m_latch >>= 1;
@@ -280,7 +280,7 @@ UINT8 nes_arcstick_device::read_exp(offs_t offset)
else
ret |= m_daisychain->read_exp(1);
}
-
+
return ret;
}
@@ -292,7 +292,7 @@ void nes_joypad_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
m_latch = m_joypad->read();
}
@@ -311,7 +311,6 @@ void nes_arcstick_device::write(UINT8 data)
if (data & 0x01)
return;
-
+
m_latch = m_joypad->read();
}
-
diff --git a/src/emu/bus/nes_ctrl/joypad.h b/src/emu/bus/nes_ctrl/joypad.h
index 00c6aea58e4..27d5198ef58 100644
--- a/src/emu/bus/nes_ctrl/joypad.h
+++ b/src/emu/bus/nes_ctrl/joypad.h
@@ -51,9 +51,9 @@ class nes_fcpad2_device : public nes_joypad_device
public:
// construction/destruction
nes_fcpad2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
-
+
protected:
virtual UINT8 read_exp(offs_t offset);
virtual void write(UINT8 data);
@@ -66,7 +66,7 @@ class nes_ccpadl_device : public nes_joypad_device
public:
// construction/destruction
nes_ccpadl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
};
@@ -77,7 +77,7 @@ class nes_ccpadr_device : public nes_joypad_device
public:
// construction/destruction
nes_ccpadr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
};
@@ -88,7 +88,7 @@ class nes_arcstick_device : public nes_joypad_device
public:
// construction/destruction
nes_arcstick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
virtual ioport_constructor device_input_ports() const;
virtual machine_config_constructor device_mconfig_additions() const;
@@ -96,7 +96,7 @@ protected:
virtual UINT8 read_bit0() { return 0; }
virtual UINT8 read_exp(offs_t offset);
virtual void write(UINT8 data);
-
+
required_device<nes_control_port_device> m_daisychain;
required_ioport m_cfg;
};
diff --git a/src/emu/bus/nes_ctrl/konamihs.c b/src/emu/bus/nes_ctrl/konamihs.c
index 187d3d80e2e..19654b9bcd9 100644
--- a/src/emu/bus/nes_ctrl/konamihs.c
+++ b/src/emu/bus/nes_ctrl/konamihs.c
@@ -81,7 +81,7 @@ void nes_konamihs_device::device_reset()
UINT8 nes_konamihs_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) //$4017
+ if (offset == 1) //$4017
{
ret |= m_latch_p1 << 1;
ret |= m_latch_p2 << 3;
diff --git a/src/emu/bus/nes_ctrl/miracle.c b/src/emu/bus/nes_ctrl/miracle.c
index dbf8bfd5a7f..0a88e8a4cfc 100644
--- a/src/emu/bus/nes_ctrl/miracle.c
+++ b/src/emu/bus/nes_ctrl/miracle.c
@@ -1,8 +1,8 @@
/**********************************************************************
Nintendo Entertainment System - Miracle Piano Keyboard
-
- TODO: basically everything, this is just a skeleton with no
+
+ TODO: basically everything, this is just a skeleton with no
real MIDI handling at the moment.
Copyright MESS Team.
@@ -13,8 +13,8 @@
#include "miracle.h"
#define MIRACLE_MIDI_WAITING 0
-#define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano
-#define MIRACLE_MIDI_SEND 2 // send byte to piano
+#define MIRACLE_MIDI_RECEIVE 1 // receive byte from piano
+#define MIRACLE_MIDI_SEND 2 // send byte to piano
//**************************************************************************
// DEVICE DEFINITIONS
@@ -129,7 +129,7 @@ UINT8 nes_miracle_device::read_bit0()
void nes_miracle_device::write(UINT8 data)
{
-// printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode);
+// printf("write: %d (%d %02x %d)\n", data & 1, m_sent_bits, m_data_sent, m_midi_mode);
if (m_midi_mode == MIRACLE_MIDI_SEND)
{
@@ -142,7 +142,7 @@ void nes_miracle_device::write(UINT8 data)
// then we go back to waiting
if (m_sent_bits == 8)
{
-// printf("xmit MIDI byte %02x\n", m_data_sent);
+// printf("xmit MIDI byte %02x\n", m_data_sent);
xmit_char(m_data_sent);
m_midi_mode = MIRACLE_MIDI_WAITING;
m_sent_bits = 0;
@@ -157,13 +157,13 @@ void nes_miracle_device::write(UINT8 data)
m_strobe_on = 1;
return;
}
-
+
if (m_strobe_on)
{
// was timer running?
if (m_strobe_clock > 0)
{
-// printf("got strobe at %d clocks\n", m_strobe_clock);
+// printf("got strobe at %d clocks\n", m_strobe_clock);
if (m_strobe_clock < 66 && data == 0)
{
@@ -199,7 +199,7 @@ void nes_miracle_device::write(UINT8 data)
void nes_miracle_device::rcv_complete() // Rx completed receiving byte
{
receive_register_extract();
-// UINT8 rcv = get_received_char();
+// UINT8 rcv = get_received_char();
}
void nes_miracle_device::tra_complete() // Tx completed sending byte
@@ -247,4 +247,3 @@ void nes_miracle_device::xmit_char(UINT8 data)
}
}
}
-
diff --git a/src/emu/bus/nes_ctrl/mjpanel.c b/src/emu/bus/nes_ctrl/mjpanel.c
index 16e582338c9..4e45ecbd7c7 100644
--- a/src/emu/bus/nes_ctrl/mjpanel.c
+++ b/src/emu/bus/nes_ctrl/mjpanel.c
@@ -18,36 +18,36 @@ const device_type NES_MJPANEL = &device_creator<nes_mjpanel_device>;
static INPUT_PORTS_START( nes_mjpanel )
PORT_START("MJPANEL.0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MJPANEL.1")
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_N )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_M )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_L )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_K )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_J )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_I )
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_N )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_M )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_L )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_K )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_J )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_I )
PORT_START("MJPANEL.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_H )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_G )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_F )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_E )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_D )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_C )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_B )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_A )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_H )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_G )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_F )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_E )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_D )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_C )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_B )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_A )
PORT_START("MJPANEL.3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_RON )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_PON )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mahjong Select")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Mahjong Start")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_RON )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_PON )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_NAME("Mahjong Select")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START ) PORT_NAME("Mahjong Start")
INPUT_PORTS_END
@@ -124,7 +124,7 @@ void nes_mjpanel_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
if (data & 0xf8)
logerror("Error: Mahjong panel read with mux data %02x\n", (data & 0xfe));
else
diff --git a/src/emu/bus/nes_ctrl/pachinko.c b/src/emu/bus/nes_ctrl/pachinko.c
index 875aa92e771..6790e636dd6 100644
--- a/src/emu/bus/nes_ctrl/pachinko.c
+++ b/src/emu/bus/nes_ctrl/pachinko.c
@@ -20,8 +20,8 @@ static INPUT_PORTS_START( nes_pachinko )
PORT_START("JOYPAD")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("A")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("B")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SELECT )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
@@ -85,7 +85,7 @@ UINT8 nes_pachinko_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
// this controller behaves like a standard P3 joypad, with longer stream of inputs
- if (offset == 0) //$4016
+ if (offset == 0) //$4016
{
ret |= (m_latch & 1) << 1;
m_latch >>= 1;
@@ -101,7 +101,7 @@ void nes_pachinko_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
m_latch = m_joypad->read();
m_latch |= ((m_trigger->read() ^ 0xff) & 0xff) << 8;
m_latch |= 0xff0000;
diff --git a/src/emu/bus/nes_ctrl/partytap.c b/src/emu/bus/nes_ctrl/partytap.c
index f81fb89bd2f..769d2f30d76 100644
--- a/src/emu/bus/nes_ctrl/partytap.c
+++ b/src/emu/bus/nes_ctrl/partytap.c
@@ -81,7 +81,7 @@ void nes_partytap_device::device_reset()
UINT8 nes_partytap_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) //$4017
+ if (offset == 1) //$4017
{
ret |= m_latch & 0x1c;
m_latch >>= 3;
diff --git a/src/emu/bus/nes_ctrl/powerpad.c b/src/emu/bus/nes_ctrl/powerpad.c
index ba3a5795b43..ab13a49b8bf 100644
--- a/src/emu/bus/nes_ctrl/powerpad.c
+++ b/src/emu/bus/nes_ctrl/powerpad.c
@@ -130,7 +130,7 @@ void nes_powerpad_device::write(UINT8 data)
{
if (data & 0x01)
return;
-
+
m_latch[0] = m_ipt1->read();
m_latch[1] = m_ipt2->read() | 0xf0;
}
diff --git a/src/emu/bus/nes_ctrl/suborkey.c b/src/emu/bus/nes_ctrl/suborkey.c
index dc05f2fb236..2449f6a5b12 100644
--- a/src/emu/bus/nes_ctrl/suborkey.c
+++ b/src/emu/bus/nes_ctrl/suborkey.c
@@ -22,7 +22,7 @@ static INPUT_PORTS_START( fc_suborkey )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V')
@@ -32,57 +32,57 @@ static INPUT_PORTS_START( fc_suborkey )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X')
PORT_START("SUBOR.2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT))
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("NEXT")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PRIOR")
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME))
PORT_START("SUBOR.3")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9')
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L')
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',')
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.')
PORT_START("SUBOR.4")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']')
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[')
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\')
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
PORT_START("SUBOR.5")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q')
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
PORT_START("SUBOR.6")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7')
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('Y')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J')
@@ -92,17 +92,17 @@ static INPUT_PORTS_START( fc_suborkey )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(':')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=')
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
PORT_START("SUBOR.8")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T')
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H')
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N')
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R')
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6')
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B')
@@ -111,11 +111,11 @@ static INPUT_PORTS_START( fc_suborkey )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SUBOR.10")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LMENU")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
@@ -124,20 +124,20 @@ static INPUT_PORTS_START( fc_suborkey )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD)PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH_PAD)PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))
PORT_START("SUBOR.12")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`')
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("PAUSE")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE2")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
INPUT_PORTS_END
@@ -198,7 +198,7 @@ void nes_suborkey_device::device_reset()
UINT8 nes_suborkey_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) //$4017
+ if (offset == 1) //$4017
{
// Subor Keyboard: rows of the keyboard matrix are read 4-bits at time and returned as bit1->bit4
if (m_fck_scan < 13)
@@ -206,7 +206,7 @@ UINT8 nes_suborkey_device::read_exp(offs_t offset)
else
ret |= 0x1e;
}
-
+
return ret;
}
@@ -218,12 +218,12 @@ void nes_suborkey_device::write(UINT8 data)
{
if (BIT(data, 2)) // keyboard active
{
- UINT8 out = BIT(data, 1); // scan
+ UINT8 out = BIT(data, 1); // scan
if (m_fck_mode && !out && ++m_fck_scan > 12)
m_fck_scan = 0;
-
+
m_fck_mode = out; // access lower or upper 4 bits
-
+
if (BIT(data, 0)) // reset
m_fck_scan = 0;
}
diff --git a/src/emu/bus/nes_ctrl/zapper.c b/src/emu/bus/nes_ctrl/zapper.c
index 36965206f46..b603025203b 100644
--- a/src/emu/bus/nes_ctrl/zapper.c
+++ b/src/emu/bus/nes_ctrl/zapper.c
@@ -80,7 +80,7 @@ void nes_zapper_device::device_reset()
UINT8 nes_zapper_device::read_bit34()
{
UINT8 ret = m_trigger->read();
- if (!m_port->m_brightpixel_cb.isnull() &&
+ if (!m_port->m_brightpixel_cb.isnull() &&
m_port->m_brightpixel_cb(m_lightx->read(), m_lighty->read()))
ret &= ~0x08; // sprite hit
else
@@ -91,7 +91,7 @@ UINT8 nes_zapper_device::read_bit34()
UINT8 nes_zapper_device::read_exp(offs_t offset)
{
UINT8 ret = 0;
- if (offset == 1) // $4017
+ if (offset == 1) // $4017
ret |= nes_zapper_device::read_bit34();
return ret;
}
diff --git a/src/emu/bus/sms_ctrl/joypad.c b/src/emu/bus/sms_ctrl/joypad.c
index c42de757e44..24149ca5d4f 100644
--- a/src/emu/bus/sms_ctrl/joypad.c
+++ b/src/emu/bus/sms_ctrl/joypad.c
@@ -20,10 +20,10 @@ const device_type SMS_JOYPAD = &device_creator<sms_joypad_device>;
static INPUT_PORTS_START( sms_joypad )
PORT_START("JOYPAD")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
diff --git a/src/emu/bus/vcs/dpc.c b/src/emu/bus/vcs/dpc.c
index f701a531ebe..f802926ea09 100644
--- a/src/emu/bus/vcs/dpc.c
+++ b/src/emu/bus/vcs/dpc.c
@@ -37,7 +37,7 @@ void dpc_device::device_start()
save_item(NAME(m_df[i].music_mode), i);
save_item(NAME(m_df[i].osc_clk), i);
}
-
+
save_item(NAME(m_movamt));
save_item(NAME(m_latch_62));
save_item(NAME(m_latch_64));
diff --git a/src/emu/clifront.c b/src/emu/clifront.c
index c0258f75b62..c9b82dbe4a7 100644
--- a/src/emu/clifront.c
+++ b/src/emu/clifront.c
@@ -36,27 +36,27 @@
class media_identifier
{
public:
- // construction/destruction
- media_identifier(cli_options &options);
+ // construction/destruction
+ media_identifier(cli_options &options);
- // getters
- int total() const { return m_total; }
- int matches() const { return m_matches; }
- int nonroms() const { return m_nonroms; }
+ // getters
+ int total() const { return m_total; }
+ int matches() const { return m_matches; }
+ int nonroms() const { return m_nonroms; }
- // operations
- void reset() { m_total = m_matches = m_nonroms = 0; }
- void identify(const char *name);
- void identify_file(const char *name);
- void identify_data(const char *name, const UINT8 *data, int length);
- int find_by_hash(const hash_collection &hashes, int length);
+ // operations
+ void reset() { m_total = m_matches = m_nonroms = 0; }
+ void identify(const char *name);
+ void identify_file(const char *name);
+ void identify_data(const char *name, const UINT8 *data, int length);
+ int find_by_hash(const hash_collection &hashes, int length);
private:
- // internal state
- driver_enumerator m_drivlist;
- int m_total;
- int m_matches;
- int m_nonroms;
+ // internal state
+ driver_enumerator m_drivlist;
+ int m_total;
+ int m_matches;
+ int m_nonroms;
};
@@ -1619,8 +1619,8 @@ void cli_frontend::execute_commands(const char *exename)
}
if (!m_osd.execute_command(m_options.command()))
- // if we get here, we don't know what has been requested
- throw emu_fatalerror(MAMERR_INVALID_CONFIG, "Unknown command '%s' specified", m_options.command());
+ // if we get here, we don't know what has been requested
+ throw emu_fatalerror(MAMERR_INVALID_CONFIG, "Unknown command '%s' specified", m_options.command());
}
diff --git a/src/emu/cliopts.c b/src/emu/cliopts.c
index 9ca98bbc6ee..cfe55972844 100644
--- a/src/emu/cliopts.c
+++ b/src/emu/cliopts.c
@@ -60,6 +60,5 @@ const options_entry cli_options::s_option_entries[] =
cli_options::cli_options()
: emu_options()
{
- add_entries(cli_options::s_option_entries);
+ add_entries(cli_options::s_option_entries);
}
-
diff --git a/src/emu/cpu/arcompact/arcompact.c b/src/emu/cpu/arcompact/arcompact.c
index f7661f9bacd..be1eaae4fd8 100644
--- a/src/emu/cpu/arcompact/arcompact.c
+++ b/src/emu/cpu/arcompact/arcompact.c
@@ -51,7 +51,7 @@ ADDRESS_MAP_END
arcompact_device::arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: cpu_device(mconfig, ARCA5, "ARCtangent-A5", tag, owner, clock, "arca5", __FILE__)
, m_program_config("program", ENDIANNESS_LITTLE, 32, 32, 0) // some docs describe these as 'middle endian'?!
- , m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) )
+ , m_io_config( "io", ENDIANNESS_LITTLE, 32, AUX_SPACE_ADDRESS_WIDTH, 0, ADDRESS_MAP_NAME( arcompact_auxreg_map ) )
{
}
diff --git a/src/emu/cpu/arcompact/arcompact.h b/src/emu/cpu/arcompact/arcompact.h
index b98377b8fbb..f7b56cd010e 100644
--- a/src/emu/cpu/arcompact/arcompact.h
+++ b/src/emu/cpu/arcompact/arcompact.h
@@ -60,17 +60,17 @@ class arcompact_device : public cpu_device
public:
// construction/destruction
arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
-
+
DECLARE_READ32_MEMBER( arcompact_auxreg002_LPSTART_r);
DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w);
DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r);
DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w);
-
+
DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r);
DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r);
DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w);
-
+
protected:
// device-level overrides
virtual void device_start();
@@ -184,17 +184,17 @@ protected:
ARCOMPACT_RETTYPE arcompact_handle04_1c(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_1d(OPS_32);
// ARCOMPACT_RETTYPE arcompact_handle04_20(OPS_32);
-// ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
+// ARCOMPACT_RETTYPE arcompact_handle04_21(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_22(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_23(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_28(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_29(OPS_32);
-// ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
+// ARCOMPACT_RETTYPE arcompact_handle04_2a(OPS_32);
// ARCOMPACT_RETTYPE arcompact_handle04_2b(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_00(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_01(OPS_32);
// ARCOMPACT_RETTYPE arcompact_handle04_2f_02(OPS_32);
-// ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
+// ARCOMPACT_RETTYPE arcompact_handle04_2f_03(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_04(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_05(OPS_32);
ARCOMPACT_RETTYPE arcompact_handle04_2f_06(OPS_32);
@@ -770,7 +770,7 @@ protected:
ARCOMPACT_RETTYPE arcompact_handle19_0x_helper(OPS_16, const char* optext, int shift, int format);
ARCOMPACT_RETTYPE arcompact_handle1e_0x_helper(OPS_16, const char* optext);
ARCOMPACT_RETTYPE arcompact_handle1e_03_0x_helper(OPS_16, const char* optext);
-
+
UINT32 handle_jump_to_addr(int delay, int link, UINT32 address, UINT32 next_addr);
UINT32 handle_jump_to_register(int delay, int link, UINT32 reg, UINT32 next_addr, int flag);
diff --git a/src/emu/cpu/arcompact/arcompact_execute.c b/src/emu/cpu/arcompact/arcompact_execute.c
index acbd1a2af2d..115114efc8a 100644
--- a/src/emu/cpu/arcompact/arcompact_execute.c
+++ b/src/emu/cpu/arcompact/arcompact_execute.c
@@ -2142,7 +2142,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.
size = 8;
}
- // c = limm;
+ // c = limm;
}
else
@@ -2151,7 +2151,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.
// Jcc [c] 0010 0RRR 1110 0000 0RRR CCCC CC0Q QQQQ
// no conditional links to ILINK1, ILINK2?
- // c = m_regs[creg];
+ // c = m_regs[creg];
}
if (!check_condition(condition))
diff --git a/src/emu/cpu/i386/i386dasm.c b/src/emu/cpu/i386/i386dasm.c
index 2a74503d81e..281f58937a2 100644
--- a/src/emu/cpu/i386/i386dasm.c
+++ b/src/emu/cpu/i386/i386dasm.c
@@ -98,7 +98,7 @@ enum
#define ALWAYS64 0x400
#define SPECIAL64 0x800
#define SPECIAL64_ENT(x) (SPECIAL64 | ((x) << 24))
-#define GROUP_MOD 0x1000
+#define GROUP_MOD 0x1000
struct I386_OPCODE {
const char *mnemonic;
@@ -1953,7 +1953,7 @@ static const GROUP_OP group_op_table[] =
{ "group0F0D", group0F0D_table },
{ "group0F12", group0F12_table },
{ "group0F16", group0F16_table },
- { "group0F18", group0F18_table },
+ { "group0F18", group0F18_table },
{ "group0F71", group0F71_table },
{ "group0F72", group0F72_table },
{ "group0F73", group0F73_table },
diff --git a/src/emu/cpu/m68000/m68k_in.c b/src/emu/cpu/m68000/m68k_in.c
index 900fb0a502b..4b445a2c7a7 100644
--- a/src/emu/cpu/m68000/m68k_in.c
+++ b/src/emu/cpu/m68000/m68k_in.c
@@ -272,7 +272,7 @@ M68KMAKE_OPCODE_HANDLER_HEADER
extern void m68040_fpu_op0(m68000_base_device *m68k);
extern void m68040_fpu_op1(m68000_base_device *m68k);
extern void m68881_mmu_ops(m68000_base_device *m68k);
-extern void m68881_ftrap(m68000_base_device *m68k);
+extern void m68881_ftrap(m68000_base_device *m68k);
/* ======================================================================== */
/* ========================= INSTRUCTION HANDLERS ========================= */
diff --git a/src/emu/cpu/m68000/m68kcpu.c b/src/emu/cpu/m68000/m68kcpu.c
index 6f4f4126bbd..6c4c30d026e 100644
--- a/src/emu/cpu/m68000/m68kcpu.c
+++ b/src/emu/cpu/m68000/m68kcpu.c
@@ -699,7 +699,7 @@ static void m68k_cause_bus_error(m68000_base_device *m68k)
{
/* only the 68010 throws this unique type-1000 frame */
m68ki_stack_frame_1000(m68k, REG_PPC(m68k), sr, EXCEPTION_BUS_ERROR);
- }
+ }
else if (m68k->mmu_tmp_buserror_address == REG_PPC(m68k))
{
m68ki_stack_frame_1010(m68k, sr, EXCEPTION_BUS_ERROR, REG_PPC(m68k), m68k->mmu_tmp_buserror_address);
diff --git a/src/emu/cpu/m68000/m68kfpu.inc b/src/emu/cpu/m68000/m68kfpu.inc
index 47f39d8c4fb..47b554bc457 100644
--- a/src/emu/cpu/m68000/m68kfpu.inc
+++ b/src/emu/cpu/m68000/m68kfpu.inc
@@ -2177,11 +2177,11 @@ void m68881_ftrap(m68000_base_device *m68k)
// trap here
m68ki_exception_trap(m68k, EXCEPTION_TRAPV);
}
- else // fall through, requires eating the operand
+ else // fall through, requires eating the operand
{
switch (m68k->ir & 0x7)
{
- case 2: // word operand
+ case 2: // word operand
OPER_I_16(m68k);
break;
@@ -2189,9 +2189,8 @@ void m68881_ftrap(m68000_base_device *m68k)
OPER_I_32(m68k);
break;
- case 4: // no operand
+ case 4: // no operand
break;
}
}
}
-
diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c
index 025c0a7a575..a010d26c9ab 100644
--- a/src/emu/cpu/tms0980/tms0980.c
+++ b/src/emu/cpu/tms0980/tms0980.c
@@ -1037,7 +1037,7 @@ void tms1400_cpu_device::op_call()
m_ps = m_ps << 4 | m_pa;
m_pa = m_pb;
-
+
m_cs = m_cs << 2 | m_ca;
m_ca = m_cb;
}
@@ -1057,10 +1057,10 @@ void tms1400_cpu_device::op_retn()
m_pc = m_sr & m_pc_mask;
m_sr >>= m_pc_bits;
-
+
m_pa = m_pb = m_ps & 0xf;
m_ps >>= 4;
-
+
m_ca = m_cb = m_cs & 3;
m_cs >>= 2;
}
diff --git a/src/emu/devfind.c b/src/emu/devfind.c
index 7da4d211dc9..c7ac9c509ff 100644
--- a/src/emu/devfind.c
+++ b/src/emu/devfind.c
@@ -114,12 +114,12 @@ bool finder_base::report_missing(bool found, const char *objname, bool required)
void finder_base::printf_warning(const char *format, ...)
{
- va_list argptr;
- char buffer[1024];
-
- /* do the output */
- va_start(argptr, format);
- vsnprintf(buffer, 1024, format, argptr);
- osd_printf_warning("%s", buffer);
- va_end(argptr);
+ va_list argptr;
+ char buffer[1024];
+
+ /* do the output */
+ va_start(argptr, format);
+ vsnprintf(buffer, 1024, format, argptr);
+ osd_printf_warning("%s", buffer);
+ va_end(argptr);
}
diff --git a/src/emu/devfind.h b/src/emu/devfind.h
index d53b40ce922..f1a9d5f952f 100644
--- a/src/emu/devfind.h
+++ b/src/emu/devfind.h
@@ -57,7 +57,7 @@ protected:
void *find_memshare(UINT8 width, size_t &bytes, bool required);
bool report_missing(bool found, const char *objname, bool required);
- void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
+ void printf_warning(const char *format, ...) ATTR_PRINTF(2,3);
// internal state
finder_base *m_next;
diff --git a/src/emu/distate.c b/src/emu/distate.c
index 54e24b4d35a..1b9f03973bd 100644
--- a/src/emu/distate.c
+++ b/src/emu/distate.c
@@ -89,7 +89,7 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data
device_state_entry::device_state_entry(int index, device_state_interface *dev)
: m_device_state(dev),
- m_next(NULL),
+ m_next(NULL),
m_index(index),
m_dataptr(NULL),
m_datamask(0),
diff --git a/src/emu/emucore.c b/src/emu/emucore.c
index 923ba0e1187..c7ad49a25b5 100644
--- a/src/emu/emucore.c
+++ b/src/emu/emucore.c
@@ -17,61 +17,61 @@
emu_fatalerror::emu_fatalerror(const char *format, ...)
: code(0)
{
- if (format == NULL)
- {
- text[0] = '\0';
- }
- else
- {
- va_list ap;
- va_start(ap, format);
- vsprintf(text, format, ap);
- va_end(ap);
- }
- osd_break_into_debugger(text);
+ if (format == NULL)
+ {
+ text[0] = '\0';
+ }
+ else
+ {
+ va_list ap;
+ va_start(ap, format);
+ vsprintf(text, format, ap);
+ va_end(ap);
+ }
+ osd_break_into_debugger(text);
}
emu_fatalerror::emu_fatalerror(const char *format, va_list ap)
: code(0)
{
- if (format == NULL)
- {
- text[0] = '\0';
- }
- else
- {
- vsprintf(text, format, ap);
- }
- osd_break_into_debugger(text);
+ if (format == NULL)
+ {
+ text[0] = '\0';
+ }
+ else
+ {
+ vsprintf(text, format, ap);
+ }
+ osd_break_into_debugger(text);
}
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, ...)
: code(_exitcode)
{
- if (format == NULL)
- {
- text[0] = '\0';
- }
- else
- {
- va_list ap;
- va_start(ap, format);
- vsprintf(text, format, ap);
- va_end(ap);
- }
+ if (format == NULL)
+ {
+ text[0] = '\0';
+ }
+ else
+ {
+ va_list ap;
+ va_start(ap, format);
+ vsprintf(text, format, ap);
+ va_end(ap);
+ }
}
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, va_list ap)
: code(_exitcode)
{
- if (format == NULL)
- {
- text[0] = '\0';
- }
- else
- {
- vsprintf(text, format, ap);
- }
+ if (format == NULL)
+ {
+ text[0] = '\0';
+ }
+ else
+ {
+ vsprintf(text, format, ap);
+ }
}
@@ -89,18 +89,18 @@ void report_bad_device_cast(const device_t *dev, const std::type_info &src_type,
void fatalerror(const char *format, ...)
{
- va_list ap;
- va_start(ap, format);
- emu_fatalerror error(format, ap);
- va_end(ap);
- throw error;
+ va_list ap;
+ va_start(ap, format);
+ emu_fatalerror error(format, ap);
+ va_end(ap);
+ throw error;
}
void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...)
{
- va_list ap;
- va_start(ap, format);
- emu_fatalerror error(exitcode, format, ap);
- va_end(ap);
- throw error;
+ va_list ap;
+ va_start(ap, format);
+ emu_fatalerror error(exitcode, format, ap);
+ va_end(ap);
+ throw error;
}
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 1b34b86518e..0b3c785fd5d 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -150,10 +150,10 @@ const options_entry emu_options::s_option_entries[] =
// debugging options
{ NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
- { OPTION_VERBOSE ";v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
- { OPTION_LOG, "0", OPTION_BOOLEAN, "generate an error.log file" },
- { OPTION_OSLOG, "0", OPTION_BOOLEAN, "output error.log data to the system debugger" },
- { OPTION_DEBUG ";d", "0", OPTION_BOOLEAN, "enable/disable debugger" },
+ { OPTION_VERBOSE ";v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
+ { OPTION_LOG, "0", OPTION_BOOLEAN, "generate an error.log file" },
+ { OPTION_OSLOG, "0", OPTION_BOOLEAN, "output error.log data to the system debugger" },
+ { OPTION_DEBUG ";d", "0", OPTION_BOOLEAN, "enable/disable debugger" },
{ OPTION_UPDATEINPAUSE, "0", OPTION_BOOLEAN, "keep calling video updates while in pause" },
{ OPTION_DEBUGSCRIPT, NULL, OPTION_STRING, "script for debugger" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 880a51a2d09..17deb586576 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -318,11 +318,11 @@ public:
bool joystick_contradictory() const { return bool_value(OPTION_JOYSTICK_CONTRADICTORY); }
int coin_impulse() const { return int_value(OPTION_COIN_IMPULSE); }
- // core debugging options
- bool log() const { return bool_value(OPTION_LOG); }
- bool debug() const { return bool_value(OPTION_DEBUG); }
- bool verbose() const { return bool_value(OPTION_VERBOSE); }
- bool oslog() const { return bool_value(OPTION_OSLOG); }
+ // core debugging options
+ bool log() const { return bool_value(OPTION_LOG); }
+ bool debug() const { return bool_value(OPTION_DEBUG); }
+ bool verbose() const { return bool_value(OPTION_VERBOSE); }
+ bool oslog() const { return bool_value(OPTION_OSLOG); }
const char *debug_script() const { return value(OPTION_DEBUGSCRIPT); }
bool update_in_pause() const { return bool_value(OPTION_UPDATEINPAUSE); }
diff --git a/src/emu/luaengine.c b/src/emu/luaengine.c
index 3ec13f94e6e..59eae3870d5 100644
--- a/src/emu/luaengine.c
+++ b/src/emu/luaengine.c
@@ -714,8 +714,8 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
render_container &rc = sc->container();
ui_manager &ui = sc->machine().ui();
ui.draw_text_full(&rc, msg, x, y , (1.0f - x),
- JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR,
- UI_TEXT_BG_COLOR, NULL, NULL);
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR,
+ UI_TEXT_BG_COLOR, NULL, NULL);
return 0;
}
diff --git a/src/emu/machine.c b/src/emu/machine.c
index 7ef17f8c462..d70161c697e 100644
--- a/src/emu/machine.c
+++ b/src/emu/machine.c
@@ -108,7 +108,7 @@ static char giant_string_buffer[65536] = { 0 };
osd_interface &running_machine::osd() const
{
- return m_manager.osd();
+ return m_manager.osd();
}
//-------------------------------------------------
@@ -142,7 +142,7 @@ running_machine::running_machine(const machine_config &_config, machine_manager
m_save(*this),
m_memory(*this),
m_ioport(*this),
- m_parameters(*this),
+ m_parameters(*this),
m_scheduler(*this)
{
memset(&m_base_time, 0, sizeof(m_base_time));
diff --git a/src/emu/machine/intelfsh.c b/src/emu/machine/intelfsh.c
index 8cf6f54cb6b..5495678d525 100644
--- a/src/emu/machine/intelfsh.c
+++ b/src/emu/machine/intelfsh.c
@@ -253,7 +253,7 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type
m_size = 0x400000;
m_maker_id = MFG_INTEL;
m_device_id = 0x14;
-// m_sector_is_4k = true; 128kb?
+// m_sector_is_4k = true; 128kb?
map = ADDRESS_MAP_NAME( memory_map16_32Mb );
break;
case FLASH_SST_39VF020:
diff --git a/src/emu/machine/jvshost.c b/src/emu/machine/jvshost.c
index 6de499ef909..dd3bf50d22f 100644
--- a/src/emu/machine/jvshost.c
+++ b/src/emu/machine/jvshost.c
@@ -50,15 +50,15 @@ void jvs_host::commit_raw()
if(send_size < 3 || send_buffer[0] == 0x00 || send_buffer[1] != send_size-1) {
logerror("JVS checksum error\n");
} /*
- Naomi suchie3 have bad working controls with this
-
- // "This message is crap" doesn't exist so call it checksum error
- recv_buffer[0] = 0x00;
- recv_buffer[1] = 0x02;
- recv_buffer[2] = 0x03;
- recv_size = 3;
-
- } else */ {
+ Naomi suchie3 have bad working controls with this
+
+ // "This message is crap" doesn't exist so call it checksum error
+ recv_buffer[0] = 0x00;
+ recv_buffer[1] = 0x02;
+ recv_buffer[2] = 0x03;
+ recv_size = 3;
+
+ } else */ {
if(first_device) {
first_device->message(send_buffer[0], send_buffer+2, send_size-2, recv_buffer+2, recv_size);
recv_is_encoded = false;
diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c
index be120234136..ae88104f605 100644
--- a/src/emu/machine/netlist.c
+++ b/src/emu/machine/netlist.c
@@ -440,12 +440,12 @@ ATTR_COLD void netlist_mame_device_t::save_state()
if (td != NULL) save_pointer(td, s->m_name, s->m_count);
}
break;
- case DT_FLOAT:
- {
- float *td = s->resolved<float>();
- if (td != NULL) save_pointer(td, s->m_name, s->m_count);
- }
- break;
+ case DT_FLOAT:
+ {
+ float *td = s->resolved<float>();
+ if (td != NULL) save_pointer(td, s->m_name, s->m_count);
+ }
+ break;
case DT_INT64:
save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count);
break;
diff --git a/src/emu/mame.c b/src/emu/mame.c
index 885af0396fa..e6915e2cf48 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -94,7 +94,7 @@ machine_manager* machine_manager::m_manager = NULL;
osd_interface &machine_manager::osd() const
{
- return m_osd;
+ return m_osd;
}
diff --git a/src/emu/netlist/analog/nld_ms_direct.h b/src/emu/netlist/analog/nld_ms_direct.h
index 1e3f1f28b79..42e29d04b33 100644
--- a/src/emu/netlist/analog/nld_ms_direct.h
+++ b/src/emu/netlist/analog/nld_ms_direct.h
@@ -14,7 +14,7 @@ class netlist_matrix_solver_direct_t: public netlist_matrix_solver_t
public:
netlist_matrix_solver_direct_t(const netlist_solver_parameters_t &params, int size);
- netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t &params, int size);
+ netlist_matrix_solver_direct_t(const eSolverType type, const netlist_solver_parameters_t &params, int size);
virtual ~netlist_matrix_solver_direct_t();
@@ -69,13 +69,13 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::~netlist_matrix_solver_direct_t
{
//delete[] m_A[k];
}
- for (int k = 0; k < N(); k++)
- {
- nl_free(m_terms[k]);
- nl_free(m_row_ops[k]);
- }
- nl_free(m_row_ops[N()]);
- //delete[] m_last_RHS;
+ for (int k = 0; k < N(); k++)
+ {
+ nl_free(m_terms[k]);
+ nl_free(m_row_ops[k]);
+ }
+ nl_free(m_row_ops[N()]);
+ //delete[] m_last_RHS;
//delete[] m_RHS;
nl_free_array(m_terms);
nl_free_array(m_rails_temp);
@@ -193,17 +193,17 @@ ATTR_COLD void netlist_matrix_solver_direct_t<m_N, _storage_N>::vsetup(netlist_a
* Sorting as a general matrix pre-conditioning is mentioned in
* literature but I have found no articles about Gauss Seidel.
*
- * For Gaussian Elimination however increasing order is better suited.
- * FIXME: Even better would be to sort on elements right of the matrix diagonal.
- *
+ * For Gaussian Elimination however increasing order is better suited.
+ * FIXME: Even better would be to sort on elements right of the matrix diagonal.
+ *
*/
- int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1);
+ int sort_order = (type() == GAUSS_SEIDEL ? 1 : -1);
for (int k = 0; k < N() / 2; k++)
for (int i = 0; i < N() - 1; i++)
{
- if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0)
+ if ((m_terms[i]->m_railstart - m_terms[i+1]->m_railstart) * sort_order < 0)
{
std::swap(m_terms[i],m_terms[i+1]);
m_nets.swap(i, i+1);
@@ -475,15 +475,15 @@ netlist_matrix_solver_direct_t<m_N, _storage_N>::netlist_matrix_solver_direct_t(
, m_dim(size)
, m_lp_fact(0)
{
- m_terms = nl_alloc_array(terms_t *, N());
- m_rails_temp = nl_alloc_array(terms_t, N());
-
- for (int k = 0; k < N(); k++)
- {
- m_terms[k] = nl_alloc(terms_t);
- m_row_ops[k] = vector_ops_t::create_ops(k);
- }
- m_row_ops[N()] = vector_ops_t::create_ops(N());
+ m_terms = nl_alloc_array(terms_t *, N());
+ m_rails_temp = nl_alloc_array(terms_t, N());
+
+ for (int k = 0; k < N(); k++)
+ {
+ m_terms[k] = nl_alloc(terms_t);
+ m_row_ops[k] = vector_ops_t::create_ops(k);
+ }
+ m_row_ops[N()] = vector_ops_t::create_ops(N());
}
diff --git a/src/emu/netlist/analog/nld_ms_gauss_seidel.h b/src/emu/netlist/analog/nld_ms_gauss_seidel.h
index 2cc7a8cda3d..a3641c0b29b 100644
--- a/src/emu/netlist/analog/nld_ms_gauss_seidel.h
+++ b/src/emu/netlist/analog/nld_ms_gauss_seidel.h
@@ -17,16 +17,16 @@ class ATTR_ALIGNED(64) netlist_matrix_solver_gauss_seidel_t: public netlist_matr
public:
netlist_matrix_solver_gauss_seidel_t(const netlist_solver_parameters_t &params, int size)
- : netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size)
+ : netlist_matrix_solver_direct_t<m_N, _storage_N>(netlist_matrix_solver_t::GAUSS_SEIDEL, params, size)
, m_lp_fact(0)
, m_gs_fail(0)
, m_gs_total(0)
{
- const char *p = osd_getenv("NETLIST_STATS");
- if (p != NULL)
- m_log_stats = (bool) atoi(p);
- else
- m_log_stats = false;
+ const char *p = osd_getenv("NETLIST_STATS");
+ if (p != NULL)
+ m_log_stats = (bool) atoi(p);
+ else
+ m_log_stats = false;
}
virtual ~netlist_matrix_solver_gauss_seidel_t() {}
@@ -52,21 +52,21 @@ private:
template <int m_N, int _storage_N>
void netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::log_stats()
{
- if (this->m_stat_calculations != 0 && m_log_stats)
- {
- printf("==============================================\n");
- printf("Solver %s\n", this->name().cstr());
- printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr());
- printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic");
- printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep");
- printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls);
- printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n",
- this->m_stat_calculations,
- this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
- this->m_gs_fail,
- 100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations,
- (double) this->m_gs_total / (double) this->m_stat_calculations);
- }
+ if (this->m_stat_calculations != 0 && m_log_stats)
+ {
+ printf("==============================================\n");
+ printf("Solver %s\n", this->name().cstr());
+ printf(" ==> %d nets\n", this->N()); //, (*(*groups[i].first())->m_core_terms.first())->name().cstr());
+ printf(" has %s elements\n", this->is_dynamic() ? "dynamic" : "no dynamic");
+ printf(" has %s elements\n", this->is_timestep() ? "timestep" : "no timestep");
+ printf(" %6.3f average newton raphson loops\n", (double) this->m_stat_newton_raphson / (double) this->m_stat_vsolver_calls);
+ printf(" %10d invocations (%6d Hz) %10d gs fails (%6.2f%%) %6.3f average\n",
+ this->m_stat_calculations,
+ this->m_stat_calculations * 10 / (int) (this->netlist().time().as_double() * 10.0),
+ this->m_gs_fail,
+ 100.0 * (double) this->m_gs_fail / (double) this->m_stat_calculations,
+ (double) this->m_gs_total / (double) this->m_stat_calculations);
+ }
}
template <int m_N, int _storage_N>
@@ -299,7 +299,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv
//if (fabs(gabs_t - fabs(gtot_t)) > 1e-20)
// printf("%d %e abs: %f tot: %f\n",k, gabs_t / gtot_t -1.0, gabs_t, gtot_t);
- gabs_t *= 0.95; // avoid rounding issues
+ gabs_t *= 0.95; // avoid rounding issues
if (!USE_GABS || gabs_t <= gtot_t)
{
w[k] = ws / gtot_t;
@@ -343,7 +343,7 @@ ATTR_HOT inline int netlist_matrix_solver_gauss_seidel_t<m_N, _storage_N>::vsolv
this->m_nets[k]->m_cur_Analog = new_V[k];
this->m_gs_total += resched_cnt;
- this->m_stat_calculations++;
+ this->m_stat_calculations++;
if (resched)
{
diff --git a/src/emu/netlist/analog/nld_opamps.c b/src/emu/netlist/analog/nld_opamps.c
index 32d2457e71f..697b504e415 100644
--- a/src/emu/netlist/analog/nld_opamps.c
+++ b/src/emu/netlist/analog/nld_opamps.c
@@ -31,7 +31,7 @@ NETLIST_START(opamp_lm3900)
NET_C(R1.2, R2.2, G1.ON)
VCVS(G1)
PARAM(G1.G, 10000000)
- //PARAM(G1.RI, 1)
+ //PARAM(G1.RI, 1)
PARAM(G1.RO, RES_K(8))
NETLIST_END()
diff --git a/src/emu/netlist/analog/nld_solver.c b/src/emu/netlist/analog/nld_solver.c
index c20277e507c..22a10ea1a3d 100644
--- a/src/emu/netlist/analog/nld_solver.c
+++ b/src/emu/netlist/analog/nld_solver.c
@@ -99,11 +99,11 @@ ATTR_COLD void terms_t::set_pointers()
ATTR_COLD netlist_matrix_solver_t::netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t &params)
: m_stat_calculations(0),
- m_stat_newton_raphson(0),
- m_stat_vsolver_calls(0),
- m_params(params),
- m_cur_ts(0),
- m_type(type)
+ m_stat_newton_raphson(0),
+ m_stat_vsolver_calls(0),
+ m_params(params),
+ m_cur_ts(0),
+ m_type(type)
{
}
@@ -257,7 +257,7 @@ ATTR_HOT void netlist_matrix_solver_t::step(const netlist_time delta)
template<class C >
void netlist_matrix_solver_t::solve_base(C *p)
{
- m_stat_vsolver_calls++;
+ m_stat_vsolver_calls++;
if (is_dynamic())
{
int this_resched;
@@ -270,7 +270,7 @@ void netlist_matrix_solver_t::solve_base(C *p)
newton_loops++;
} while (this_resched > 1 && newton_loops < m_params.m_nr_loops);
- m_stat_newton_raphson += newton_loops;
+ m_stat_newton_raphson += newton_loops;
// reschedule ....
if (this_resched > 1 && !m_Q_sync.net().is_queued())
{
@@ -438,7 +438,7 @@ netlist_matrix_solver_t * NETLIB_NAME(solver)::create_solver(int size, const int
return nl_alloc(netlist_matrix_solver_direct2_t, m_params);
else
{
- typedef netlist_matrix_solver_gauss_seidel_t<m_N,_storage_N> solver_N;
+ typedef netlist_matrix_solver_gauss_seidel_t<m_N,_storage_N> solver_N;
if (size >= gs_threshold)
return nl_alloc(solver_N, m_params, size);
else
diff --git a/src/emu/netlist/analog/nld_solver.h b/src/emu/netlist/analog/nld_solver.h
index b6baa1d31da..a0cdec5c786 100644
--- a/src/emu/netlist/analog/nld_solver.h
+++ b/src/emu/netlist/analog/nld_solver.h
@@ -197,8 +197,8 @@ public:
enum eSolverType
{
- GAUSSIAN_ELIMINATION,
- GAUSS_SEIDEL
+ GAUSSIAN_ELIMINATION,
+ GAUSS_SEIDEL
};
ATTR_COLD netlist_matrix_solver_t(const eSolverType type, const netlist_solver_parameters_t &params);
@@ -243,9 +243,9 @@ protected:
plinearlist_t<netlist_analog_net_t *> m_nets;
plinearlist_t<netlist_analog_output_t *> m_inps;
- int m_stat_calculations;
- int m_stat_newton_raphson;
- int m_stat_vsolver_calls;
+ int m_stat_calculations;
+ int m_stat_newton_raphson;
+ int m_stat_vsolver_calls;
const netlist_solver_parameters_t &m_params;
@@ -264,7 +264,7 @@ private:
ATTR_HOT void update_inputs();
- const eSolverType m_type;
+ const eSolverType m_type;
};
diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c
index deb6411a3b0..8dc1d6760fb 100644
--- a/src/emu/netlist/devices/net_lib.c
+++ b/src/emu/netlist/devices/net_lib.c
@@ -78,7 +78,7 @@ void nl_initialize_factory(netlist_factory_t &factory)
ENTRY(VCCS, VCCS, "-")
ENTRY(CCCS, CCCS, "-")
ENTRY(dummy_input, DUMMY_INPUT, "-")
- ENTRY(frontier, FRONTIER, "+I,Q")
+ ENTRY(frontier, FRONTIER, "+I,Q")
ENTRY(QBJT_EB, QBJT_EB, "model")
ENTRY(QBJT_switch, QBJT_SW, "model")
ENTRY(ttl_input, TTL_INPUT, "IN")
@@ -148,4 +148,3 @@ void nl_initialize_factory(netlist_factory_t &factory)
ENTRY(SN74LS629_dip, SN74LS629_DIP, "1.CAP1,2.CAP2")
ENTRY(NE555_dip, NE555_DIP, "-")
}
-
diff --git a/src/emu/netlist/devices/nld_4020.c b/src/emu/netlist/devices/nld_4020.c
index 233c9cf41cf..48109d206d4 100644
--- a/src/emu/netlist/devices/nld_4020.c
+++ b/src/emu/netlist/devices/nld_4020.c
@@ -43,7 +43,7 @@ NETLIB_START(4020_sub)
register_output("Q5", m_Q[4]);
register_output("Q6", m_Q[5]);
register_output("Q7", m_Q[6]);
- register_output("Q8", m_Q[7]);
+ register_output("Q8", m_Q[7]);
register_output("Q9", m_Q[8]);
register_output("Q10", m_Q[9]);
register_output("Q11", m_Q[10]);
diff --git a/src/emu/netlist/devices/nld_cmos.h b/src/emu/netlist/devices/nld_cmos.h
index e4cee52d7d8..b62b73701de 100644
--- a/src/emu/netlist/devices/nld_cmos.h
+++ b/src/emu/netlist/devices/nld_cmos.h
@@ -21,11 +21,11 @@ class nld_vdd_vss : public netlist_device_t
protected:
ATTR_HOT void update() {};
- ATTR_HOT void start()
- {
- register_input("VDD,", m_vdd);
- register_input("VSS,", m_vss);
- };
+ ATTR_HOT void start()
+ {
+ register_input("VDD,", m_vdd);
+ register_input("VSS,", m_vss);
+ };
ATTR_HOT void reset() {};
public:
diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h
index 16f61cd35fa..644264eea13 100644
--- a/src/emu/netlist/devices/nld_system.h
+++ b/src/emu/netlist/devices/nld_system.h
@@ -40,10 +40,9 @@
NET_REGISTER_DEV(dummy_input, _name)
#define FRONTIER(_name, _IN, _OUT) \
- NET_REGISTER_DEV(frontier, _name) \
- NET_C(_IN, _name.I) \
- NET_C(_OUT, _name.Q) \
-
+ NET_REGISTER_DEV(frontier, _name) \
+ NET_C(_IN, _name.I) \
+ NET_C(_OUT, _name.Q)
// -----------------------------------------------------------------------------
// mainclock
// -----------------------------------------------------------------------------
@@ -159,31 +158,31 @@ private:
class NETLIB_NAME(frontier) : public netlist_device_t
{
public:
- ATTR_COLD NETLIB_NAME(frontier)()
- : netlist_device_t(DUMMY) { }
+ ATTR_COLD NETLIB_NAME(frontier)()
+ : netlist_device_t(DUMMY) { }
- ATTR_COLD virtual ~NETLIB_NAME(frontier)() {}
+ ATTR_COLD virtual ~NETLIB_NAME(frontier)() {}
protected:
- ATTR_COLD void start()
- {
- register_input("I", m_I);
- register_output("Q", m_Q);
- }
+ ATTR_COLD void start()
+ {
+ register_input("I", m_I);
+ register_output("Q", m_Q);
+ }
- ATTR_COLD void reset()
- {
- }
+ ATTR_COLD void reset()
+ {
+ }
- ATTR_HOT ATTR_ALIGN void update()
- {
- OUTANALOG(m_Q, INPANALOG(m_I));
- }
+ ATTR_HOT ATTR_ALIGN void update()
+ {
+ OUTANALOG(m_Q, INPANALOG(m_I));
+ }
private:
- netlist_analog_input_t m_I;
- netlist_analog_output_t m_Q;
+ netlist_analog_input_t m_I;
+ netlist_analog_output_t m_Q;
};
diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c
index 33659258790..8a4d0089c7b 100644
--- a/src/emu/netlist/nl_base.c
+++ b/src/emu/netlist/nl_base.c
@@ -1001,4 +1001,3 @@ NETLIB_UPDATE(mainclock)
net.toggle_new_Q();
net.set_time(netlist().time() + m_inc);
}
-
diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h
index c26d445026a..d8af15e53f8 100644
--- a/src/emu/netlist/nl_base.h
+++ b/src/emu/netlist/nl_base.h
@@ -337,7 +337,7 @@ public:
CAPACITOR, // Capacitor
DIODE, // Diode
DUMMY, // DUMMY device without function
- FRONTIER, // Net frontier
+ FRONTIER, // Net frontier
BJT_EB, // BJT(Ebers-Moll)
BJT_SWITCH, // BJT(Switch)
VCVS, // Voltage controlled voltage source
@@ -1268,13 +1268,13 @@ ATTR_HOT inline netlist_logic_net_t & RESTRICT netlist_net_t::as_logic()
ATTR_HOT inline const netlist_logic_net_t & RESTRICT netlist_net_t::as_logic() const
{
- nl_assert(family() == LOGIC);
+ nl_assert(family() == LOGIC);
return static_cast<const netlist_logic_net_t &>(*this);
}
ATTR_HOT inline netlist_analog_net_t & RESTRICT netlist_net_t::as_analog()
{
- nl_assert(family() == ANALOG);
+ nl_assert(family() == ANALOG);
return static_cast<netlist_analog_net_t &>(*this);
}
diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h
index d498d4f3ad3..966163bb053 100644
--- a/src/emu/netlist/nl_config.h
+++ b/src/emu/netlist/nl_config.h
@@ -121,21 +121,21 @@
class nl_fatalerror : public std::exception
{
public:
- nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3)
- {
- char text[1024];
- va_list ap;
- va_start(ap, format);
- vsprintf(text, format, ap);
- va_end(ap);
- osd_printf_error("%s\n", text);
- }
- nl_fatalerror(const char *format, va_list ap)
- {
- char text[1024];
- vsprintf(text, format, ap);
- osd_printf_error("%s\n", text);
- }
+ nl_fatalerror(const char *format, ...) ATTR_PRINTF(2,3)
+ {
+ char text[1024];
+ va_list ap;
+ va_start(ap, format);
+ vsprintf(text, format, ap);
+ va_end(ap);
+ osd_printf_error("%s\n", text);
+ }
+ nl_fatalerror(const char *format, va_list ap)
+ {
+ char text[1024];
+ vsprintf(text, format, ap);
+ osd_printf_error("%s\n", text);
+ }
};
//============================================================
diff --git a/src/emu/netlist/nl_factory.c b/src/emu/netlist/nl_factory.c
index 2a2bf80c3a1..7c6f38dcac4 100644
--- a/src/emu/netlist/nl_factory.c
+++ b/src/emu/netlist/nl_factory.c
@@ -56,18 +56,18 @@
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::term_param_list()
{
- if (m_def_param.startsWith("+"))
- return nl_util::split(m_def_param.substr(1), ",");
- else
- return nl_util::pstring_list();
+ if (m_def_param.startsWith("+"))
+ return nl_util::split(m_def_param.substr(1), ",");
+ else
+ return nl_util::pstring_list();
}
ATTR_COLD const nl_util::pstring_list net_device_t_base_factory::def_params()
{
- if (m_def_param.startsWith("+") || m_def_param.equals("-"))
- return nl_util::pstring_list();
- else
- return nl_util::split(m_def_param, ",");
+ if (m_def_param.startsWith("+") || m_def_param.equals("-"))
+ return nl_util::pstring_list();
+ else
+ return nl_util::split(m_def_param, ",");
}
diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c
index 4ed1d2ae9ba..9bcb763f14d 100644
--- a/src/emu/netlist/nl_setup.c
+++ b/src/emu/netlist/nl_setup.c
@@ -97,10 +97,10 @@ netlist_device_t *netlist_setup_t::register_dev(netlist_device_t *dev, const pst
netlist_device_t *netlist_setup_t::register_dev(const pstring &classname, const pstring &name)
{
- netlist_device_t *dev = factory().new_device_by_classname(classname);
- if (dev == NULL)
- netlist().error("Class %s not found!\n", classname.cstr());
- return register_dev(dev, name);
+ netlist_device_t *dev = factory().new_device_by_classname(classname);
+ if (dev == NULL)
+ netlist().error("Class %s not found!\n", classname.cstr());
+ return register_dev(dev, name);
}
template <class T>
@@ -697,7 +697,7 @@ void netlist_setup_t::resolve_inputs()
void netlist_setup_t::start_devices()
{
- //FIXME: we need a nl_getenv
+ //FIXME: we need a nl_getenv
if (getenv("NL_LOGS"))
{
NL_VERBOSE_OUT(("Creating dynamic logs ...\n"));
diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h
index 5e4059f2be5..f385ed079c3 100644
--- a/src/emu/netlist/nl_setup.h
+++ b/src/emu/netlist/nl_setup.h
@@ -146,13 +146,13 @@ public:
void namespace_push(const pstring &aname);
void namespace_pop();
- netlist_factory_t &factory() { return *m_factory; }
- const netlist_factory_t &factory() const { return *m_factory; }
+ netlist_factory_t &factory() { return *m_factory; }
+ const netlist_factory_t &factory() const { return *m_factory; }
- /* not ideal, but needed for save_state */
- tagmap_terminal_t m_terminals;
+ /* not ideal, but needed for save_state */
+ tagmap_terminal_t m_terminals;
- void print_stats() const;
+ void print_stats() const;
protected:
diff --git a/src/emu/netlist/plists.h b/src/emu/netlist/plists.h
index c2f758d0d70..c7eb594cdb2 100644
--- a/src/emu/netlist/plists.h
+++ b/src/emu/netlist/plists.h
@@ -60,7 +60,7 @@ public:
ATTR_COLD ~plinearlist_t()
{
if (m_list != NULL)
- nl_free_array(m_list);
+ nl_free_array(m_list);
m_list = NULL;
}
@@ -183,7 +183,7 @@ private:
else
{
if (m_list != NULL)
- nl_free_array(m_list);
+ nl_free_array(m_list);
m_list = NULL;
m_count = 0;
}
diff --git a/src/emu/netlist/pstate.c b/src/emu/netlist/pstate.c
index d38588ba054..8d7e1810f11 100644
--- a/src/emu/netlist/pstate.c
+++ b/src/emu/netlist/pstate.c
@@ -24,7 +24,7 @@ ATTR_COLD void pstate_manager_t::save_state_ptr(const pstring &stname, const pst
"DT_INT8",
"DT_INT",
"DT_BOOLEAN",
- "DT_FLOAT"
+ "DT_FLOAT"
};
NL_VERBOSE_OUT(("SAVE: <%s> %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr));
@@ -64,8 +64,8 @@ ATTR_COLD void pstate_manager_t::post_load()
template<> ATTR_COLD void pstate_manager_t::save_item(pstate_callback_t &state, const void *owner, const pstring &stname)
{
- //save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
- pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state);
- m_save.add(p);
- state.register_state(*this, stname);
+ //save_state_ptr(stname, DT_CUSTOM, 0, 1, &state);
+ pstate_entry_t *p = nl_alloc(pstate_entry_t, stname, owner, &state);
+ m_save.add(p);
+ state.register_state(*this, stname);
}
diff --git a/src/emu/parameters.c b/src/emu/parameters.c
index 86bf9616bef..8b313380064 100644
--- a/src/emu/parameters.c
+++ b/src/emu/parameters.c
@@ -24,4 +24,3 @@ void parameters_manager::add(astring tag, astring value)
{
m_parameters.add(tag, value);
}
-
diff --git a/src/emu/render.c b/src/emu/render.c
index 014f85f8903..2370d015a35 100644
--- a/src/emu/render.c
+++ b/src/emu/render.c
@@ -207,62 +207,62 @@ inline item_layer get_layer_and_blendmode(const layout_view &view, int index, in
render_texinfo &render_texinfo::operator=(const render_texinfo &src)
{
- free_palette();
- base = src.base;
- rowpixels = src.rowpixels;
- width = src.width;
- height = src.height;
- seqid = src.seqid;
- osddata = src.osddata;
- m_palette = src.m_palette;
- if (m_palette != NULL)
- {
- m_palette->ref_count++;
- }
- return *this;
+ free_palette();
+ base = src.base;
+ rowpixels = src.rowpixels;
+ width = src.width;
+ height = src.height;
+ seqid = src.seqid;
+ osddata = src.osddata;
+ m_palette = src.m_palette;
+ if (m_palette != NULL)
+ {
+ m_palette->ref_count++;
+ }
+ return *this;
}
render_texinfo::render_texinfo(const render_texinfo &src)
{
- base = src.base;
- rowpixels = src.rowpixels;
- width = src.width;
- height = src.height;
- seqid = src.seqid;
- osddata = src.osddata;
- m_palette = src.m_palette;
- if (m_palette != NULL)
- {
- m_palette->ref_count++;
- }
+ base = src.base;
+ rowpixels = src.rowpixels;
+ width = src.width;
+ height = src.height;
+ seqid = src.seqid;
+ osddata = src.osddata;
+ m_palette = src.m_palette;
+ if (m_palette != NULL)
+ {
+ m_palette->ref_count++;
+ }
}
void render_texinfo::set_palette(const dynamic_array<rgb_t> *source)
{
- free_palette();
- if (source != NULL)
- {
- m_palette = global_alloc(render_palette_copy);
- m_palette->palette.copyfrom(*source);
- m_palette->ref_count = 1;
- }
- else
- {
- m_palette = NULL;
- }
+ free_palette();
+ if (source != NULL)
+ {
+ m_palette = global_alloc(render_palette_copy);
+ m_palette->palette.copyfrom(*source);
+ m_palette->ref_count = 1;
+ }
+ else
+ {
+ m_palette = NULL;
+ }
}
void render_texinfo::free_palette()
{
- if (m_palette != NULL)
- {
- m_palette->ref_count--;
- if (m_palette->ref_count == 0)
- {
- global_free(m_palette);
- }
- }
- m_palette = NULL;
+ if (m_palette != NULL)
+ {
+ m_palette->ref_count--;
+ if (m_palette->ref_count == 0)
+ {
+ global_free(m_palette);
+ }
+ }
+ m_palette = NULL;
}
@@ -277,31 +277,31 @@ void render_texinfo::free_palette()
void render_primitive::reset()
{
- // public state
- type = INVALID;
- bounds.x0 = 0;
- bounds.y0 = 0;
- bounds.x1 = 0;
- bounds.y1 = 0;
- color.a = 0;
- color.r = 0;
- color.g = 0;
- color.b = 0;
- flags = 0;
- width = 0.0f;
- texture.set_palette(NULL);
- texture = render_texinfo();
- texcoords.bl.u = 0.0f;
- texcoords.bl.v = 0.0f;
- texcoords.br.u = 0.0f;
- texcoords.br.v = 0.0f;
- texcoords.tl.u = 0.0f;
- texcoords.tl.v = 0.0f;
- texcoords.tr.u = 0.0f;
- texcoords.tr.v = 0.0f;
-
- // do not clear m_next!
- // memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
+ // public state
+ type = INVALID;
+ bounds.x0 = 0;
+ bounds.y0 = 0;
+ bounds.x1 = 0;
+ bounds.y1 = 0;
+ color.a = 0;
+ color.r = 0;
+ color.g = 0;
+ color.b = 0;
+ flags = 0;
+ width = 0.0f;
+ texture.set_palette(NULL);
+ texture = render_texinfo();
+ texcoords.bl.u = 0.0f;
+ texcoords.bl.v = 0.0f;
+ texcoords.br.u = 0.0f;
+ texcoords.br.v = 0.0f;
+ texcoords.tl.u = 0.0f;
+ texcoords.tl.v = 0.0f;
+ texcoords.tr.u = 0.0f;
+ texcoords.tr.v = 0.0f;
+
+ // do not clear m_next!
+ // memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
}
@@ -556,63 +556,63 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
texinfo.width = swidth;
texinfo.height = sheight;
// will be set later
- texinfo.set_palette(NULL);
+ texinfo.set_palette(NULL);
texinfo.seqid = ++m_curseq;
}
else
{
- // make sure we can recover the original argb32 bitmap
- bitmap_argb32 dummy;
- bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
-
- // is it a size we already have?
- scaled_texture *scaled = NULL;
- int scalenum;
- for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
- {
- scaled = &m_scaled[scalenum];
-
- // we need a non-NULL bitmap with matching dest size
- if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
- break;
- }
-
- // did we get one?
- if (scalenum == ARRAY_LENGTH(m_scaled))
- {
- int lowest = -1;
-
- // didn't find one -- take the entry with the lowest seqnum
- for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
- if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
- lowest = scalenum;
- assert_always(lowest != -1, "Too many live texture instances!");
-
- // throw out any existing entries
- scaled = &m_scaled[lowest];
- if (scaled->bitmap != NULL)
- {
- m_manager->invalidate_all(scaled->bitmap);
- global_free(scaled->bitmap);
- }
-
- // allocate a new bitmap
- scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
- scaled->seqid = ++m_curseq;
-
- // let the scaler do the work
- (*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
- }
-
- // finally fill out the new info
- primlist.add_reference(scaled->bitmap);
- texinfo.base = &scaled->bitmap->pix32(0);
- texinfo.rowpixels = scaled->bitmap->rowpixels();
- texinfo.width = dwidth;
- texinfo.height = dheight;
- // will be set later
- texinfo.set_palette(NULL);
- texinfo.seqid = scaled->seqid;
+ // make sure we can recover the original argb32 bitmap
+ bitmap_argb32 dummy;
+ bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
+
+ // is it a size we already have?
+ scaled_texture *scaled = NULL;
+ int scalenum;
+ for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
+ {
+ scaled = &m_scaled[scalenum];
+
+ // we need a non-NULL bitmap with matching dest size
+ if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
+ break;
+ }
+
+ // did we get one?
+ if (scalenum == ARRAY_LENGTH(m_scaled))
+ {
+ int lowest = -1;
+
+ // didn't find one -- take the entry with the lowest seqnum
+ for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
+ if ((lowest == -1 || m_scaled[scalenum].seqid < m_scaled[lowest].seqid) && !primlist.has_reference(m_scaled[scalenum].bitmap))
+ lowest = scalenum;
+ assert_always(lowest != -1, "Too many live texture instances!");
+
+ // throw out any existing entries
+ scaled = &m_scaled[lowest];
+ if (scaled->bitmap != NULL)
+ {
+ m_manager->invalidate_all(scaled->bitmap);
+ global_free(scaled->bitmap);
+ }
+
+ // allocate a new bitmap
+ scaled->bitmap = global_alloc(bitmap_argb32(dwidth, dheight));
+ scaled->seqid = ++m_curseq;
+
+ // let the scaler do the work
+ (*m_scaler)(*scaled->bitmap, srcbitmap, m_sbounds, m_param);
+ }
+
+ // finally fill out the new info
+ primlist.add_reference(scaled->bitmap);
+ texinfo.base = &scaled->bitmap->pix32(0);
+ texinfo.rowpixels = scaled->bitmap->rowpixels();
+ texinfo.width = dwidth;
+ texinfo.height = dheight;
+ // will be set later
+ texinfo.set_palette(NULL);
+ texinfo.seqid = scaled->seqid;
}
}
@@ -1817,26 +1817,26 @@ void render_target::add_container_primitives(render_primitive_list &list, const
height = MIN(height, m_maxtexheight);
curitem->texture()->get_scaled(width, height, prim->texture, list);
- // set the palette
+ // set the palette
#if 1
const dynamic_array<rgb_t> *adjusted_pal = curitem->texture()->get_adjusted_palette(container);
- prim->texture.set_palette(adjusted_pal);
+ prim->texture.set_palette(adjusted_pal);
#else
- prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
+ prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
#endif
- // determine UV coordinates and apply clipping
- prim->texcoords = oriented_texcoords[finalorient];
- clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
-
- // apply the final orientation from the quad flags and then build up the final flags
- prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
- PRIMFLAG_TEXORIENT(finalorient) |
- PRIMFLAG_TEXFORMAT(curitem->texture()->format());
- if (blendmode != -1)
- prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
- else
- prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
+ // determine UV coordinates and apply clipping
+ prim->texcoords = oriented_texcoords[finalorient];
+ clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
+
+ // apply the final orientation from the quad flags and then build up the final flags
+ prim->flags = (curitem->flags() & ~(PRIMFLAG_TEXORIENT_MASK | PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) |
+ PRIMFLAG_TEXORIENT(finalorient) |
+ PRIMFLAG_TEXFORMAT(curitem->texture()->format());
+ if (blendmode != -1)
+ prim->flags |= PRIMFLAG_BLENDMODE(blendmode);
+ else
+ prim->flags |= PRIMFLAG_BLENDMODE(PRIMFLAG_GET_BLENDMODE(curitem->flags()));
}
else
{
@@ -1876,15 +1876,15 @@ void render_target::add_container_primitives(render_primitive_list &list, const
(container_xform.orientation & ORIENTATION_SWAP_XY) ? width : height, prim->texture, list);
// determine UV coordinates
- prim->texcoords = oriented_texcoords[container_xform.orientation];
+ prim->texcoords = oriented_texcoords[container_xform.orientation];
- // set the flags and add it to the list
- prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
- PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
- PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
- PRIMFLAG_TEXSHADE(1);
+ // set the flags and add it to the list
+ prim->flags = PRIMFLAG_TEXORIENT(container_xform.orientation) |
+ PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY) |
+ PRIMFLAG_TEXFORMAT(container.overlay()->format()) |
+ PRIMFLAG_TEXSHADE(1);
- list.append_or_return(*prim, false);
+ list.append_or_return(*prim, false);
}
}
@@ -1925,17 +1925,17 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
texture->get_scaled(width, height, prim->texture, list);
- // compute the clip rect
- render_bounds cliprect;
- cliprect.x0 = render_round_nearest(xform.xoffs);
- cliprect.y0 = render_round_nearest(xform.yoffs);
- cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
- cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
- sect_render_bounds(&cliprect, &m_bounds);
-
- // determine UV coordinates and apply clipping
- prim->texcoords = oriented_texcoords[xform.orientation];
- bool clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
+ // compute the clip rect
+ render_bounds cliprect;
+ cliprect.x0 = render_round_nearest(xform.xoffs);
+ cliprect.y0 = render_round_nearest(xform.yoffs);
+ cliprect.x1 = render_round_nearest(xform.xoffs + xform.xscale);
+ cliprect.y1 = render_round_nearest(xform.yoffs + xform.yscale);
+ sect_render_bounds(&cliprect, &m_bounds);
+
+ // determine UV coordinates and apply clipping
+ prim->texcoords = oriented_texcoords[xform.orientation];
+ bool clipped = render_clip_quad(&prim->bounds, &cliprect, &prim->texcoords);
// add to the list or free if we're clipped out
list.append_or_return(*prim, clipped);
diff --git a/src/emu/render.h b/src/emu/render.h
index 5666e6825ee..618c03552ba 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -213,26 +213,26 @@ struct render_quad_texuv
struct render_palette_copy
{
- int ref_count;
- dynamic_array<rgb_t> palette;
+ int ref_count;
+ dynamic_array<rgb_t> palette;
};
class render_texinfo
{
public:
- render_texinfo()
- : base(NULL), rowpixels(0), width(0), height(0),
- seqid(0), osddata(0), m_palette(NULL)
- {}
+ render_texinfo()
+ : base(NULL), rowpixels(0), width(0), height(0),
+ seqid(0), osddata(0), m_palette(NULL)
+ {}
- render_texinfo(const render_texinfo &src);
+ render_texinfo(const render_texinfo &src);
- ~render_texinfo()
- {
- free_palette();
- }
+ ~render_texinfo()
+ {
+ free_palette();
+ }
- render_texinfo &operator=(const render_texinfo &src);
+ render_texinfo &operator=(const render_texinfo &src);
void * base; // base of the data
UINT32 rowpixels; // pixels per row
@@ -241,14 +241,14 @@ public:
UINT32 seqid; // sequence ID
UINT64 osddata; // aux data to pass to osd
- const rgb_t * palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
+ const rgb_t * palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
- void set_palette(const dynamic_array<rgb_t> *source);
+ void set_palette(const dynamic_array<rgb_t> *source);
private:
- void free_palette();
+ void free_palette();
- render_palette_copy *m_palette; // palette for PALETTE16 textures, LUTs for RGB15/RGB32
+ render_palette_copy *m_palette; // palette for PALETTE16 textures, LUTs for RGB15/RGB32
};
diff --git a/src/emu/rendfont.c b/src/emu/rendfont.c
index 2ff22ea04e6..7baf4db606a 100644
--- a/src/emu/rendfont.c
+++ b/src/emu/rendfont.c
@@ -92,14 +92,14 @@ render_font::render_font(render_manager &manager, const char *filename)
m_osdfont = manager.machine().osd().font_alloc();
if (m_osdfont != NULL)
{
- if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
- {
- m_scale = 1.0f / (float)m_height;
- m_format = FF_OSD;
- return;
- }
- global_free(m_osdfont);
- m_osdfont = NULL;
+ if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
+ {
+ m_scale = 1.0f / (float)m_height;
+ m_format = FF_OSD;
+ return;
+ }
+ global_free(m_osdfont);
+ m_osdfont = NULL;
}
}
@@ -136,8 +136,8 @@ render_font::~render_font()
// release the OSD font
if (m_osdfont != NULL)
{
- m_osdfont->close();
- global_free(m_osdfont);
+ m_osdfont->close();
+ global_free(m_osdfont);
}
}
diff --git a/src/emu/sound/qs1000.c b/src/emu/sound/qs1000.c
index 374225dc4c1..7da3b82b3d2 100644
--- a/src/emu/sound/qs1000.c
+++ b/src/emu/sound/qs1000.c
@@ -246,7 +246,7 @@ void qs1000_device::device_start()
save_item(NAME(m_serial_data_in));
save_item(NAME(m_wave_regs));
-
+
for (int i = 0; i < QS1000_CHANNELS; i++)
{
save_item(NAME(m_channels[i].m_acc), i);
diff --git a/src/emu/sound/tiasound.c b/src/emu/sound/tiasound.c
index e5934767536..66e7ec6a82f 100644
--- a/src/emu/sound/tiasound.c
+++ b/src/emu/sound/tiasound.c
@@ -597,7 +597,7 @@ void *tia_sound_init(device_t *device, int clock, int sample_rate, int gain)
chip->P5[chan] = 0;
chip->P9[chan] = 0;
}
-
+
tia_save_state(device, chip);
return chip;
diff --git a/src/emu/ui/barcode.c b/src/emu/ui/barcode.c
index c7cdd730ad0..3b9f429c8db 100644
--- a/src/emu/ui/barcode.c
+++ b/src/emu/ui/barcode.c
@@ -20,9 +20,9 @@
/**************************************************
-
+
BARCODE READER MENU
-
+
**************************************************/
@@ -51,7 +51,7 @@ ui_menu_barcode_reader::~ui_menu_barcode_reader()
void ui_menu_barcode_reader::populate()
{
if (current_device())
- {
+ {
astring buffer;
const char *new_barcode;
@@ -68,13 +68,13 @@ void ui_menu_barcode_reader::populate()
{
new_barcode = m_barcode_buffer;
}
-
+
item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE);
-
+
// finish up the menu
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
item_append("Enter Code", NULL, 0, ITEMREF_ENTER_BARCODE);
-
+
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
}
@@ -103,7 +103,7 @@ void ui_menu_barcode_reader::handle()
if (event->itemref == ITEMREF_SELECT_READER)
previous();
break;
-
+
case IPT_UI_RIGHT:
if (event->itemref == ITEMREF_SELECT_READER)
next();
diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h
index ec6dafc7b9e..81fe091315b 100644
--- a/src/emu/ui/devctrl.h
+++ b/src/emu/ui/devctrl.h
@@ -9,9 +9,9 @@
printers)
The base class contains calls to get the total number of devices of
the same kind connected to the driver, and shortcuts to switch current
- device to next one or previous one attached. This allows, for instance,
- users to pass from a device to another one by simply pressing left/right
- and the menu is rebuilt accordingly, without the need of a preliminary
+ device to next one or previous one attached. This allows, for instance,
+ users to pass from a device to another one by simply pressing left/right
+ and the menu is rebuilt accordingly, without the need of a preliminary
submenu listing available devices of the same kind.
Copyright Nicola Salmoria and the MAME Team.
diff --git a/src/emu/ui/devopt.c b/src/emu/ui/devopt.c
index e05e4070512..3256ae030a3 100644
--- a/src/emu/ui/devopt.c
+++ b/src/emu/ui/devopt.c
@@ -66,7 +66,7 @@ void ui_menu_device_config::populate()
// get cpu specific clock that takes internal multiplier/dividers into account
int clock = exec->device().clock();
-
+
// count how many identical CPUs we have
int count = 1;
const char *name = exec->device().name();
@@ -77,14 +77,14 @@ void ui_menu_device_config::populate()
if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
count++;
}
-
+
// if more than one, prepend a #x in front of the CPU name
if (count > 1)
string.catprintf(" %d" UTF8_MULTIPLY, count);
else
string.cat(" ");
string.cat(name);
-
+
// display clock in kHz or MHz
if (clock >= 1000000)
string.catprintf(" %d.%06d" UTF8_NBSP "MHz\n", clock / 1000000, clock % 1000000);
@@ -92,7 +92,7 @@ void ui_menu_device_config::populate()
string.catprintf(" %d.%03d" UTF8_NBSP "kHz\n", clock / 1000, clock % 1000);
}
}
-
+
// display screen information
screen_device_iterator scriter(*dev);
if (scriter.count() > 0)
@@ -101,21 +101,21 @@ void ui_menu_device_config::populate()
for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
{
string.catprintf(" Screen '%s': ", screen->tag());
-
+
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
string.cat("Vector\n");
else
{
const rectangle &visarea = screen->visible_area();
-
+
string.catprintf("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz\n",
- visarea.width(), visarea.height(),
- (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H",
- ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds));
+ visarea.width(), visarea.height(),
+ (machine().system().flags & ORIENTATION_SWAP_XY) ? "V" : "H",
+ ATTOSECONDS_TO_HZ(screen->frame_period().attoseconds));
}
}
}
-
+
// loop over all sound chips
sound_interface_iterator snditer(*dev);
if (snditer.count() > 0)
@@ -126,7 +126,7 @@ void ui_menu_device_config::populate()
{
if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
-
+
// count how many identical sound chips we have
int count = 1;
sound_interface_iterator sndinneriter(*dev);
@@ -142,7 +142,7 @@ void ui_menu_device_config::populate()
else
string.cat(" ");
string.cat(sound->device().name());
-
+
// display clock in kHz or MHz
int clock = sound->device().clock();
if (clock >= 1000000)
@@ -156,7 +156,7 @@ void ui_menu_device_config::populate()
// scan for BIOS settings
int bios = 0;
- if (dev->rom_region())
+ if (dev->rom_region())
{
astring bios_str;
// first loop through roms in search of default bios (shortname)
@@ -174,11 +174,11 @@ void ui_menu_device_config::populate()
bios_str.cpy(ROM_GETHASHDATA(rom));
}
}
-
+
if (bios)
string.catprintf("* BIOS settings:\n %d options [default: %s]\n", bios, bios_str.cstr());
}
-
+
int input = 0, input_mj = 0, input_hana = 0, input_gamble = 0, input_analog = 0, input_adjust = 0;
int input_keypad = 0, input_keyboard = 0, dips = 0, confs = 0;
astring errors, dips_opt, confs_opt;
@@ -265,7 +265,7 @@ void ui_menu_device_config::populate()
for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next())
string.catprintf(" %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag());
}
-
+
slot_interface_iterator slotiter(*dev);
if (slotiter.count() > 0)
{
@@ -275,7 +275,7 @@ void ui_menu_device_config::populate()
}
if ((execiter.count() + scriter.count() + snditer.count() + imgiter.count() + slotiter.count() + bios + dips + confs
- + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0)
+ + input + input_mj + input_hana + input_gamble + input_analog + input_adjust + input_keypad + input_keyboard) == 0)
string.cat("[None]\n");
const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name());
diff --git a/src/emu/ui/devopt.h b/src/emu/ui/devopt.h
index 2640d358460..2319acbaeb1 100644
--- a/src/emu/ui/devopt.h
+++ b/src/emu/ui/devopt.h
@@ -1,9 +1,9 @@
/***************************************************************************
ui/devopt.h
-
+
Internal menu for the device configuration.
-
+
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c
index 63fe69d4274..2c4097f96b9 100644
--- a/src/emu/ui/filemngr.c
+++ b/src/emu/ui/filemngr.c
@@ -64,12 +64,12 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, astring
{
// get the image type/id
instance.printf("%s (%s)", img->instance_name(), img->brief_instance_name());
-
+
// get the base name
if (img->basename() != NULL)
{
filename.cpy(img->basename());
-
+
// if the image has been loaded through softlist, also show the loaded part
if (img->part_entry() != NULL)
{
@@ -107,7 +107,7 @@ void ui_menu_file_manager::populate()
item_append(m_warnings, NULL, MENU_FLAG_DISABLE, NULL);
item_append("", NULL, MENU_FLAG_DISABLE, NULL);
}
-
+
// cycle through all devices for this system
device_iterator iter(machine().root_device());
tagmap_t<UINT8> devtags;
@@ -120,7 +120,7 @@ void ui_menu_file_manager::populate()
// check whether it owns an image interface
image_interface_iterator subiter(*dev);
if (subiter.count() > 0)
- {
+ {
// if so, cycle through all its image interfaces
image_interface_iterator subiter(*dev);
for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next())
@@ -172,7 +172,7 @@ void ui_menu_file_manager::handle()
if (selected_device != NULL)
{
ui_menu::stack_push(selected_device->get_selection_menu(machine(), container));
-
+
// reset the existing menu
reset(UI_MENU_RESET_REMEMBER_POSITION);
}
@@ -182,19 +182,19 @@ void ui_menu_file_manager::handle()
// force file manager menu
void ui_menu_file_manager::force_file_manager(running_machine &machine, render_container *container, const char *warnings)
-{
+{
// reset the menu stack
ui_menu::stack_reset(machine);
-
+
// add the quit entry followed by the game select entry
ui_menu *quit = auto_alloc_clear(machine, ui_menu_quit_game(machine, container));
quit->set_special_main_menu(true);
ui_menu::stack_push(quit);
ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_file_manager(machine, container, warnings)));
-
+
// force the menus on
machine.ui().show_menu();
-
+
// make sure MAME is paused
machine.pause();
}
diff --git a/src/emu/ui/imgcntrl.c b/src/emu/ui/imgcntrl.c
index 645687e595a..21d14b9a59a 100644
--- a/src/emu/ui/imgcntrl.c
+++ b/src/emu/ui/imgcntrl.c
@@ -328,7 +328,7 @@ void ui_menu_control_device_image::handle()
state = create_ok ? CREATE_FILE : START_FILE;
handle();
break;
-
+
case DO_CREATE: {
astring path;
zippath_combine(path, current_directory, current_file);
diff --git a/src/emu/ui/imgcntrl.h b/src/emu/ui/imgcntrl.h
index 3b6f4d111f4..62912ce6922 100644
--- a/src/emu/ui/imgcntrl.h
+++ b/src/emu/ui/imgcntrl.h
@@ -27,8 +27,8 @@ public:
protected:
enum {
- START_FILE, START_OTHER_PART, START_SOFTLIST,
- SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART,
+ START_FILE, START_OTHER_PART, START_SOFTLIST,
+ SELECT_PARTLIST, SELECT_ONE_PART, SELECT_OTHER_PART,
SELECT_FILE, CREATE_FILE, CREATE_CONFIRM, CHECK_CREATE, DO_CREATE, SELECT_SOFTLIST,
LAST_ID
};
diff --git a/src/emu/ui/info.c b/src/emu/ui/info.c
index ea91914e64a..ba4fa24977a 100644
--- a/src/emu/ui/info.c
+++ b/src/emu/ui/info.c
@@ -89,21 +89,21 @@ void ui_menu_image_info::image_info(device_image_interface *image)
// display long filename
item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL);
-
+
// display manufacturer and year
string.catprintf("%s, %s", image->manufacturer(), image->year());
item_append(string, "", MENU_FLAG_DISABLE, NULL);
// display supported information, if available
- switch (image->supported())
+ switch (image->supported())
{
- case SOFTWARE_SUPPORTED_NO:
+ case SOFTWARE_SUPPORTED_NO:
item_append("Not supported", "", MENU_FLAG_DISABLE, NULL);
break;
- case SOFTWARE_SUPPORTED_PARTIAL:
+ case SOFTWARE_SUPPORTED_PARTIAL:
item_append("Partially supported", "", MENU_FLAG_DISABLE, NULL);
break;
- default:
+ default:
break;
}
}
diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c
index 7f3b7942691..4150bfc9649 100644
--- a/src/emu/ui/inputmap.c
+++ b/src/emu/ui/inputmap.c
@@ -487,7 +487,7 @@ void ui_menu_settings::handle()
if (menu_event != NULL && menu_event->itemref != NULL)
{
// reset
- if ((FPTR)menu_event->itemref == 1)
+ if ((FPTR)menu_event->itemref == 1)
{
if (menu_event->iptkey == IPT_UI_SELECT)
machine().schedule_hard_reset();
@@ -498,7 +498,7 @@ void ui_menu_settings::handle()
ioport_field *field = (ioport_field *)menu_event->itemref;
ioport_field::user_settings settings;
int changed = false;
-
+
switch (menu_event->iptkey)
{
/* if selected, reset to default value */
@@ -508,20 +508,20 @@ void ui_menu_settings::handle()
field->set_user_settings(settings);
changed = true;
break;
-
+
/* left goes to previous setting */
case IPT_UI_LEFT:
field->select_previous_setting();
changed = true;
break;
-
+
/* right goes to next setting */
case IPT_UI_RIGHT:
field->select_next_setting();
changed = true;
break;
}
-
+
/* if anything changed, rebuild the menu, trying to stay on the same field */
if (changed)
reset(UI_MENU_RESET_REMEMBER_REF);
@@ -628,7 +628,7 @@ void ui_menu_settings::populate()
}
if (type == IPT_DIPSWITCH)
custombottom = dipcount ? dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING : 0;
-
+
item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
item_append("Reset", NULL, 0, (void *)1);
}
@@ -661,18 +661,18 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top,
{
const ioport_diplocation *diploc;
UINT32 selectedmask = 0;
-
+
// determine the mask of selected bits
if ((FPTR)selectedref != 1)
{
ioport_field *field = (ioport_field *)selectedref;
-
+
if (field != NULL && field->first_diplocation() != NULL)
for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next())
if (strcmp(dip->name, diploc->name()) == 0)
selectedmask |= 1 << (diploc->number() - 1);
}
-
+
// draw one switch
custom_render_one(x1, y1, x2, y1 + DIP_SWITCH_HEIGHT, dip, selectedmask);
y1 += (float)(DIP_SWITCH_SPACING + DIP_SWITCH_HEIGHT);
@@ -884,7 +884,7 @@ void ui_menu_analog::populate()
}
name.cpy(field->name());
-
+
/* allocate a data item for tracking what this menu item refers to */
data = (analog_item_data *)m_pool_alloc(sizeof(*data));
data->field = field;
diff --git a/src/emu/ui/sliders.c b/src/emu/ui/sliders.c
index db2d7c28fb5..5f3e6c9a717 100644
--- a/src/emu/ui/sliders.c
+++ b/src/emu/ui/sliders.c
@@ -242,18 +242,18 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom,
UINT32 ui_menu_sliders::ui_handler(running_machine &machine, render_container *container, UINT32 state)
{
UINT32 result;
-
+
/* if this is the first call, push the sliders menu */
if (state)
ui_menu::stack_push(auto_alloc_clear(machine, ui_menu_sliders(machine, container, true)));
-
+
/* handle standard menus */
result = ui_menu::ui_handler(machine, container, state);
-
+
/* if we are cancelled, pop the sliders menu */
if (result == UI_HANDLER_CANCEL)
ui_menu::stack_pop(machine);
-
+
ui_menu_sliders *uim = dynamic_cast<ui_menu_sliders *>(menu_stack);
return uim && uim->menuless_mode ? 0 : UI_HANDLER_CANCEL;
}
diff --git a/src/emu/ui/slotopt.h b/src/emu/ui/slotopt.h
index 9f73e608fdd..a3c4514f06b 100644
--- a/src/emu/ui/slotopt.h
+++ b/src/emu/ui/slotopt.h
@@ -1,9 +1,9 @@
/***************************************************************************
ui/slotopt.h
-
+
Internal menu for the slot options.
-
+
Copyright Nicola Salmoria and the MAME Team.
Visit http://mamedev.org for licensing and usage restrictions.
diff --git a/src/emu/ui/tapectrl.c b/src/emu/ui/tapectrl.c
index df4ca3bf11f..2b27278da26 100644
--- a/src/emu/ui/tapectrl.c
+++ b/src/emu/ui/tapectrl.c
@@ -56,7 +56,7 @@ ui_menu_tape_control::~ui_menu_tape_control()
void ui_menu_tape_control::populate()
{
if (current_device())
- {
+ {
// name of tape
item_append(current_display_name(), current_device()->exists() ? current_device()->filename() : "No Tape Image loaded", current_display_flags(), TAPECMD_SELECT);
@@ -67,7 +67,7 @@ void ui_menu_tape_control::populate()
double t0 = current_device()->get_position();
double t1 = current_device()->get_length();
UINT32 tapeflags = 0;
-
+
// state
if (t1 > 0)
{
@@ -76,32 +76,32 @@ void ui_menu_tape_control::populate()
if (t0 < t1)
tapeflags |= MENU_FLAG_RIGHT_ARROW;
}
-
+
get_time_string(timepos, current_device(), NULL, NULL);
state = current_device()->get_state();
item_append(
(state & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED
? "stopped"
: ((state & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY
- ? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)")
- : ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)")
- ),
+ ? ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "playing" : "(playing)")
+ : ((state & CASSETTE_MASK_MOTOR) == CASSETTE_MOTOR_ENABLED ? "recording" : "(recording)")
+ ),
timepos,
tapeflags,
TAPECMD_SLIDER);
-
+
// pause or stop
item_append("Pause/Stop", NULL, 0, TAPECMD_STOP);
-
+
// play
item_append("Play", NULL, 0, TAPECMD_PLAY);
-
+
// record
item_append("Record", NULL, 0, TAPECMD_RECORD);
-
+
// rewind
item_append("Rewind", NULL, 0, TAPECMD_REWIND);
-
+
// fast forward
item_append("Fast Forward", NULL, 0, TAPECMD_FAST_FORWARD);
}
diff --git a/src/emu/video/h63484.c b/src/emu/video/h63484.c
index 34a0258974e..dab98ed77a2 100644
--- a/src/emu/video/h63484.c
+++ b/src/emu/video/h63484.c
@@ -2001,7 +2001,7 @@ WRITE8_MEMBER( h63484_device::data_w )
void h63484_device::device_start()
{
m_display_cb.bind_relative_to(*owner());
-
+
register_save_state();
}
diff --git a/src/emu/video/h63484.h b/src/emu/video/h63484.h
index 97429d1dd20..c5b7359e4ae 100644
--- a/src/emu/video/h63484.h
+++ b/src/emu/video/h63484.h
@@ -107,7 +107,7 @@ private:
void video_registers_w(int offset);
int translate_command(UINT16 data);
void draw_graphics_line(bitmap_ind16 &bitmap, const rectangle &cliprect, int vs, int y, int layer_n, bool active, bool ins_window);
-
+
void register_save_state();
h63484_display_delegate m_display_cb;
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 55faa0fde0c..c441aabb147 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -100,12 +100,12 @@ public:
void resize_keep_and_clear_new(int count, UINT8 data = 0) { int oldcount = m_count; resize_keep(count); if (oldcount < m_count) clear_internal(oldcount, m_count - oldcount, data); }
// batch operations
- void copyfrom(const dynamic_array<_ElementType> &source)
- {
- resize(source.count());
- for (int i=0; i < source.count(); i++)
- m_array[i] = source[i];
- }
+ void copyfrom(const dynamic_array<_ElementType> &source)
+ {
+ resize(source.count());
+ for (int i=0; i < source.count(); i++)
+ m_array[i] = source[i];
+ }
private:
// internal helpers
diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h
index 0992655ee3c..23d11416053 100644
--- a/src/lib/util/palette.h
+++ b/src/lib/util/palette.h
@@ -171,7 +171,7 @@ public:
// entry list getters
const rgb_t *entry_list_raw() const { return m_entry_color; }
const dynamic_array<rgb_t> *entry_list_adjusted_darray() const { return &m_adjusted_color; }
- const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
+ const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; }
// group adjustments
diff --git a/src/mame/audio/mario.c b/src/mame/audio/mario.c
index 32b4497bfd4..28afa60ede3 100644
--- a/src/mame/audio/mario.c
+++ b/src/mame/audio/mario.c
@@ -46,47 +46,47 @@
/* ---------------------------------------------------------------------- */
static NETLIST_START(nl_mario_snd0)
- RES(R17, RES_K(27)) /* 20 according to parts list */
- /* 27 verified, 30K in schematics */
- CAP(C14, CAP_U(4.7)) /* verified */
-
- TTL_74123(2H_A)
- NET_C(2H_A.VCC, V5)
- NET_C(2H_A.GND, GND)
- NET_C(SOUND0.Q, 2H_A.B)
- NET_C(GND, 2H_A.A)
- NET_C(2H_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
- DIODE(D1, "1N4148") /* FIXME: try to identify */
- TTL_7404_INVERT(1H_A, 2H_A.QQ)
- NET_C(R17.1, V5)
- NET_C(R17.2, D1.A, C14.1)
- NET_C(D1.K, 2H_A.RC)
- NET_C(C14.2, 2H_A.C)
-
- RES(R6, RES_K(4.7)) /* verified */
- CAP(C3, CAP_U(10)) /* verified */
-
- NET_C(1H_A.Q, R6.1)
- NET_C(R6.2, C3.1, 1J_A.FC)
- NET_C(R6.2, 2J_A.FC)
- NET_C(C3.2, GND)
-
- //#define MR_C6 CAP_N(3.9) /* verified */
-
- SN74LS629(1J_A, CAP_N(3.9))
- NET_C(1J_A.RNG, V5)
- NET_C(1J_A.ENQ, ttllow)
- NET_C(GND, 1J_A.GND)
-
- //#define MR_C17 CAP_N(22) /* verified */
-
- SN74LS629(2J_A, CAP_N(22))
- NET_C(2J_A.RNG, V5)
- NET_C(2J_A.ENQ, ttllow)
- NET_C(GND, 2J_A.GND)
-
- TTL_7486_XOR(1K_A, 1J_A.Y, 2J_A.Y)
- TTL_7408_AND(2K_A, 2H_A.Q, 1K_A)
+ RES(R17, RES_K(27)) /* 20 according to parts list */
+ /* 27 verified, 30K in schematics */
+ CAP(C14, CAP_U(4.7)) /* verified */
+
+ TTL_74123(2H_A)
+ NET_C(2H_A.VCC, V5)
+ NET_C(2H_A.GND, GND)
+ NET_C(SOUND0.Q, 2H_A.B)
+ NET_C(GND, 2H_A.A)
+ NET_C(2H_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
+ DIODE(D1, "1N4148") /* FIXME: try to identify */
+ TTL_7404_INVERT(1H_A, 2H_A.QQ)
+ NET_C(R17.1, V5)
+ NET_C(R17.2, D1.A, C14.1)
+ NET_C(D1.K, 2H_A.RC)
+ NET_C(C14.2, 2H_A.C)
+
+ RES(R6, RES_K(4.7)) /* verified */
+ CAP(C3, CAP_U(10)) /* verified */
+
+ NET_C(1H_A.Q, R6.1)
+ NET_C(R6.2, C3.1, 1J_A.FC)
+ NET_C(R6.2, 2J_A.FC)
+ NET_C(C3.2, GND)
+
+ //#define MR_C6 CAP_N(3.9) /* verified */
+
+ SN74LS629(1J_A, CAP_N(3.9))
+ NET_C(1J_A.RNG, V5)
+ NET_C(1J_A.ENQ, ttllow)
+ NET_C(GND, 1J_A.GND)
+
+ //#define MR_C17 CAP_N(22) /* verified */
+
+ SN74LS629(2J_A, CAP_N(22))
+ NET_C(2J_A.RNG, V5)
+ NET_C(2J_A.ENQ, ttllow)
+ NET_C(GND, 2J_A.GND)
+
+ TTL_7486_XOR(1K_A, 1J_A.Y, 2J_A.Y)
+ TTL_7408_AND(2K_A, 2H_A.Q, 1K_A)
NETLIST_END()
/* ---------------------------------------------------------------------- */
@@ -96,49 +96,49 @@ NETLIST_END()
// FIXME: Diodes are 1S953
static NETLIST_START(nl_mario_snd7)
- RES(R61, RES_K(47))
- CAP(C41, CAP_U(4.7)) /* verified */
-
- TTL_74123(4L_A)
- NET_C(4L_A.VCC, V5)
- NET_C(4L_A.GND, GND)
- NET_C(SOUND7.Q, 4L_A.B)
- NET_C(GND, 4L_A.A)
- NET_C(4L_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
- DIODE(D10, "1N4148") /* FIXME: try to identify */
- TTL_7404_INVERT(4J_A, 4L_A.Q)
- NET_C(R61.1, V5)
- NET_C(R61.2, D10.A, C41.1)
- NET_C(D10.K, 4L_A.RC)
- NET_C(C41.2, 4L_A.C)
-
- RES(R65, RES_K(10))
- CAP(C44, CAP_U(3.3)) /* verified */
-
- SN74LS629(4K_A, CAP_U(0.022))
- NET_C(4K_A.RNG, V5)
- NET_C(4K_A.ENQ, ttllow)
- NET_C(GND, 4K_A.GND)
- NET_C(R65.1, 4J_A.Q)
- NET_C(R65.2, 4K_A.FC, C44.1)
- NET_C(C44.2, GND)
-
- CD_4020(3H, 4K_B.Y, ttllow, V5, GND)
- TTL_7404_INVERT(4J_B, 3H.Q12)
-
- RES(R64, RES_K(20))
- CAP(C43, CAP_U(3.3)) /* verified */
-
- SN74LS629(4K_B, CAP_U(0.0047))
- NET_C(4K_B.RNG, V5)
- NET_C(4K_B.ENQ, ttllow)
- NET_C(GND, 4K_B.GND)
- NET_C(R64.1, 4J_B.Q)
- NET_C(R64.2, 4K_B.FC, C43.1)
- NET_C(C43.2, GND)
-
- TTL_7486_XOR(1K_C, 3H.Q4, 4K_A.Y)
- TTL_7408_AND(2K_C, 4L_A.Q, 1K_C)
+ RES(R61, RES_K(47))
+ CAP(C41, CAP_U(4.7)) /* verified */
+
+ TTL_74123(4L_A)
+ NET_C(4L_A.VCC, V5)
+ NET_C(4L_A.GND, GND)
+ NET_C(SOUND7.Q, 4L_A.B)
+ NET_C(GND, 4L_A.A)
+ NET_C(4L_A.CLRQ, ttlhigh) /* NOT IN SCHEMATICS */
+ DIODE(D10, "1N4148") /* FIXME: try to identify */
+ TTL_7404_INVERT(4J_A, 4L_A.Q)
+ NET_C(R61.1, V5)
+ NET_C(R61.2, D10.A, C41.1)
+ NET_C(D10.K, 4L_A.RC)
+ NET_C(C41.2, 4L_A.C)
+
+ RES(R65, RES_K(10))
+ CAP(C44, CAP_U(3.3)) /* verified */
+
+ SN74LS629(4K_A, CAP_U(0.022))
+ NET_C(4K_A.RNG, V5)
+ NET_C(4K_A.ENQ, ttllow)
+ NET_C(GND, 4K_A.GND)
+ NET_C(R65.1, 4J_A.Q)
+ NET_C(R65.2, 4K_A.FC, C44.1)
+ NET_C(C44.2, GND)
+
+ CD_4020(3H, 4K_B.Y, ttllow, V5, GND)
+ TTL_7404_INVERT(4J_B, 3H.Q12)
+
+ RES(R64, RES_K(20))
+ CAP(C43, CAP_U(3.3)) /* verified */
+
+ SN74LS629(4K_B, CAP_U(0.0047))
+ NET_C(4K_B.RNG, V5)
+ NET_C(4K_B.ENQ, ttllow)
+ NET_C(GND, 4K_B.GND)
+ NET_C(R64.1, 4J_B.Q)
+ NET_C(R64.2, 4K_B.FC, C43.1)
+ NET_C(C43.2, GND)
+
+ TTL_7486_XOR(1K_C, 3H.Q4, 4K_A.Y)
+ TTL_7408_AND(2K_C, 4L_A.Q, 1K_C)
NETLIST_END()
@@ -146,140 +146,140 @@ NETLIST_END()
/* DAC sound */
/* ---------------------------------------------------------------------- */
static NETLIST_START(nl_mario_dac)
- RES(R34, RES_M(2))
- RES(R35, RES_M(1))
- RES(R36, RES_M(1.8))
- LM3900(3M_1)
- NET_C(3M_1.VM, GND)
- NET_C(3M_1.VP, V5)
-
- NET_C(DAC.VOUT, R34.1)
- NET_C(3M_1.MINUS, R34.2, R35.2)
- NET_C(3M_1.OUT, R35.1)
- NET_C(3M_1.PLUS, R36.1)
- NET_C(R36.2, GND)
-
- RES(R21, RES_M(1.8))
- RES(R23, RES_K(10))
- RES(R25, RES_K(10))
- RES(R37, RES_K(750))
- RES(R38, RES_K(360))
- RES(R39, RES_K(750))
-
- CAP(C18, CAP_P(100))
- CAP(C19, CAP_U(10))
- CAP(C20, CAP_U(1))
- CAP(C30, CAP_P(100))
-
- LM3900(3M_2)
- NET_C(3M_2.VM, GND)
- NET_C(3M_2.VP, V5)
-
- NET_C(R35.1, C20.1)
- NET_C(C20.2, R37.1)
- NET_C(R37.2, R38.2, C18.1, R39.2)
-
- NET_C(C18.2, GND)
- NET_C(R38.1, C30.2, 3M_2.MINUS)
- NET_C(3M_2.OUT, R39.1, C30.1)
-
- NET_C(R21.1, 3M_2.PLUS)
- NET_C(R21.2, C19.1, R25.2, R23.1)
- NET_C(C19.2, R23.2, GND)
- NET_C(R25.1, V5)
+ RES(R34, RES_M(2))
+ RES(R35, RES_M(1))
+ RES(R36, RES_M(1.8))
+ LM3900(3M_1)
+ NET_C(3M_1.VM, GND)
+ NET_C(3M_1.VP, V5)
+
+ NET_C(DAC.VOUT, R34.1)
+ NET_C(3M_1.MINUS, R34.2, R35.2)
+ NET_C(3M_1.OUT, R35.1)
+ NET_C(3M_1.PLUS, R36.1)
+ NET_C(R36.2, GND)
+
+ RES(R21, RES_M(1.8))
+ RES(R23, RES_K(10))
+ RES(R25, RES_K(10))
+ RES(R37, RES_K(750))
+ RES(R38, RES_K(360))
+ RES(R39, RES_K(750))
+
+ CAP(C18, CAP_P(100))
+ CAP(C19, CAP_U(10))
+ CAP(C20, CAP_U(1))
+ CAP(C30, CAP_P(100))
+
+ LM3900(3M_2)
+ NET_C(3M_2.VM, GND)
+ NET_C(3M_2.VP, V5)
+
+ NET_C(R35.1, C20.1)
+ NET_C(C20.2, R37.1)
+ NET_C(R37.2, R38.2, C18.1, R39.2)
+
+ NET_C(C18.2, GND)
+ NET_C(R38.1, C30.2, 3M_2.MINUS)
+ NET_C(3M_2.OUT, R39.1, C30.1)
+
+ NET_C(R21.1, 3M_2.PLUS)
+ NET_C(R21.2, C19.1, R25.2, R23.1)
+ NET_C(C19.2, R23.2, GND)
+ NET_C(R25.1, V5)
NETLIST_END()
static NETLIST_START(nl_mario)
- /* Standard stuff */
+ /* Standard stuff */
- SOLVER(Solver, 48000)
- PARAM(Solver.ACCURACY, 1e-8)
- PARAM(Solver.SOR_FACTOR, 1.0)
- PARAM(Solver.GS_THRESHOLD, 5)
- PARAM(Solver.GS_LOOPS, 4)
- //PARAM(Solver.LTE, 5e-2) // Default is not enough for paddle control
- PARAM(Solver.DYNAMIC_TS, 0)
- ANALOG_INPUT(V5, 5)
+ SOLVER(Solver, 48000)
+ PARAM(Solver.ACCURACY, 1e-8)
+ PARAM(Solver.SOR_FACTOR, 1.0)
+ PARAM(Solver.GS_THRESHOLD, 5)
+ PARAM(Solver.GS_LOOPS, 4)
+ //PARAM(Solver.LTE, 5e-2) // Default is not enough for paddle control
+ PARAM(Solver.DYNAMIC_TS, 0)
+ ANALOG_INPUT(V5, 5)
- TTL_INPUT(SOUND0, 1)
- INCLUDE(nl_mario_snd0)
+ TTL_INPUT(SOUND0, 1)
+ INCLUDE(nl_mario_snd0)
- TTL_INPUT(SOUND7, 1)
- INCLUDE(nl_mario_snd7)
+ TTL_INPUT(SOUND7, 1)
+ INCLUDE(nl_mario_snd7)
- R2R_DAC(DAC, 3.4, 10000.0, 8)
- NET_C(DAC.VGND, GND)
+ R2R_DAC(DAC, 3.4, 10000.0, 8)
+ NET_C(DAC.VGND, GND)
- INCLUDE(nl_mario_dac)
+ INCLUDE(nl_mario_dac)
- /* ---------------------------------------------------------------------- */
- /* mixing */
- /* ---------------------------------------------------------------------- */
+ /* ---------------------------------------------------------------------- */
+ /* mixing */
+ /* ---------------------------------------------------------------------- */
- RES(R20, RES_K(22)) /* verified */
- RES(R19, RES_K(22)) /* verified */
- RES(R40, RES_K(22)) /* verified */
- RES(R41, RES_K(100)) /* verified */
- CAP(C31, CAP_U(0.022)) /* */
+ RES(R20, RES_K(22)) /* verified */
+ RES(R19, RES_K(22)) /* verified */
+ RES(R40, RES_K(22)) /* verified */
+ RES(R41, RES_K(100)) /* verified */
+ CAP(C31, CAP_U(0.022)) /* */
- NET_C(2K_A.Q, R20.1)
- NET_C(GND, R19.1) //FIXME
- NET_C(2K_C.Q, R41.1)
+ NET_C(2K_A.Q, R20.1)
+ NET_C(GND, R19.1) //FIXME
+ NET_C(2K_C.Q, R41.1)
#if 1
- RES(DUM, RES_K(22))
- NET_C(R39.1, DUM.1)
- NET_C(DUM.2, GND)
- FRONTIER(front1, R39.1, R40.1)
+ RES(DUM, RES_K(22))
+ NET_C(R39.1, DUM.1)
+ NET_C(DUM.2, GND)
+ FRONTIER(front1, R39.1, R40.1)
#else
- NET_C(R39.1, R40.1)
+ NET_C(R39.1, R40.1)
#endif
- NET_C(R20.2, R19.2, R40.2, R41.2, C31.1)
- NET_C(C31.2, GND)
+ NET_C(R20.2, R19.2, R40.2, R41.2, C31.1)
+ NET_C(C31.2, GND)
- CAP(C32, CAP_U(1)) /* verified */
- RES(R42, RES_K(43)) /* verified */
- RES(R43, RES_K(100)) /* verified */
+ CAP(C32, CAP_U(1)) /* verified */
+ RES(R42, RES_K(43)) /* verified */
+ RES(R43, RES_K(100)) /* verified */
- NET_C(C31.1, C32.1)
- NET_C(C32.2, R42.1, R43.2, Q10.B)
- //NET_C(C32.2, R42.1, R43.2)
- NET_C(R43.1, V5)
- NET_C(R42.2, GND)
+ NET_C(C31.1, C32.1)
+ NET_C(C32.2, R42.1, R43.2, Q10.B)
+ //NET_C(C32.2, R42.1, R43.2)
+ NET_C(R43.1, V5)
+ NET_C(R42.2, GND)
#if 1
- RES(R63, RES_K(1)) /* */
- RES(R62, 150) /* */
+ RES(R63, RES_K(1)) /* */
+ RES(R62, 150) /* */
- QBJT_EB(Q10, "2SC1815")
+ QBJT_EB(Q10, "2SC1815")
- NET_C(R62.2, GND)
- NET_C(R62.1, Q10.E)
+ NET_C(R62.2, GND)
+ NET_C(R62.1, Q10.E)
- NET_C(R63.1, V5)
- NET_C(R63.2, Q10.C)
+ NET_C(R63.1, V5)
+ NET_C(R63.2, Q10.C)
- CAP(C42, CAP_U(0.1))
- CAP(C47, CAP_U(4.7))
- RES(VR1, RES_K(10))
+ CAP(C42, CAP_U(0.1))
+ CAP(C47, CAP_U(4.7))
+ RES(VR1, RES_K(10))
- NET_C(C42.1, C47.1, R62.1)
- NET_C(C42.2, GND)
- NET_C(C47.2, VR1.1)
- NET_C(VR1.2, GND)
+ NET_C(C42.1, C47.1, R62.1)
+ NET_C(C42.2, GND)
+ NET_C(C47.2, VR1.1)
+ NET_C(VR1.2, GND)
#endif
- /* ---------------------------------------------------------------------- */
- /* Output */
- /* ---------------------------------------------------------------------- */
+ /* ---------------------------------------------------------------------- */
+ /* Output */
+ /* ---------------------------------------------------------------------- */
- RES(ROUT, 1000000)
+ RES(ROUT, 1000000)
- //NET_C(Q10.C, ROUT.1)
- //NET_C(R43.2, ROUT.1)
- NET_C(VR1.1, ROUT.1)
+ //NET_C(Q10.C, ROUT.1)
+ //NET_C(R43.2, ROUT.1)
+ NET_C(VR1.1, ROUT.1)
- NET_C(GND, ROUT.2)
+ NET_C(GND, ROUT.2)
NETLIST_END()
@@ -790,7 +790,7 @@ WRITE8_MEMBER(mario_state::mario_sh1_w)
#if OLD_SOUND
m_discrete->write(space, DS_SOUND0_INP, 0);
#else
- m_audio_snd0->write(data);
+ m_audio_snd0->write(data);
#endif
}
@@ -835,7 +835,7 @@ WRITE8_MEMBER(mario_state::mario_sh3_w)
#if OLD_SOUND
machine().device<discrete_device>("discrete")->write(space, DS_SOUND7_INP, data & 1);
#else
- m_audio_snd7->write((data & 1) ^ 1);
+ m_audio_snd7->write((data & 1) ^ 1);
#endif
break;
}
@@ -891,16 +891,16 @@ MACHINE_CONFIG_FRAGMENT( mario_audio )
MCFG_DISCRETE_INTF(mario)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1)
#else
- MCFG_SOUND_ADD("snd_nl", NETLIST_SOUND, 48000)
- MCFG_NETLIST_SETUP(nl_mario)
- MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
+ MCFG_SOUND_ADD("snd_nl", NETLIST_SOUND, 48000)
+ MCFG_NETLIST_SETUP(nl_mario)
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd0", "SOUND0.IN", 0, 1)
- MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd7", "SOUND7.IN", 0, 1)
- MCFG_NETLIST_LOGIC_INPUT("snd_nl", "dac", "DAC.VAL", 0, 255)
+ MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd0", "SOUND0.IN", 0, 1)
+ MCFG_NETLIST_LOGIC_INPUT("snd_nl", "snd7", "SOUND7.IN", 0, 1)
+ MCFG_NETLIST_LOGIC_INPUT("snd_nl", "dac", "DAC.VAL", 0, 255)
- MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "ROUT.1")
- MCFG_NETLIST_ANALOG_MULT_OFFSET(150000.0, 0.0)
+ MCFG_NETLIST_STREAM_OUTPUT("snd_nl", 0, "ROUT.1")
+ MCFG_NETLIST_ANALOG_MULT_OFFSET(150000.0, 0.0)
#endif
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/aleck64.c b/src/mame/drivers/aleck64.c
index 44866e0c192..e0db5a4f7f3 100644
--- a/src/mame/drivers/aleck64.c
+++ b/src/mame/drivers/aleck64.c
@@ -178,8 +178,8 @@ class aleck64_state : public n64_state
public:
aleck64_state(const machine_config &mconfig, device_type type, const char *tag)
: n64_state(mconfig, type, tag),
- m_e90_vram(*this,"e90vram"),
- m_e90_pal(*this,"e90pal"),
+ m_e90_vram(*this,"e90vram"),
+ m_e90_pal(*this,"e90pal"),
m_dip_read_offset(0) { }
optional_shared_ptr<UINT32> m_e90_vram;
@@ -322,7 +322,7 @@ static ADDRESS_MAP_START( n64_map, AS_PROGRAM, 32, aleck64_state )
ADDRESS_MAP_END
/*
- E90 protection handlers
+ E90 protection handlers
*/
READ16_MEMBER(aleck64_state::e90_prot_r)
@@ -332,7 +332,7 @@ READ16_MEMBER(aleck64_state::e90_prot_r)
}
WRITE16_MEMBER(aleck64_state::e90_prot_w)
-{
+{
switch(offset*2)
{
case 0x16:
@@ -342,7 +342,7 @@ WRITE16_MEMBER(aleck64_state::e90_prot_w)
if(data & 1) // 0 -> 1 transition
{
//for(int i=0;i<0x1000;i+=4)
- // space.write_dword(0x007502f4+i,space.read_dword(0xd0000000+i));
+ // space.write_dword(0x007502f4+i,space.read_dword(0xd0000000+i));
}
break;
//0x1e bit 0 probably enables the chip
@@ -882,7 +882,7 @@ UINT32 aleck64_state::screen_update_e90(screen_device &screen, bitmap_rgb32 &bit
{
bitmap.fill(0, cliprect);
screen_update_n64(screen,bitmap,cliprect);
-
+
for(int offs=0;offs<0x1000/4;offs+=2)
{
int xi,yi;
@@ -904,16 +904,16 @@ UINT32 aleck64_state::screen_update_e90(screen_device &screen, bitmap_rgb32 &bit
r&=0x1f;
g&=0x1f;
b&=0x1f;
- r = (r << 3) | (r >> 2);
+ r = (r << 3) | (r >> 2);
g = (g << 3) | (g >> 2);
- b = (b << 3) | (b >> 2);
+ b = (b << 3) | (b >> 2);
for(yi=0;yi<8;yi++)
for(xi=0;xi<8;xi++)
{
int res_x,res_y;
res_x = x+xi + 4;
res_y = y+yi + 7;
-
+
if(cliprect.contains(res_x, res_y))
bitmap.pix32(res_y, res_x) = r << 16 | g << 8 | b;
}
@@ -926,7 +926,7 @@ static MACHINE_CONFIG_DERIVED( a64_e90, aleck64 )
MCFG_CPU_PROGRAM_MAP(e90_map)
MCFG_SCREEN_MODIFY("screen")
- MCFG_SCREEN_UPDATE_DRIVER(aleck64_state, screen_update_e90)
+ MCFG_SCREEN_UPDATE_DRIVER(aleck64_state, screen_update_e90)
MACHINE_CONFIG_END
DRIVER_INIT_MEMBER(aleck64_state,aleck64)
diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c
index 315b72cfaa3..82a58f0bcfa 100644
--- a/src/mame/drivers/btime.c
+++ b/src/mame/drivers/btime.c
@@ -1940,7 +1940,7 @@ ROM_START( discof )
ROM_LOAD( "w3-f.4a", 0xc000, 0x1000, CRC(9aadd252) SHA1(c6da7ef46333d525e676c59f03ccc908108b41ba) )
ROM_LOAD( "w2-f.6a", 0xd000, 0x1000, CRC(f131a5bb) SHA1(84b7dea112dce12e5cb235a13f6dc4edcfb18c06) )
ROM_LOAD( "w1-f.9a", 0xe000, 0x1000, CRC(a6ce9a19) SHA1(e8f380e17a21fb33504d6efe9d01d0f903fa25e1) )
-// ROM_LOAD( "w1-f", 0xe000, 0x1000, CRC(c8ec57c5) SHA1(904a9ed0a7f1230c611bf473b9bc52e63eb56dbe) ) // 0x7d3 is 0x10 instead of 0x00, 1 bit different, looks out of place, bad?
+// ROM_LOAD( "w1-f", 0xe000, 0x1000, CRC(c8ec57c5) SHA1(904a9ed0a7f1230c611bf473b9bc52e63eb56dbe) ) // 0x7d3 is 0x10 instead of 0x00, 1 bit different, looks out of place, bad?
ROM_LOAD( "w0-f.9a", 0xf000, 0x1000, CRC(b3787a92) SHA1(7f40621dc739c1108a5df43142ab04709a380219) )
ROM_REGION( 0x10000, "audiocpu", 0 )
diff --git a/src/mame/drivers/calomega.c b/src/mame/drivers/calomega.c
index 805b2da5458..47205155203 100644
--- a/src/mame/drivers/calomega.c
+++ b/src/mame/drivers/calomega.c
@@ -3658,7 +3658,7 @@ DRIVER_INIT_MEMBER(calomega_state,sys905)
DRIVER_INIT_MEMBER(calomega_state,comg080)
{
DRIVER_INIT_CALL(sys903);
-
+
/* Injecting missing Start and NMI vectors...
Start = $2042; NMI = $26f8;
Also a fake vector at $3ff8-$3ff9. The code checks these values to continue.
diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c
index c06f00df6fc..7aa5a3d18c5 100644
--- a/src/mame/drivers/cps1.c
+++ b/src/mame/drivers/cps1.c
@@ -9322,7 +9322,7 @@ ROM_START( cworld2ja )
ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */
ROM_LOAD16_WORD_SWAP("q5 - 34_90629b.8f", 0x00000, 0x80000, CRC(de54487f) SHA1(75b228a6c702c82d4d9a2a992933b5c3c420f6c2) )
ROM_LOAD16_WORD_SWAP("q5 - 33_90629b.6f", 0x80000, 0x80000, CRC(93248458) SHA1(9dcdc6838f52efc9a0a6333fd0d734946db12dbd) )
-
+
ROM_REGION( 0x200000, "gfx", 0 )
ROMX_LOAD( "q5 - 06_90629b.8a", 0x000000, 0x80000, CRC(09d0e7ce) SHA1(ea502b975986222acce82ce8396348af72e1df72) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "q5 - 08_90629b.10a", 0x000002, 0x80000, CRC(22e4ce9a) SHA1(9e49aec8e1d6d15a68da63e69765b82fd53a9562) , ROM_GROUPWORD | ROM_SKIP(6) )
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c
index 89d4ae00fc7..347bbb31dbe 100644
--- a/src/mame/drivers/ddenlovr.c
+++ b/src/mame/drivers/ddenlovr.c
@@ -154,8 +154,8 @@ public:
: dynax_state(mconfig, type, tag),
m_dsw_sel16(*this, "dsw_sel16"),
m_protection1(*this, "protection1"),
- m_protection2(*this, "protection2") { }
-
+ m_protection2(*this, "protection2") { }
+
optional_shared_ptr<UINT16> m_dsw_sel16;
optional_shared_ptr<UINT16> m_protection1;
diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c
index a5faa2a913a..7c4b863e470 100644
--- a/src/mame/drivers/dec0.c
+++ b/src/mame/drivers/dec0.c
@@ -530,7 +530,7 @@ void dec0_automat_state::machine_start()
{
save_item(NAME(m_automat_adpcm_byte));
save_item(NAME(m_automat_msm5205_vclk_toggle));
- save_item(NAME(m_automat_scroll_regs));
+ save_item(NAME(m_automat_scroll_regs));
}
diff --git a/src/mame/drivers/dgpix.c b/src/mame/drivers/dgpix.c
index 03aa1b6f93f..f3c96df0142 100644
--- a/src/mame/drivers/dgpix.c
+++ b/src/mame/drivers/dgpix.c
@@ -164,14 +164,14 @@ public:
required_device<cpu_device> m_maincpu;
required_ioport m_vblank;
-
+
UINT32 *m_vram;
int m_vbuffer;
int m_flash_roms;
int m_old_vbuf;
UINT32 m_flash_cmd;
INT32 m_first_offset;
-
+
DECLARE_READ32_MEMBER(flash_r);
DECLARE_WRITE32_MEMBER(flash_w);
DECLARE_WRITE32_MEMBER(vram_w);
@@ -179,18 +179,18 @@ public:
DECLARE_WRITE32_MEMBER(vbuffer_w);
DECLARE_WRITE32_MEMBER(coin_w);
DECLARE_READ32_MEMBER(vblank_r);
-
+
DECLARE_DRIVER_INIT(elfin);
DECLARE_DRIVER_INIT(jumpjump);
DECLARE_DRIVER_INIT(xfiles);
DECLARE_DRIVER_INIT(xfilesk);
DECLARE_DRIVER_INIT(kdynastg);
DECLARE_DRIVER_INIT(fmaniac3);
-
+
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
-
+
UINT32 screen_update_dgpix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c
index e4187ee4848..52dca8d880f 100644
--- a/src/mame/drivers/dkong.c
+++ b/src/mame/drivers/dkong.c
@@ -341,7 +341,7 @@ Donkey Kong Notes
That kit included the following 4 EPROM's
- USA (c) 1981 Nintendo of America set
+ USA (c) 1981 Nintendo of America set
------------------------------------
Filename Label Type Loc/PCB *Label *Loc/PCB CSum
diff --git a/src/mame/drivers/dynax.c b/src/mame/drivers/dynax.c
index e3dee5c1598..d575a70bcf2 100644
--- a/src/mame/drivers/dynax.c
+++ b/src/mame/drivers/dynax.c
@@ -4378,7 +4378,7 @@ MACHINE_START_MEMBER(dynax_state,jantouki)
membank("bank1")->configure_entries(0, 0x10, &MAIN[0x8000], 0x8000);
membank("bank2")->configure_entries(0, 12, &SOUND[0x8000], 0x8000);
-
+
MACHINE_START_CALL_MEMBER(dynax);
}
diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c
index 478a4a9e9b2..77fd106bc83 100644
--- a/src/mame/drivers/eolith.c
+++ b/src/mame/drivers/eolith.c
@@ -1494,7 +1494,7 @@ DRIVER_INIT_MEMBER(eolith_state,eolith)
// Configure the sound ROM banking
membank("sound_bank")->configure_entries(0, 16, memregion("sounddata")->base(), 0x8000);
-
+
save_item(NAME(m_sound_data));
}
diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c
index cd152010b8f..8b5b676ea0f 100644
--- a/src/mame/drivers/eolith16.c
+++ b/src/mame/drivers/eolith16.c
@@ -25,16 +25,16 @@ public:
UINT16 *m_vram;
int m_vbuffer;
-
+
DECLARE_WRITE16_MEMBER(eeprom_w);
DECLARE_READ16_MEMBER(eolith16_custom_r);
DECLARE_WRITE16_MEMBER(vram_w);
DECLARE_READ16_MEMBER(vram_r);
-
+
DECLARE_DRIVER_INIT(eolith16);
DECLARE_VIDEO_START(eolith16);
DECLARE_PALETTE_INIT(eolith16);
-
+
UINT32 screen_update_eolith16(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
diff --git a/src/mame/drivers/eolithsp.c b/src/mame/drivers/eolithsp.c
index f570d36395b..b4653f5959d 100644
--- a/src/mame/drivers/eolithsp.c
+++ b/src/mame/drivers/eolithsp.c
@@ -84,7 +84,7 @@ void eolith_state::init_speedup()
}
n_game++;
}
-
+
save_item(NAME(m_speedup_vblank));
save_item(NAME(m_speedup_scanline));
}
diff --git a/src/mame/drivers/exidy.c b/src/mame/drivers/exidy.c
index 6ba62899e2e..7b236ff2b39 100644
--- a/src/mame/drivers/exidy.c
+++ b/src/mame/drivers/exidy.c
@@ -187,10 +187,10 @@ CUSTOM_INPUT_MEMBER(exidy_state::teetert_input_r)
WRITE8_MEMBER(exidy_state::fax_bank_select_w)
{
membank("bank1")->set_entry(data & 0x1f);
-
+
if ((data & 0x1f) > 0x17)
logerror("Banking to unpopulated ROM bank %02X!\n", data & 0x1f);
-
+
}
diff --git a/src/mame/drivers/funkball.c b/src/mame/drivers/funkball.c
index d088dbe0976..5f7875fbac0 100644
--- a/src/mame/drivers/funkball.c
+++ b/src/mame/drivers/funkball.c
@@ -356,7 +356,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( flashbank_map, AS_PROGRAM, 32, funkball_state )
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE16("u29", intel_28f320j5_device, read, write, 0xffffffff ) // needed to boot
AM_RANGE(0x00400000, 0x007fffff) AM_DEVREADWRITE16("u30", intel_28f320j5_device, read, write, 0xffffffff ) // i assume it maps directly after
-// AM_RANGE(0x02000000, 0x023fffff) AM_DEVREADWRITE16("u3", intel_28f320j5_device, read, write, 0xffffffff ) // sound program, don't think it matters where we map it, might not even be visible in this space
+// AM_RANGE(0x02000000, 0x023fffff) AM_DEVREADWRITE16("u3", intel_28f320j5_device, read, write, 0xffffffff ) // sound program, don't think it matters where we map it, might not even be visible in this space
/* it checks for 64MBit chips at 0x80000000 the way things are set up, they must return an intel Flash ID of 0x15 */
ADDRESS_MAP_END
diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c
index 370bd91e053..f847b6cce86 100644
--- a/src/mame/drivers/galaxian.c
+++ b/src/mame/drivers/galaxian.c
@@ -1499,8 +1499,8 @@ static ADDRESS_MAP_START( spactrai_map, AS_PROGRAM, 8, galaxian_state )
AM_RANGE(0x1200, 0x12ff) AM_MIRROR(0x0100) AM_RAM_WRITE(galaxian_objram_w) AM_SHARE("spriteram")
AM_RANGE(0x1400, 0x1400) AM_MIRROR(0x03ff) AM_READ(watchdog_reset_r)
AM_RANGE(0x4000, 0xbfff) AM_ROM
-// AM_RANGE(0xc000, 0xc003) AM_MIRROR(0x3efc) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
-// AM_RANGE(0xc100, 0xc103) AM_MIRROR(0x3efc) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
+// AM_RANGE(0xc000, 0xc003) AM_MIRROR(0x3efc) AM_DEVREADWRITE("ppi8255_1", i8255_device, read, write)
+// AM_RANGE(0xc100, 0xc103) AM_MIRROR(0x3efc) AM_DEVREADWRITE("ppi8255_0", i8255_device, read, write)
ADDRESS_MAP_END
static ADDRESS_MAP_START( anteaterg_map, AS_PROGRAM, 8, galaxian_state )
diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c
index 684975bda5d..7cb9b3c6ff9 100644
--- a/src/mame/drivers/gticlub.c
+++ b/src/mame/drivers/gticlub.c
@@ -281,14 +281,14 @@ public:
optional_device<k001006_device> m_k001006_2;
optional_device<k001604_device> m_k001604_1;
optional_device<k001604_device> m_k001604_2;
-
+
required_shared_ptr<UINT32> m_work_ram;
required_shared_ptr<UINT32> m_generic_paletteram_32;
-
+
optional_ioport m_analog0, m_analog1, m_analog2, m_analog3;
-
+
required_ioport_array<4> m_ports;
-
+
DECLARE_IOPORT_ARRAY(ports);
DECLARE_WRITE32_MEMBER(paletteram32_w);
diff --git a/src/mame/drivers/gts80a.c b/src/mame/drivers/gts80a.c
index ae9bd7ca49c..96b46095225 100644
--- a/src/mame/drivers/gts80a.c
+++ b/src/mame/drivers/gts80a.c
@@ -427,13 +427,13 @@ static ADDRESS_MAP_START( video_map, AS_PROGRAM, 8, caveman_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( video_io_map, AS_IO, 8, caveman_state )
-// AM_RANGE(0x000, 0x002) AM_READWRITE() // 8259 irq controller
-// AM_RANGE(0x100, 0x102) AM_READWRITE() // HD46505
-// AM_RANGE(0x200, 0x200) AM_READWRITE() // 8212 in, ?? out
-// AM_RANGE(0x300, 0x300) AM_READWRITE() // soundlatch (command?) in, ?? out
+// AM_RANGE(0x000, 0x002) AM_READWRITE() // 8259 irq controller
+// AM_RANGE(0x100, 0x102) AM_READWRITE() // HD46505
+// AM_RANGE(0x200, 0x200) AM_READWRITE() // 8212 in, ?? out
+// AM_RANGE(0x300, 0x300) AM_READWRITE() // soundlatch (command?) in, ?? out
-// AM_RANGE(0x400, 0x400) AM_READ() // joystick inputs
-// AM_RANGE(0x500, 0x506) AM_WRITE() // palette
+// AM_RANGE(0x400, 0x400) AM_READ() // joystick inputs
+// AM_RANGE(0x500, 0x506) AM_WRITE() // palette
ADDRESS_MAP_END
diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c
index 8669dd2d087..0d6c06d602f 100644
--- a/src/mame/drivers/model2.c
+++ b/src/mame/drivers/model2.c
@@ -2491,7 +2491,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( model2a_0229, model2a )
MCFG_DEVICE_ADD("317_0229", SEGA315_5838_COMP, 0)
-// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
+// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
READ8_MEMBER(model2_state::driveio_port_r)
@@ -2599,7 +2599,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( model2b_0229, model2b )
MCFG_DEVICE_ADD("317_0229", SEGA315_5838_COMP, 0)
-// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
+// MCFG_SET_5838_READ_CALLBACK(model2_state, crypt_read_callback)
MACHINE_CONFIG_END
@@ -5890,7 +5890,7 @@ ROM_START( desert ) /* Desert Tank, Model 2 */
ROM_END
DRIVER_INIT_MEMBER(model2_state,genprot)
-{
+{
//astring key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0x01d80000, 0x01d8ffff);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01d90000, 0x01d9ffff, read32_delegate(FUNC(model2_state::model2_5881prot_r), this), write32_delegate(FUNC(model2_state::model2_5881prot_w), this));
@@ -5947,7 +5947,7 @@ WRITE32_MEMBER(model2_state::jaleco_network_w)
DRIVER_INIT_MEMBER(model2_state,sgt24h)
{
-// DRIVER_INIT_CALL(genprot);
+// DRIVER_INIT_CALL(genprot);
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x01a10000, 0x01a1ffff, read32_delegate(FUNC(model2_state::jaleco_network_r),this), write32_delegate(FUNC(model2_state::jaleco_network_w),this));
@@ -5965,7 +5965,7 @@ DRIVER_INIT_MEMBER(model2_state,overrev)
DRIVER_INIT_MEMBER(model2_state,doa)
{
m_0229crypt->install_doa_protection();
-
+
UINT32 *ROM = (UINT32 *)memregion("maincpu")->base();
ROM[0x630/4] = 0x08000004;
ROM[0x808/4] = 0x08000004;
diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c
index ac3e19ad0a4..6ee0608ea00 100644
--- a/src/mame/drivers/model3.c
+++ b/src/mame/drivers/model3.c
@@ -1696,11 +1696,11 @@ READ64_MEMBER(model3_state::model3_5881prot_r)
{
UINT8* base;
retvalue = m_cryptdevice->do_decrypt(base);
- // retvalue = ((retvalue & 0xff00) >> 8) | ((retvalue & 0x00ff) << 8); // don't endian swap the return value on this hardware
+ // retvalue = ((retvalue & 0xff00) >> 8) | ((retvalue & 0x00ff) << 8); // don't endian swap the return value on this hardware
retvalue <<= 16;
}
- // printf("model3_5881prot_r offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (UINT32)(retvalue >> 32), (UINT32)(retvalue & 0xffffffff), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask & 0xffffffff));
+ // printf("model3_5881prot_r offset %08x : %08x%08x (%08x%08x)\n", offset * 8, (UINT32)(retvalue >> 32), (UINT32)(retvalue & 0xffffffff), (UINT32)(mem_mask >> 32), (UINT32)(mem_mask & 0xffffffff));
}
else
{
@@ -5584,8 +5584,8 @@ UINT16 model3_state::crypt_read_callback(UINT32 addr)
dat = m_maincpu->space().read_word((0xf0180000 + 4 * addr)); // every other word is unused in this RAM, probably 32-bit ram on 64-bit bus?
}
-// dat = ((dat & 0xff00) >> 8) | ((dat & 0x00ff) << 8);
-// printf("reading %04x\n", dat);
+// dat = ((dat & 0xff00) >> 8) | ((dat & 0x00ff) << 8);
+// printf("reading %04x\n", dat);
return dat;
}
@@ -5629,11 +5629,11 @@ static void interleave_vroms(running_machine &machine)
DRIVER_INIT_MEMBER(model3_state, genprot)
{
-// astring key = parameter(":315_5881:key");
+// astring key = parameter(":315_5881:key");
m_maincpu->space(AS_PROGRAM).install_ram(0xf0180000, 0xf019ffff, 0, 0x0e000000);
- m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) );
+ m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xf01a0000, 0xf01a003f, 0, 0x0e000000, read64_delegate(FUNC(model3_state::model3_5881prot_r), this), write64_delegate(FUNC(model3_state::model3_5881prot_w), this) );
}
@@ -5846,7 +5846,6 @@ DRIVER_INIT_MEMBER(model3_state,srally2)
DRIVER_INIT_MEMBER(model3_state,swtrilgy)
{
-
UINT32 *rom = (UINT32*)memregion("user1")->base();
DRIVER_INIT_CALL(model3_20);
@@ -5890,7 +5889,7 @@ DRIVER_INIT_MEMBER(model3_state,dirtdvls)
DRIVER_INIT_MEMBER(model3_state,daytona2)
{
-// UINT32 *rom = (UINT32*)memregion("user1")->base();
+// UINT32 *rom = (UINT32*)memregion("user1")->base();
DRIVER_INIT_CALL(model3_20);
m_maincpu->space(AS_PROGRAM).install_write_handler(0xc3800000, 0xc3800007, write64_delegate(FUNC(model3_state::daytona2_rombank_w),this));
@@ -5906,17 +5905,17 @@ DRIVER_INIT_MEMBER(model3_state,daytona2)
DRIVER_INIT_MEMBER(model3_state,dayto2pe)
{
-// UINT32 *rom = (UINT32*)memregion("user1")->base();
+// UINT32 *rom = (UINT32*)memregion("user1")->base();
DRIVER_INIT_CALL(model3_20);
m_maincpu->space(AS_PROGRAM).install_write_handler(0xc3800000, 0xc3800007, write64_delegate(FUNC(model3_state::daytona2_rombank_w),this));
m_maincpu->space(AS_PROGRAM).install_read_bank(0xc3000000, 0xc37fffff, "bank2" );
-// rom[(0x606784^4)/4] = 0x60000000;
-// rom[(0x69a3fc^4)/4] = 0x60000000; // jump to encrypted code
-// rom[(0x618b28^4)/4] = 0x60000000; // jump to encrypted code
+// rom[(0x606784^4)/4] = 0x60000000;
+// rom[(0x69a3fc^4)/4] = 0x60000000; // jump to encrypted code
+// rom[(0x618b28^4)/4] = 0x60000000; // jump to encrypted code
-// rom[(0x64ca34^4)/4] = 0x60000000; // dec
+// rom[(0x64ca34^4)/4] = 0x60000000; // dec
DRIVER_INIT_CALL(genprot);
}
diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c
index 7cc4a1eb4dc..457438e2b8b 100644
--- a/src/mame/drivers/overdriv.c
+++ b/src/mame/drivers/overdriv.c
@@ -475,4 +475,4 @@ ROM_END
GAMEL( 1990, overdriv, 0, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 1)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
GAMEL( 1990, overdriva, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
-GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv ) \ No newline at end of file
+GAMEL( 1990, overdrivb, overdriv, overdriv, overdriv, driver_device, 0, ROT90, "Konami", "Over Drive (set 3)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE, layout_overdriv )
diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c
index 24e42a96b36..fc507ed2653 100644
--- a/src/mame/drivers/psychic5.c
+++ b/src/mame/drivers/psychic5.c
@@ -947,4 +947,3 @@ ROM_END
GAME( 1987, psychic5, 0, psychic5, psychic5, driver_device, 0, ROT270, "Jaleco / NMK", "Psychic 5 (World)", 0 ) // "Oversea's version V2.00 CHANGED BY TAMIO NAKASATO" text present in ROM, various modifications (English names, more complete attract demo etc.)
GAME( 1987, psychic5j, psychic5, psychic5, psychic5, driver_device, 0, ROT270, "Jaleco / NMK", "Psychic 5 (Japan)", 0 )
GAME( 1988, bombsa, 0, bombsa, bombsa, driver_device, 0, ROT270, "Jaleco", "Bombs Away", GAME_NOT_WORKING )
-
diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c
index 8535b8414f9..d4193425e6f 100644
--- a/src/mame/drivers/seta2.c
+++ b/src/mame/drivers/seta2.c
@@ -1584,7 +1584,7 @@ static INPUT_PORTS_START( reelquak )
PORT_DIPSETTING( 0x0040, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x0000, "1 Coin/10 Credits" )
- PORT_START("DSW2") // $400302.w PORT_START("DSW2") // $400302.w
+ PORT_START("DSW2") // $400302.w PORT_START("DSW2") // $400302.w
PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") // used
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -1648,7 +1648,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( endrichs )
PORT_INCLUDE(reelquak)
-
+
PORT_MODIFY("DSW1") // $400300.w
PORT_DIPNAME( 0x0001, 0x0001, "Payout Style" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0001, "Normal Payout" )
diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c
index b7e7a610da3..29704dce9fb 100644
--- a/src/mame/drivers/stv.c
+++ b/src/mame/drivers/stv.c
@@ -1844,7 +1844,7 @@ ROM_START( astrass )
ROM_LOAD16_WORD_SWAP( "mpr20833.9", 0x2000000, 0x0400000, CRC(cb6af231) SHA1(4a2e5d7c2fd6179c19cdefa84a03f9a34fbb9e70) ) // good (was .19s)
// 25349801 1998 317-5040-COM ST-V (yes, the 317-5040-COM chip was reused for 3 different games and on both Naomi and ST-V!)
- ROM_PARAMETER( ":315_5881:key", "052e2901" )
+ ROM_PARAMETER( ":315_5881:key", "052e2901" )
ROM_END
ROM_START( bakubaku )
diff --git a/src/mame/drivers/taitottl.c b/src/mame/drivers/taitottl.c
index 096c817e3e1..6a33d0bb22c 100644
--- a/src/mame/drivers/taitottl.c
+++ b/src/mame/drivers/taitottl.c
@@ -226,28 +226,28 @@ ROM_END
MS06 M8 74s287 missile animated graphics
MS05 11F IM5610 200pt tank R->L graphic
MS05 11E IM5610 200pt tank L->R graphic
- MS04 N7 IM5610 player missile trajectory pattern
+ MS04 N7 IM5610 player missile trajectory pattern
MS03 F3 IM5610 anti-missile ack-ack graphics
MS02 L12 IM5610 missile left/right position
MS01 D8 IM5610 100pt tanks graphics
-
+
*/
ROM_START( missilex )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_REGION( 0x0800, "roms", ROMREGION_ERASE00 )
- ROM_LOAD( "cr11.4l", 0x0000, 0x0200, CRC(3d10a407) SHA1(1a85581c34d7e6766eaebbcc9895ed0ab2f94387) )
+ ROM_LOAD( "cr11.4l", 0x0000, 0x0200, CRC(3d10a407) SHA1(1a85581c34d7e6766eaebbcc9895ed0ab2f94387) )
ROM_LOAD( "ms09.6f", 0x0000, 0x0200, CRC(80787642) SHA1(9de2419f0ba16f9c2b06e417c1ebba441fdae053) )
- ROM_LOAD( "ms08.2c", 0x0000, 0x0200, CRC(dd785590) SHA1(7ba6b6f6091595852d6feaef5a029b2aca684440) )
- ROM_LOAD( "ms07.8n", 0x0000, 0x0200, CRC(e278d03a) SHA1(c40975e5807936fed40cda4a6881f6aef0e7f350) )
- ROM_LOAD( "ms06.8m", 0x0000, 0x0200, CRC(fe6c9192) SHA1(d110e010cf685ee18479ca7f890fa9da2fa71603) )
- ROM_LOAD( "ms05.11f", 0x0000, 0x0020, CRC(845fe0cc) SHA1(ce8db615c1f7be242fc2ee25c1ef75e8608a771a) )
- ROM_LOAD( "ms05.11e", 0x0000, 0x0020, CRC(845fe0cc) SHA1(ce8db615c1f7be242fc2ee25c1ef75e8608a771a) )
- ROM_LOAD( "ms04.7n", 0x0000, 0x0020, CRC(34d0bee4) SHA1(41848def6aeb128ec985c158f3ed01c5b20bdcf6) )
- ROM_LOAD( "ms03.3f", 0x0000, 0x0020, CRC(d139f5fa) SHA1(29c05143d05553c2cb2831f9624f307f59436850) )
- ROM_LOAD( "ms02.12l", 0x0000, 0x0020, CRC(157b7e68) SHA1(d1a98267af1562e6126faaf0850906224f8a608d) )
- ROM_LOAD( "ms01.8d", 0x0000, 0x0020, CRC(e89e76c3) SHA1(1149b5d1f93baa8aecd54a618083cc13b63a894d) )
+ ROM_LOAD( "ms08.2c", 0x0000, 0x0200, CRC(dd785590) SHA1(7ba6b6f6091595852d6feaef5a029b2aca684440) )
+ ROM_LOAD( "ms07.8n", 0x0000, 0x0200, CRC(e278d03a) SHA1(c40975e5807936fed40cda4a6881f6aef0e7f350) )
+ ROM_LOAD( "ms06.8m", 0x0000, 0x0200, CRC(fe6c9192) SHA1(d110e010cf685ee18479ca7f890fa9da2fa71603) )
+ ROM_LOAD( "ms05.11f", 0x0000, 0x0020, CRC(845fe0cc) SHA1(ce8db615c1f7be242fc2ee25c1ef75e8608a771a) )
+ ROM_LOAD( "ms05.11e", 0x0000, 0x0020, CRC(845fe0cc) SHA1(ce8db615c1f7be242fc2ee25c1ef75e8608a771a) )
+ ROM_LOAD( "ms04.7n", 0x0000, 0x0020, CRC(34d0bee4) SHA1(41848def6aeb128ec985c158f3ed01c5b20bdcf6) )
+ ROM_LOAD( "ms03.3f", 0x0000, 0x0020, CRC(d139f5fa) SHA1(29c05143d05553c2cb2831f9624f307f59436850) )
+ ROM_LOAD( "ms02.12l", 0x0000, 0x0020, CRC(157b7e68) SHA1(d1a98267af1562e6126faaf0850906224f8a608d) )
+ ROM_LOAD( "ms01.8d", 0x0000, 0x0020, CRC(e89e76c3) SHA1(1149b5d1f93baa8aecd54a618083cc13b63a894d) )
ROM_END
diff --git a/src/mame/drivers/tourtabl.c b/src/mame/drivers/tourtabl.c
index bc74e8d2a05..ebb0df4ec75 100644
--- a/src/mame/drivers/tourtabl.c
+++ b/src/mame/drivers/tourtabl.c
@@ -21,7 +21,7 @@ public:
m_maincpu(*this, "maincpu") { }
required_device<cpu_device> m_maincpu;
-
+
DECLARE_WRITE8_MEMBER(tourtabl_led_w);
DECLARE_READ16_MEMBER(tourtabl_read_input_port);
DECLARE_READ8_MEMBER(tourtabl_get_databus_contents);
diff --git a/src/mame/drivers/twinkle.c b/src/mame/drivers/twinkle.c
index f182e85425c..aa6a5733f02 100644
--- a/src/mame/drivers/twinkle.c
+++ b/src/mame/drivers/twinkle.c
@@ -669,13 +669,13 @@ WRITE16_MEMBER(twinkle_state::serial_w)
WRITE8_MEMBER(twinkle_state::shared_psx_w)
{
-// printf("shared_psx_w: %04x, %04x, %04x\n", offset, data, mem_mask);
+// printf("shared_psx_w: %04x, %04x, %04x\n", offset, data, mem_mask);
m_spu_shared[offset] = data;
if (offset == 0x03fe && data == 0xff)
{
-// printf("spu command %02x %02x\n", m_spu_shared[1], m_spu_shared[3]);
+// printf("spu command %02x %02x\n", m_spu_shared[1], m_spu_shared[3]);
m_audiocpu->set_input_line(M68K_IRQ_4, HOLD_LINE);
}
@@ -785,7 +785,7 @@ WRITE_LINE_MEMBER(twinkle_state::spu_ata_dmarq)
// work for us until we figure out what's actually going on.
if (m_spu_ata_dma < 0x200000)
{
- m_waveram[m_spu_ata_dma++] = data;
+ m_waveram[m_spu_ata_dma++] = data;
}
}
@@ -808,21 +808,21 @@ READ16_MEMBER(twinkle_state::shared_68k_r)
{
UINT16 result = m_spu_shared[offset];
-// printf("shared_68k_r: %04x, %04x, %04x\n", offset, result, mem_mask);
+// printf("shared_68k_r: %04x, %04x, %04x\n", offset, result, mem_mask);
return result;
}
WRITE16_MEMBER(twinkle_state::shared_68k_w)
{
-// printf("shared_68k_w: %04x, %04x, %04x\n", offset, data, mem_mask);
+// printf("shared_68k_w: %04x, %04x, %04x\n", offset, data, mem_mask);
m_spu_shared[offset] = data & 0xff;
}
READ16_MEMBER(twinkle_state::unk_68k_r)
{
- return 0xffff; // must return 0xff for 68000 POST to complete properly
+ return 0xffff; // must return 0xff for 68000 POST to complete properly
}
static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 16, twinkle_state )
@@ -840,7 +840,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 16, twinkle_state )
AM_RANGE(0x34000e, 0x34000f) AM_WRITENOP
AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rfsnd", rf5c400_device, rf5c400_r, rf5c400_w)
AM_RANGE(0x800000, 0xbfffff) AM_READWRITE(twinkle_waveram_r, twinkle_waveram_w )
- AM_RANGE(0xfe0000, 0xffffff) AM_RAM // ...and the RAM test checks this last 128k (mirror of the work RAM at 0x100000?)
+ AM_RANGE(0xfe0000, 0xffffff) AM_RAM // ...and the RAM test checks this last 128k (mirror of the work RAM at 0x100000?)
ADDRESS_MAP_END
/* SCSI */
diff --git a/src/mame/drivers/vegaeo.c b/src/mame/drivers/vegaeo.c
index 2eb2f4edf36..a7d252051ae 100644
--- a/src/mame/drivers/vegaeo.c
+++ b/src/mame/drivers/vegaeo.c
@@ -26,7 +26,7 @@ public:
UINT32 *m_vega_vram;
UINT8 m_vega_vbuffer;
-
+
DECLARE_WRITE32_MEMBER(vega_vram_w);
DECLARE_READ32_MEMBER(vega_vram_r);
DECLARE_WRITE32_MEMBER(vega_misc_w);
diff --git a/src/mame/drivers/vicdual.c b/src/mame/drivers/vicdual.c
index 1592893932f..3853fcddf48 100644
--- a/src/mame/drivers/vicdual.c
+++ b/src/mame/drivers/vicdual.c
@@ -3535,4 +3535,3 @@ GAME( 1980, digger, 0, digger, digger, driver_device, 0, ROT270
GAME( 1981, pulsar, 0, pulsar, pulsar, driver_device, 0, ROT270, "Sega", "Pulsar", GAME_IMPERFECT_SOUND )
GAME( 1979, heiankyo, 0, heiankyo, heiankyo, driver_device, 0, ROT270, "Denki Onkyo", "Heiankyo Alien", GAME_NO_SOUND )
GAME( 19??, alphaho, 0, alphaho, alphaho, driver_device, 0, ROT270, "Data East Corporation", "Alpha Fighter / Head On", GAME_WRONG_COLORS | GAME_NO_SOUND )
-
diff --git a/src/mame/includes/bogeyman.h b/src/mame/includes/bogeyman.h
index 46e65975120..f76b8889de9 100644
--- a/src/mame/includes/bogeyman.h
+++ b/src/mame/includes/bogeyman.h
@@ -21,14 +21,14 @@ public:
m_colorram(*this, "colorram"),
m_colorram2(*this, "colorram2"),
m_spriteram(*this, "spriteram") { }
-
+
/* devices */
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
required_device<ay8910_device> m_ay1;
required_device<ay8910_device> m_ay2;
-
+
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_videoram2;
@@ -45,7 +45,7 @@ public:
int m_psg_latch;
int m_last_write;
int m_colbank;
-
+
DECLARE_WRITE8_MEMBER(ay8910_latch_w);
DECLARE_WRITE8_MEMBER(ay8910_control_w);
DECLARE_WRITE8_MEMBER(videoram_w);
@@ -54,14 +54,14 @@ public:
DECLARE_WRITE8_MEMBER(colorram2_w);
DECLARE_WRITE8_MEMBER(paletteram_w);
DECLARE_WRITE8_MEMBER(colbank_w);
-
+
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
-
+
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
-
+
DECLARE_PALETTE_INIT(bogeyman);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/calomega.h b/src/mame/includes/calomega.h
index 5c83aca3786..0fa8ee90f00 100644
--- a/src/mame/includes/calomega.h
+++ b/src/mame/includes/calomega.h
@@ -51,7 +51,7 @@ public:
TILE_GET_INFO_MEMBER(get_bg_tile_info);
UINT32 screen_update_calomega(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_PALETTE_INIT(calomega);
-
+
protected:
virtual void video_start();
@@ -64,7 +64,7 @@ private:
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_colorram;
-
+
optional_ioport m_in0;
optional_ioport m_in0_0;
optional_ioport m_in0_1;
@@ -72,7 +72,7 @@ private:
optional_ioport m_in0_3;
optional_ioport m_frq;
optional_ioport m_sw2;
-
+
UINT8 m_tx_line;
int m_s903_mux_data;
int m_s905_mux_data;
diff --git a/src/mame/includes/dec0.h b/src/mame/includes/dec0.h
index 27dd1de8554..320d698c2fe 100644
--- a/src/mame/includes/dec0.h
+++ b/src/mame/includes/dec0.h
@@ -24,7 +24,7 @@ public:
m_paletteram(*this, "palette"),
m_robocop_shared_ram(*this, "robocop_shared"),
m_hippodrm_shared_ram(*this, "hippodrm_shared") { }
-
+
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<cpu_device> m_subcpu;
@@ -77,7 +77,7 @@ public:
DECLARE_READ16_MEMBER(ffantasybl_242024_r);
DECLARE_WRITE_LINE_MEMBER(sound_irq);
DECLARE_WRITE_LINE_MEMBER(sound_irq2);
-
+
DECLARE_DRIVER_INIT(robocop);
DECLARE_DRIVER_INIT(hippodrm);
DECLARE_DRIVER_INIT(hbarrel);
@@ -86,12 +86,12 @@ public:
DECLARE_DRIVER_INIT(baddudes);
DECLARE_DRIVER_INIT(midresb);
DECLARE_DRIVER_INIT(ffantasybl);
-
+
virtual void machine_start();
DECLARE_MACHINE_RESET(slyspy);
DECLARE_VIDEO_START(dec0);
DECLARE_VIDEO_START(dec0_nodma);
-
+
UINT32 screen_update_hbarrel(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_baddudes(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_birdtry(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
@@ -99,7 +99,7 @@ public:
UINT32 screen_update_hippodrm(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_slyspy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_midres(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
void baddudes_i8751_write(int data);
void birdtry_i8751_write(int data);
void dec0_i8751_write(int data);
@@ -118,7 +118,7 @@ public:
UINT8 m_automat_adpcm_byte;
int m_automat_msm5205_vclk_toggle;
UINT16 m_automat_scroll_regs[4];
-
+
DECLARE_WRITE16_MEMBER(automat_control_w);
DECLARE_WRITE8_MEMBER(automat_adpcm_w);
DECLARE_READ16_MEMBER( automat_palette_r );
@@ -128,9 +128,9 @@ public:
COMBINE_DATA(&m_automat_scroll_regs[offset]);
}
DECLARE_WRITE_LINE_MEMBER(automat_vclk_cb);
-
+
virtual void machine_start();
-
+
UINT32 screen_update_automat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_secretab(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h
index bc51bad3744..960eb2e559b 100644
--- a/src/mame/includes/dynax.h
+++ b/src/mame/includes/dynax.h
@@ -213,33 +213,33 @@ public:
DECLARE_WRITE8_MEMBER(jantouki_blitter2_rev2_w);
DECLARE_WRITE8_MEMBER(hanamai_priority_w);
DECLARE_WRITE8_MEMBER(tenkai_priority_w);
-
+
DECLARE_DRIVER_INIT(mjelct3);
DECLARE_DRIVER_INIT(blktouch);
DECLARE_DRIVER_INIT(mjelct3a);
DECLARE_DRIVER_INIT(mjreach);
DECLARE_DRIVER_INIT(maya);
-
+
UINT32 screen_update_hanamai(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_hnoridur(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_sprtmtch(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_mjdialq2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_jantouki_top(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_jantouki_bottom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
INTERRUPT_GEN_MEMBER(sprtmtch_vblank_interrupt);
INTERRUPT_GEN_MEMBER(jantouki_vblank_interrupt);
INTERRUPT_GEN_MEMBER(jantouki_sound_vblank_interrupt);
INTERRUPT_GEN_MEMBER(yarunara_clock_interrupt);
INTERRUPT_GEN_MEMBER(mjelctrn_vblank_interrupt);
-
+
TIMER_DEVICE_CALLBACK_MEMBER(neruton_irq_scanline);
TIMER_DEVICE_CALLBACK_MEMBER(majxtal7_vblank_interrupt);
TIMER_DEVICE_CALLBACK_MEMBER(tenkai_interrupt);
-
+
void tenkai_update_rombank();
void gekisha_bank_postload();
-
+
DECLARE_WRITE_LINE_MEMBER(sprtmtch_sound_callback);
DECLARE_WRITE_LINE_MEMBER(jantouki_sound_callback);
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
@@ -268,7 +268,7 @@ public:
DECLARE_VIDEO_START(mcnpshnt);
DECLARE_PALETTE_INIT(janyuki);
DECLARE_VIDEO_START(neruton);
-
+
inline void blitter_plot_pixel( int layer, int mask, int x, int y, int pen, int wrap, int flags );
int blitter_drawgfx( int layer, int mask, const char *gfx, int src, int pen, int x, int y, int wrap, int flags );
void dynax_blitter_start( int flags );
diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h
index 746a79a3bd6..b7922c4c44c 100644
--- a/src/mame/includes/eolith.h
+++ b/src/mame/includes/eolith.h
@@ -27,22 +27,22 @@ public:
optional_device<qs1000_device> m_qs1000;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
-
+
optional_ioport m_in0; // klondkp doesn't have it
optional_ioport m_eepromoutport;
optional_ioport m_penx1port;
optional_ioport m_peny1port;
optional_ioport m_penx2port;
optional_ioport m_peny2port;
-
+
optional_memory_bank m_sndbank;
-
+
int m_coin_counter_bit;
int m_buffer;
UINT32 *m_vram;
UINT8 m_sound_data;
-
+
// speedups - see machine/eolithsp.c
int m_speedup_address;
int m_speedup_address2;
@@ -66,18 +66,18 @@ public:
DECLARE_READ8_MEMBER(qs1000_p1_r);
DECLARE_WRITE8_MEMBER(qs1000_p1_w);
DECLARE_WRITE8_MEMBER(soundcpu_to_qs1000);
-
+
DECLARE_DRIVER_INIT(eolith);
DECLARE_DRIVER_INIT(landbrk);
DECLARE_DRIVER_INIT(hidctch3);
DECLARE_DRIVER_INIT(hidctch2);
DECLARE_DRIVER_INIT(hidnc2k);
DECLARE_DRIVER_INIT(landbrka);
-
+
DECLARE_MACHINE_RESET(eolith);
DECLARE_VIDEO_START(eolith);
-
+
UINT32 screen_update_eolith(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
TIMER_DEVICE_CALLBACK_MEMBER(eolith_speedup);
};
diff --git a/src/mame/includes/exidy.h b/src/mame/includes/exidy.h
index 62388b93061..0d2f0a11803 100644
--- a/src/mame/includes/exidy.h
+++ b/src/mame/includes/exidy.h
@@ -57,7 +57,7 @@ public:
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
-
+
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_sprite1_xpos;
required_shared_ptr<UINT8> m_sprite1_ypos;
@@ -77,12 +77,12 @@ public:
bitmap_ind16 m_motion_object_1_vid;
bitmap_ind16 m_motion_object_2_vid;
bitmap_ind16 m_motion_object_2_clip;
-
+
DECLARE_WRITE8_MEMBER(fax_bank_select_w);
DECLARE_READ8_MEMBER(exidy_interrupt_r);
-
+
DECLARE_CUSTOM_INPUT_MEMBER(teetert_input_r);
-
+
DECLARE_DRIVER_INIT(fax);
DECLARE_DRIVER_INIT(sidetrac);
DECLARE_DRIVER_INIT(pepper2);
@@ -93,14 +93,14 @@ public:
DECLARE_DRIVER_INIT(venture);
DECLARE_DRIVER_INIT(spectar);
DECLARE_DRIVER_INIT(phantoma);
-
+
virtual void video_start();
DECLARE_MACHINE_START(teetert);
-
+
UINT32 screen_update_exidy(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
INTERRUPT_GEN_MEMBER(exidy_vblank_interrupt);
-
+
void exidy_video_config(UINT8 _collision_mask, UINT8 _collision_invert, int _is_2bpp);
inline void latch_condition(int collision);
inline void set_1_color(int index, int which);
diff --git a/src/mame/includes/hyhoo.h b/src/mame/includes/hyhoo.h
index 1635fe9cf1b..35fa77e792d 100644
--- a/src/mame/includes/hyhoo.h
+++ b/src/mame/includes/hyhoo.h
@@ -32,14 +32,14 @@ public:
int m_highcolorflag;
int m_flipscreen;
bitmap_rgb32 m_tmpbitmap;
-
+
DECLARE_WRITE8_MEMBER(hyhoo_blitter_w);
DECLARE_WRITE8_MEMBER(hyhoo_romsel_w);
-
+
DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_busyflag_r);
-
+
virtual void video_start();
-
+
UINT32 screen_update_hyhoo(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void hyhoo_gfxdraw();
diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h
index 08e33088ff9..2dfcfba406f 100644
--- a/src/mame/includes/m58.h
+++ b/src/mame/includes/m58.h
@@ -13,13 +13,13 @@ public:
m_scroll_x_high(*this, "scroll_x_high"),
m_scroll_y_low(*this, "scroll_y_low"),
m_score_panel_disabled(*this, "score_disable") { }
-
+
/* devices */
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
-
+
/* memory pointers */
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_spriteram;
@@ -31,18 +31,18 @@ public:
/* video-related */
tilemap_t* m_bg_tilemap;
bitmap_ind16 m_scroll_panel_bitmap;
-
+
DECLARE_WRITE8_MEMBER(videoram_w);
DECLARE_WRITE8_MEMBER(scroll_panel_w);
DECLARE_WRITE8_MEMBER(flipscreen_w);
-
+
DECLARE_DRIVER_INIT(yard85);
virtual void video_start();
DECLARE_PALETTE_INIT(m58);
-
+
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILEMAP_MAPPER_MEMBER(tilemap_scan_rows);
-
+
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
void draw_panel( bitmap_ind16 &bitmap, const rectangle &cliprect );
diff --git a/src/mame/includes/mario.h b/src/mame/includes/mario.h
index 9ddca2ae51c..11ccbe6f61f 100644
--- a/src/mame/includes/mario.h
+++ b/src/mame/includes/mario.h
@@ -54,8 +54,8 @@ public:
m_discrete(*this, "discrete"),
#else
m_audio_snd0(*this, "snd_nl:snd0"),
- m_audio_snd7(*this, "snd_nl:snd7"),
- m_audio_dac(*this, "snd_nl:dac"),
+ m_audio_snd7(*this, "snd_nl:snd7"),
+ m_audio_dac(*this, "snd_nl:dac"),
#endif
m_spriteram(*this, "spriteram"),
m_videoram(*this, "videoram"),
@@ -71,8 +71,8 @@ public:
optional_device<discrete_device> m_discrete;
#else
optional_device<netlist_mame_logic_input_t> m_audio_snd0;
- optional_device<netlist_mame_logic_input_t> m_audio_snd7;
- optional_device<netlist_mame_logic_input_t> m_audio_dac;
+ optional_device<netlist_mame_logic_input_t> m_audio_snd7;
+ optional_device<netlist_mame_logic_input_t> m_audio_dac;
#endif
/* memory pointers */
diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h
index 9a52ddb22a6..4105a48e4e5 100644
--- a/src/mame/includes/model2.h
+++ b/src/mame/includes/model2.h
@@ -224,7 +224,7 @@ public:
DECLARE_WRITE32_MEMBER(copro_tgp_fifoout_push);
DECLARE_READ8_MEMBER(virtuacop_lightgun_r);
DECLARE_READ8_MEMBER(virtuacop_lightgun_offscreen_r);
-
+
UINT16 crypt_read_callback(UINT32 addr);
bool copro_fifoin_pop(device_t *device, UINT32 *result,UINT32 offset, UINT32 mem_mask);
diff --git a/src/mame/includes/nb1413m3.h b/src/mame/includes/nb1413m3.h
index b9cc02a33c6..04933f47bcb 100644
--- a/src/mame/includes/nb1413m3.h
+++ b/src/mame/includes/nb1413m3.h
@@ -129,7 +129,7 @@ public:
// (static) configuration helpers
static void set_type(device_t &device, int type) { downcast<nb1413m3_device &>(device).m_nb1413m3_type = type; }
-
+
enum
{
TIMER_CB
@@ -169,7 +169,7 @@ protected:
virtual void device_start();
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
-
+
private:
int m_74ls193_counter;
diff --git a/src/mame/includes/paradise.h b/src/mame/includes/paradise.h
index 44b8d916a41..e01292c706c 100644
--- a/src/mame/includes/paradise.h
+++ b/src/mame/includes/paradise.h
@@ -16,7 +16,7 @@ public:
m_videoram(*this, "videoram"),
m_paletteram(*this, "paletteram"),
m_spriteram(*this, "spriteram") { }
-
+
/* devices */
required_device<cpu_device> m_maincpu;
optional_device<okim6295_device> m_oki2;
@@ -36,14 +36,14 @@ public:
tilemap_t *m_tilemap_0;
tilemap_t *m_tilemap_1;
tilemap_t *m_tilemap_2;
-
+
bitmap_ind16 m_tmpbitmap;
UINT8 m_palbank;
UINT8 m_priority;
UINT8 m_pixbank;
int m_sprite_inc;
int m_irq_count;
-
+
DECLARE_WRITE8_MEMBER(paradise_rombank_w);
DECLARE_WRITE8_MEMBER(torus_coin_counter_w);
DECLARE_WRITE8_MEMBER(paradise_flipscreen_w);
@@ -56,25 +56,25 @@ public:
DECLARE_WRITE8_MEMBER(paradise_pixmap_w);
DECLARE_WRITE8_MEMBER(paradise_priority_w);
DECLARE_WRITE8_MEMBER(paradise_okibank_w);
-
+
DECLARE_DRIVER_INIT(torus);
DECLARE_DRIVER_INIT(paradise);
DECLARE_DRIVER_INIT(tgtball);
-
+
TILE_GET_INFO_MEMBER(get_tile_info_0);
TILE_GET_INFO_MEMBER(get_tile_info_1);
TILE_GET_INFO_MEMBER(get_tile_info_2);
-
+
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
-
+
UINT32 screen_update_paradise(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_torus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_madball(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
INTERRUPT_GEN_MEMBER(paradise_irq);
-
+
void update_pix_palbank();
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
};
diff --git a/src/mame/includes/pastelg.h b/src/mame/includes/pastelg.h
index 96e454d2873..d054e3eddbc 100644
--- a/src/mame/includes/pastelg.h
+++ b/src/mame/includes/pastelg.h
@@ -34,7 +34,7 @@ public:
int m_palbank;
UINT8 *m_videoram;
int m_flipscreen_old;
-
+
DECLARE_READ8_MEMBER(pastelg_sndrom_r);
DECLARE_READ8_MEMBER(pastelg_irq_ack_r);
DECLARE_READ8_MEMBER(threeds_inputport1_r);
@@ -45,13 +45,13 @@ public:
DECLARE_WRITE8_MEMBER(threeds_output_w);
DECLARE_READ8_MEMBER(threeds_rom_readback_r);
DECLARE_WRITE8_MEMBER(pastelg_romsel_w);
-
+
DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_busyflag_r);
DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_hackbusyflag_r);
-
+
virtual void machine_start();
virtual void video_start();
-
+
DECLARE_PALETTE_INIT(pastelg);
UINT32 screen_update_pastelg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
int pastelg_blitter_src_addr_r();
@@ -61,4 +61,3 @@ public:
protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
};
-
diff --git a/src/mame/includes/senjyo.h b/src/mame/includes/senjyo.h
index 963547bab68..2e469f6bdcc 100644
--- a/src/mame/includes/senjyo.h
+++ b/src/mame/includes/senjyo.h
@@ -36,7 +36,7 @@ public:
required_device<dac_device> m_dac;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
-
+
/* memory pointers */
required_shared_ptr<UINT8> m_spriteram;
required_shared_ptr<UINT8> m_fgscroll;
@@ -58,7 +58,7 @@ public:
// game specific initialization
int m_is_senjyo;
int m_scrollhack;
-
+
UINT8 m_sound_cmd;
int m_single_volume;
int m_sound_state;
@@ -67,7 +67,7 @@ public:
tilemap_t *m_bg1_tilemap;
tilemap_t *m_bg2_tilemap;
tilemap_t *m_bg3_tilemap;
-
+
DECLARE_WRITE8_MEMBER(flip_screen_w);
DECLARE_WRITE8_MEMBER(paletteram_w);
DECLARE_WRITE8_MEMBER(starforb_scrolly2);
@@ -82,18 +82,18 @@ public:
DECLARE_WRITE8_MEMBER(sound_cmd_w);
DECLARE_WRITE8_MEMBER(irq_ctrl_w);
DECLARE_READ8_MEMBER(pio_pa_r);
-
+
DECLARE_DRIVER_INIT(starfora);
DECLARE_DRIVER_INIT(senjyo);
DECLARE_DRIVER_INIT(starfore);
DECLARE_DRIVER_INIT(starforc);
-
+
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILE_GET_INFO_MEMBER(senjyo_bg1_tile_info);
TILE_GET_INFO_MEMBER(starforc_bg1_tile_info);
TILE_GET_INFO_MEMBER(get_bg2_tile_info);
TILE_GET_INFO_MEMBER(get_bg3_tile_info);
-
+
virtual void machine_start();
virtual void machine_reset();
virtual void video_start();
diff --git a/src/mame/includes/stadhero.h b/src/mame/includes/stadhero.h
index 015411ee760..4a197607978 100644
--- a/src/mame/includes/stadhero.h
+++ b/src/mame/includes/stadhero.h
@@ -19,17 +19,17 @@ public:
required_device<deco_bac06_device> m_tilegen1;
required_device<deco_mxc06_device> m_spritegen;
required_device<gfxdecode_device> m_gfxdecode;
-
+
required_shared_ptr<UINT16> m_spriteram;
required_shared_ptr<UINT16> m_pf1_data;
tilemap_t *m_pf1_tilemap;
-
+
DECLARE_WRITE16_MEMBER(stadhero_control_w);
DECLARE_WRITE16_MEMBER(stadhero_pf1_data_w);
-
+
virtual void video_start();
-
+
TILE_GET_INFO_MEMBER(get_pf1_tile_info);
UINT32 screen_update_stadhero(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
diff --git a/src/mame/includes/stfight.h b/src/mame/includes/stfight.h
index b534261c629..9c0c3664ab1 100644
--- a/src/mame/includes/stfight.h
+++ b/src/mame/includes/stfight.h
@@ -28,7 +28,7 @@ public:
required_device<msm5205_device> m_msm;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
-
+
optional_shared_ptr<UINT8> m_text_char_ram;
optional_shared_ptr<UINT8> m_text_attr_ram;
optional_shared_ptr<UINT8> m_tx_vram;
diff --git a/src/mame/includes/stlforce.h b/src/mame/includes/stlforce.h
index cb11d73b52c..0fb2ce746c6 100644
--- a/src/mame/includes/stlforce.h
+++ b/src/mame/includes/stlforce.h
@@ -36,29 +36,29 @@ public:
required_shared_ptr<UINT16> m_mhigh_scrollram;
required_shared_ptr<UINT16> m_vidattrram;
required_shared_ptr<UINT16> m_spriteram;
-
+
tilemap_t *m_bg_tilemap;
tilemap_t *m_mlow_tilemap;
tilemap_t *m_mhigh_tilemap;
tilemap_t *m_tx_tilemap;
int m_sprxoffs;
-
+
DECLARE_WRITE16_MEMBER(stlforce_bg_videoram_w);
DECLARE_WRITE16_MEMBER(stlforce_mlow_videoram_w);
DECLARE_WRITE16_MEMBER(stlforce_mhigh_videoram_w);
DECLARE_WRITE16_MEMBER(stlforce_tx_videoram_w);
DECLARE_WRITE16_MEMBER(eeprom_w);
DECLARE_WRITE16_MEMBER(oki_bank_w);
-
+
DECLARE_DRIVER_INIT(twinbrat);
DECLARE_DRIVER_INIT(stlforce);
-
+
TILE_GET_INFO_MEMBER(get_stlforce_bg_tile_info);
TILE_GET_INFO_MEMBER(get_stlforce_mlow_tile_info);
TILE_GET_INFO_MEMBER(get_stlforce_mhigh_tile_info);
TILE_GET_INFO_MEMBER(get_stlforce_tx_tile_info);
-
+
virtual void video_start();
UINT32 screen_update_stlforce(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect );
diff --git a/src/mame/includes/strnskil.h b/src/mame/includes/strnskil.h
index be662c3af21..f37d016649e 100644
--- a/src/mame/includes/strnskil.h
+++ b/src/mame/includes/strnskil.h
@@ -15,7 +15,7 @@ public:
required_device<cpu_device> m_subcpu;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
-
+
required_shared_ptr<UINT8> m_videoram;
required_shared_ptr<UINT8> m_xscroll;
required_shared_ptr<UINT8> m_spriteram;
@@ -23,7 +23,7 @@ public:
UINT8 m_scrl_ctrl;
tilemap_t *m_bg_tilemap;
UINT8 m_irq_source;
-
+
TIMER_DEVICE_CALLBACK_MEMBER(strnskil_irq);
DECLARE_READ8_MEMBER(strnskil_d800_r);
@@ -32,13 +32,13 @@ public:
DECLARE_WRITE8_MEMBER(protection_w);
DECLARE_WRITE8_MEMBER(strnskil_videoram_w);
DECLARE_WRITE8_MEMBER(strnskil_scrl_ctrl_w);
-
+
DECLARE_DRIVER_INIT(banbam);
DECLARE_DRIVER_INIT(pettanp);
-
+
TILE_GET_INFO_MEMBER(get_bg_tile_info);
-
- virtual void machine_start();
+
+ virtual void machine_start();
virtual void video_start();
DECLARE_PALETTE_INIT(strnskil);
UINT32 screen_update_strnskil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
diff --git a/src/mame/includes/vaportra.h b/src/mame/includes/vaportra.h
index 35c408b0846..905b34b9607 100644
--- a/src/mame/includes/vaportra.h
+++ b/src/mame/includes/vaportra.h
@@ -44,13 +44,13 @@ public:
DECLARE_WRITE16_MEMBER(vaportra_priority_w);
DECLARE_WRITE16_MEMBER(vaportra_palette_24bit_rg_w);
DECLARE_WRITE16_MEMBER(vaportra_palette_24bit_b_w);
-
+
DECLARE_DRIVER_INIT(vaportra);
virtual void machine_start();
virtual void machine_reset();
-
+
UINT32 screen_update_vaportra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void update_24bitcol( int offset );
-
+
DECO16IC_BANK_CB_MEMBER(bank_callback);
};
diff --git a/src/mame/includes/xyonix.h b/src/mame/includes/xyonix.h
index 56f2e162047..84c22d1d242 100644
--- a/src/mame/includes/xyonix.h
+++ b/src/mame/includes/xyonix.h
@@ -9,26 +9,26 @@ public:
required_device<cpu_device> m_maincpu;
required_device<gfxdecode_device> m_gfxdecode;
-
+
required_shared_ptr<UINT8> m_vidram;
-
+
tilemap_t *m_tilemap;
int m_e0_data;
int m_credits;
int m_coins;
int m_prev_coin;
-
+
DECLARE_WRITE8_MEMBER(irqack_w);
DECLARE_READ8_MEMBER(io_r);
DECLARE_WRITE8_MEMBER(io_w);
DECLARE_WRITE8_MEMBER(vidram_w);
-
+
virtual void machine_start();
virtual void video_start();
TILE_GET_INFO_MEMBER(get_tile_info);
DECLARE_PALETTE_INIT(xyonix);
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
-
+
void handle_coins(int coin);
};
diff --git a/src/mame/layout/gts80a_caveman.lay b/src/mame/layout/gts80a_caveman.lay
index cf5950d2c24..60c680b7b6e 100644
--- a/src/mame/layout/gts80a_caveman.lay
+++ b/src/mame/layout/gts80a_caveman.lay
@@ -151,9 +151,9 @@
<bezel name="text2" element="P4"><bounds left="100" right="180" top="90" bottom="102" /></bezel>
<bezel name="text1" element="P5"><bounds left="100" right="180" top="150" bottom="162" /></bezel>
<bezel name="text0" element="P6"><bounds left="100" right="180" top="210" bottom="222" /></bezel>
-
+
<screen index="0">
<bounds x="320" y="0" width="320" height="240" />
</screen>
- </view>
+ </view>
</mamelayout>
diff --git a/src/mame/machine/315-5838_317-0229_comp.c b/src/mame/machine/315-5838_317-0229_comp.c
index c35666a7e33..ca3731e9828 100644
--- a/src/mame/machine/315-5838_317-0229_comp.c
+++ b/src/mame/machine/315-5838_317-0229_comp.c
@@ -1,33 +1,33 @@
/* Sega Compression (and possibly encryption) device
- 315-5838 - Decathlete (ST-V)
- 317-0229 - Dead or Alive (Model 2A)
+ 315-5838 - Decathlete (ST-V)
+ 317-0229 - Dead or Alive (Model 2A)
- Package Type: TQFP100
+ Package Type: TQFP100
- This appears to be a dual channel compression chip, used in 1996, predating the 5881.
- Decathlete uses it to compress ALL the game graphics, Dead or Alive uses it for a
- dumb security check, decompressing a single string.
+ This appears to be a dual channel compression chip, used in 1996, predating the 5881.
+ Decathlete uses it to compress ALL the game graphics, Dead or Alive uses it for a
+ dumb security check, decompressing a single string.
- Each channel appears to be connected to a different set of ROMs, however there is
- defintiely only a single 315-5838 chip. (could the different channels actually just
- be mirror addresses, with part of the address determining the ROMs to use?)
+ Each channel appears to be connected to a different set of ROMs, however there is
+ defintiely only a single 315-5838 chip. (could the different channels actually just
+ be mirror addresses, with part of the address determining the ROMs to use?)
- Dead of Alive only uses a single channel, and has the source data in RAM, not ROM.
- This is similar to how some 5881 games were set up, with the ST-V versions decrypting
- data directly from ROM and the Model 2 ones using a RAM source buffer.
+ Dead of Alive only uses a single channel, and has the source data in RAM, not ROM.
+ This is similar to how some 5881 games were set up, with the ST-V versions decrypting
+ data directly from ROM and the Model 2 ones using a RAM source buffer.
- Looking at the values read I don't think there is any address based encryption, for
- example many blocks where you'd expect a zero fill start with repeating patterns
- of 8f708f70 (different lengths) channel would appear to relate to compressed 0x00 data
+ Looking at the values read I don't think there is any address based encryption, for
+ example many blocks where you'd expect a zero fill start with repeating patterns
+ of 8f708f70 (different lengths) channel would appear to relate to compressed 0x00 data
- read addr 0071253c, blah_r 8f708f70 - read count count 00000004
- read addr 00712540, blah_r 8f708f70 - read count count 00000008
- read addr 00712544, blah_r 8f708f70 - read count count 0000000c
- read addr 00712548, blah_r 8f708f70 - read count count 00000010
- read addr 0071254c, blah_r 8f708f70 - read count count 00000014
- read addr 00712550, blah_r 8f708f70 - read count count 00000018
- read addr 00712554, blah_r 8f708f70 - read count count 0000001c
+ read addr 0071253c, blah_r 8f708f70 - read count count 00000004
+ read addr 00712540, blah_r 8f708f70 - read count count 00000008
+ read addr 00712544, blah_r 8f708f70 - read count count 0000000c
+ read addr 00712548, blah_r 8f708f70 - read count count 00000010
+ read addr 0071254c, blah_r 8f708f70 - read count count 00000014
+ read addr 00712550, blah_r 8f708f70 - read count count 00000018
+ read addr 00712554, blah_r 8f708f70 - read count count 0000001c
*/
@@ -95,8 +95,8 @@ READ32_MEMBER(sega_315_5838_comp_device::decathlt_prot2_r)
UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int channel)
{
-// UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base();
-// UINT32 retvalue = 0xffff;
+// UINT32 *fake0 = (UINT32*)memregion( ":fake0" )->base();
+// UINT32 retvalue = 0xffff;
switch (m_channel[channel].m_srcoffset)
{
@@ -177,7 +177,7 @@ UINT32 sega_315_5838_comp_device::genericdecathlt_prot_r(UINT32 mem_mask, int ch
void sega_315_5838_comp_device::set_prot_addr(UINT32 data, UINT32 mem_mask, int channel)
{
-// printf("set_prot_addr\n");
+// printf("set_prot_addr\n");
COMBINE_DATA(&m_channel[channel].m_srcoffset);
//if (m_decathlt_part==0) logerror("%d, last read count was %06x\n",channel, m_channel[channel].m_decathlt_lastcount*4);
@@ -361,6 +361,6 @@ void sega_315_5838_comp_device::install_doa_protection()
cpu->space(AS_PROGRAM).install_readwrite_handler(0x01d80000, 0x01dfffff, read32_delegate(FUNC(sega_315_5838_comp_device::doa_prot_r), this), write32_delegate(FUNC(sega_315_5838_comp_device::doa_prot_w), this));
cpu->space(AS_PROGRAM).install_write_handler(0x01d87ff0, 0x01d87ff3, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_srcaddr_w), this)); // set compressed data source address (always set 0, data is in RAM)
cpu->space(AS_PROGRAM).install_write_handler(0x01d87ff4, 0x01d87ff7, write32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_w_doa), this)); // upload tab
-// cpu->space(AS_PROGRAM).install_read_handler(0x01d87ff8, 0x01d87ffb, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_r), this)); // read decompressed data
+// cpu->space(AS_PROGRAM).install_read_handler(0x01d87ff8, 0x01d87ffb, read32_delegate(FUNC(sega_315_5838_comp_device::decathlt_prot1_r), this)); // read decompressed data
-} \ No newline at end of file
+}
diff --git a/src/mame/machine/315-5881_crypt.c b/src/mame/machine/315-5881_crypt.c
index 153a4a50011..511ec56f2e1 100644
--- a/src/mame/machine/315-5881_crypt.c
+++ b/src/mame/machine/315-5881_crypt.c
@@ -82,7 +82,7 @@ UINT16 sega_315_5881_crypt_device::do_decrypt(UINT8 *&base)
{
if (done_compression == 1)
enc_start();
-
+
line_fill();
@@ -176,15 +176,15 @@ is given by the following function:
void key2label(uint32_t key)
{
- int bcd0 = ((BIT(key,17)<<3)|(BIT(key,7)<<2)|(BIT(key,14)<<1)|BIT(key,19))^9;
- int bcd1 = ((BIT(key,20)<<3)|(BIT(key,1)<<2)|(BIT(key,4)<<1)|BIT(key,13))^5;
- int bcd2 = (BIT(key,9)<<1)|BIT(key,22);
- int bcd3 = ((BIT(key,9)<<2)|BIT(key,9))^5;
-
- char chiplabel[13];
- sprintf(chiplabel, "317-%d%d%d%d-%s", bcd3, bcd2, bcd1, bcd0, (BIT(key,5)?"JPN":"COM"));
-
- printf("%s", chiplabel);
+ int bcd0 = ((BIT(key,17)<<3)|(BIT(key,7)<<2)|(BIT(key,14)<<1)|BIT(key,19))^9;
+ int bcd1 = ((BIT(key,20)<<3)|(BIT(key,1)<<2)|(BIT(key,4)<<1)|BIT(key,13))^5;
+ int bcd2 = (BIT(key,9)<<1)|BIT(key,22);
+ int bcd3 = ((BIT(key,9)<<2)|BIT(key,9))^5;
+
+ char chiplabel[13];
+ sprintf(chiplabel, "317-%d%d%d%d-%s", bcd3, bcd2, bcd1, bcd0, (BIT(key,5)?"JPN":"COM"));
+
+ printf("%s", chiplabel);
}
Given the use of the BCD-encoded security module labels, it's expected that at least other 6 additional bits be present in the
@@ -196,7 +196,7 @@ they be derived from other non-random sources.
In the second Feistel Network, every key bit seem to be used at most once (the various uses of current bit #9 are fictitious, as
that bit really represent various bits in the real key; see comments on the use of the labels above). Given that, it seems probable
-that the real key is 64 bits long, exactly as in the related CPS-2 scheme, and the designers tried to cover all 96 input bits with
+that the real key is 64 bits long, exactly as in the related CPS-2 scheme, and the designers tried to cover all 96 input bits with
the bits provening from the game key, the sequence key and the result from the first feistel network (64+16+16=96). In the first
Feistel Network, as only 80 bits are available, some bits would be used twice (as can be partially seen in the current implementation).
The fact that only 29 bits out of the expected 64 have been observed till now would be due to the generation of the key by composing
@@ -453,7 +453,7 @@ const sega_315_5881_crypt_device::sbox sega_315_5881_crypt_device::fn2_sboxes[4]
{
{
- 2,2,0,3,0,3,1,0,1,1,2,3,2,3,1,0,0,0,3,2,2,0,2,3,1,3,2,0,3,3,1,3,
+ 2,2,0,3,0,3,1,0,1,1,2,3,2,3,1,0,0,0,3,2,2,0,2,3,1,3,2,0,3,3,1,3,
// unused?
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
},
@@ -511,7 +511,7 @@ const sega_315_5881_crypt_device::sbox sega_315_5881_crypt_device::fn2_sboxes[4]
const int sega_315_5881_crypt_device::fn1_game_key_scheduling[FN1GK][2] = {
{1,29}, {1,71}, {2,4}, {2,54}, {3,8}, {4,56}, {4,73}, {5,11},
- {6,51}, {7,92}, {8,89}, {9,9}, {9,39}, {9,58}, {9,86}, {10,90},
+ {6,51}, {7,92}, {8,89}, {9,9}, {9,39}, {9,58}, {9,86}, {10,90},
{11,6}, {12,64}, {13,49}, {14,44}, {15,40}, {16,69}, {17,15}, {18,23},
{18,43}, {19,82}, {20,81}, {21,32}, {22,5}, {23,66}, {24,13}, {24,45},
{25,12}, {25,35}, {26,61}, {27,10}, {27,59}, {28,25}
@@ -680,7 +680,7 @@ UINT16 sega_315_5881_crypt_device::get_decrypted_16()
prot_cur_address ++;
-// printf("get_decrypted_16 %04x\n", res);
+// printf("get_decrypted_16 %04x\n", res);
return res;
}
@@ -691,10 +691,10 @@ void sega_315_5881_crypt_device::enc_start()
block_pos = 0;
done_compression = 0;
buffer_pos = BUFFER_SIZE;
-
+
if (buffer_bit2 != 15) // if we have remaining bits in the decompression buffer we shouldn't read the next word yet but should instead use the bits we have?? (twcup98) (might just be because we should be pulling bytes not words?)
{
-// printf("buffer_bit2 is %d\n", buffer_bit2);
+// printf("buffer_bit2 is %d\n", buffer_bit2);
dec_header = (buffer2a & 0x0003) << 16;
}
else
@@ -710,7 +710,7 @@ void sega_315_5881_crypt_device::enc_start()
// etc. after each block a new header must be read, it looks like compressed and uncompressed blocks
// can be mixed like this, I don't know if the length is src length of decompressed length.
// deathcox and others confirm format as 0x20000 bit as compressed bit, 0x1ff00 bits as block size 1, 0x000ff bits as block size 2
- // for compressed streams the 'line size' is block size 1.
+ // for compressed streams the 'line size' is block size 1.
block_numlines = ((dec_header & 0x000000ff) >> 0) + 1;
int blocky = ((dec_header & 0x0001ff00) >> 8) + 1;
@@ -824,8 +824,8 @@ const UINT8 sega_315_5881_crypt_device::trees[9][2][32] = {
int sega_315_5881_crypt_device::get_compressed_bit()
{
-// if(buffer_pos == BUFFER_SIZE)
-// enc_fill();
+// if(buffer_pos == BUFFER_SIZE)
+// enc_fill();
if (buffer_bit2 == 15)
{
@@ -833,7 +833,7 @@ int sega_315_5881_crypt_device::get_compressed_bit()
buffer2a = get_decrypted_16();
buffer2[0] = buffer2a;
buffer2[1] = buffer2a >> 8;
- // block_pos+=2;
+ // block_pos+=2;
buffer_pos = 0;
}
@@ -842,7 +842,7 @@ int sega_315_5881_crypt_device::get_compressed_bit()
buffer_bit2++;
}
-// if (buffer_bit ==7) printf("using byte %02x\n", buffer2[(buffer_pos&1) ^ 1]);
+// if (buffer_bit ==7) printf("using byte %02x\n", buffer2[(buffer_pos&1) ^ 1]);
int res = (buffer2[(buffer_pos&1)^1] >> buffer_bit) & 1;
buffer_bit--;
diff --git a/src/mame/machine/dec0.c b/src/mame/machine/dec0.c
index 0b5476453a0..7f23cb4ca21 100644
--- a/src/mame/machine/dec0.c
+++ b/src/mame/machine/dec0.c
@@ -364,7 +364,7 @@ DRIVER_INIT_MEMBER(dec0_state,hippodrm)
RAM[0x1af] = 0x60; /* RTS prot area */
RAM[0x1db] = 0x60; /* RTS prot area */
RAM[0x21a] = 0x60; /* RTS prot area */
-
+
save_item(NAME(m_hippodrm_msb));
save_item(NAME(m_hippodrm_lsb));
}
@@ -377,7 +377,7 @@ DRIVER_INIT_MEMBER(dec0_state,slyspy)
/* Slyspy sound cpu has some protection */
RAM[0xf2d] = 0xea;
RAM[0xf2e] = 0xea;
-
+
save_item(NAME(m_slyspy_state));
}
diff --git a/src/mame/machine/stfight.c b/src/mame/machine/stfight.c
index a55d45e2f6e..426afcbfcc0 100644
--- a/src/mame/machine/stfight.c
+++ b/src/mame/machine/stfight.c
@@ -63,7 +63,7 @@ DRIVER_INIT_MEMBER(stfight_state,empcity)
( ( ( src ^ A ) >> 1 ) & 0x08 ) |
( ~( ( src >> 6 ) ^ A ) & 0x01 );
}
-
+
}
DRIVER_INIT_MEMBER(stfight_state,stfight)
diff --git a/src/mame/machine/stvprot.c b/src/mame/machine/stvprot.c
index 4513c9de06d..c1c1759340e 100644
--- a/src/mame/machine/stvprot.c
+++ b/src/mame/machine/stvprot.c
@@ -39,8 +39,8 @@ READ32_MEMBER( stv_state::common_prot_r )
UINT16 res2 = m_cryptdevice->do_decrypt(base);
res = ((res & 0xff00) >> 8) | ((res & 0x00ff) << 8);
res2 = ((res2 & 0xff00) >> 8) | ((res2 & 0x00ff) << 8);
-
- return res2 | (res << 16);
+
+ return res2 | (res << 16);
}
return m_a_bus[offset];
}
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 51368530e76..0226b4b102c 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -209,7 +209,7 @@ batman2 // bootleg
warofbug // (c) 1981 Armenia
warofbugu // (c) 1981 Armenia
warofbugg // German Version
-spactrai //
+spactrai //
redufo // (c) Artic
redufob // bootleg
exodus // Subelectro - bootleg?
@@ -2679,7 +2679,7 @@ snowbrosj // MIN16-02 (c) 1990 Toaplan
snowbrosd // MIN16-02 (c) 1990 Toaplan + Dooyong license
wintbob // bootleg
snowbroswb //
-toto //
+toto //
// modified snowbros 'clone' hardware
honeydol // (c) 1995 Barko Corp
twinadv // (c) 1995 Barko Corp
@@ -3414,7 +3414,7 @@ ddsomur1 // 09/02/1996 (c) 1996 (USA)
ddsomjr1 // 06/02/1996 (c) 1996 (Japan)
ddsomj // 19/06/1996 (c) 1996 (Japan)
ddsoma // 19/06/1996 (c) 1996 (Asia)
-ddsomar1 // 08/02/1996 (c) 1996 (Asia)
+ddsomar1 // 08/02/1996 (c) 1996 (Asia)
ddsomh // 23/02/1996 (c) 1996 (Hispanic)
ddsomb // 23/02/1996 (c) 1996 (Brazil)
sfa2 // 06/03/1996 (c) 1996 (Euro)
@@ -5381,7 +5381,7 @@ wwfroyal // 2000.11 WWF Royal Rumble
sprtjam // 2000.11.13 Sports Jam
pjustic // 2000.12 Moero Justice Gakuen / Project Justice
samba2k // 2000.12 Samba de Amigo Ver.2000
-shaktam // 2000.12.28 Shakatto Tambourine (Rev B)
+shaktam // 2000.12.28 Shakatto Tambourine (Rev B)
// 2000.?? Boat Race Ocean Heats
csmash // 2000.?? Cosmic Smash
csmasho // 2000.?? Cosmic Smash (original)
@@ -6710,7 +6710,7 @@ bmfinal // GXC01 (c) 2002 (Japan)
popn1 // GX803 (c) 1998 (Asia)
//popn1j // GX803 (c) 1998 (Japan)
popn2 // GX831 (c) 1998 (Japan)
-popn3 // GX980 (c) 1999 (Japan)
+popn3 // GX980 (c) 1999 (Japan)
//popnstex // GX970 (c) 1999 (Japan)
// Firebeat games
@@ -6964,7 +6964,7 @@ quantum // 136016 (c) 1982 // made by Gencomp
quantum1 // 136016 (c) 1982 // made by Gencomp
quantump // 136016 (c) 1982 // made by Gencomp
bwidow // 136017 (c) 1982
-bwidowp // (proto) (c) 1982
+bwidowp // (proto) (c) 1982
starwars // 136021 (c) 1983
starwars1 // 136021 (c) 1983
starwarso // 136021 (c) 1983
diff --git a/src/mame/video/eolith.c b/src/mame/video/eolith.c
index 19f633f6006..3dad1367816 100644
--- a/src/mame/video/eolith.c
+++ b/src/mame/video/eolith.c
@@ -33,7 +33,7 @@ READ32_MEMBER(eolith_state::eolith_vram_r)
VIDEO_START_MEMBER(eolith_state,eolith)
{
m_vram = auto_alloc_array(machine(), UINT32, 0x40000*2/4);
- save_pointer(NAME(m_vram), 0x40000*2/4);
+ save_pointer(NAME(m_vram), 0x40000*2/4);
save_item(NAME(m_buffer));
}
diff --git a/src/mame/video/gp9001.c b/src/mame/video/gp9001.c
index e5b0ee0c7a4..bdf509d6517 100644
--- a/src/mame/video/gp9001.c
+++ b/src/mame/video/gp9001.c
@@ -175,7 +175,7 @@ DEVICE_ADDRESS_MAP_START( map, 16, gp9001vdp_device )
AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(gp9001_fg_tmap_w) AM_SHARE("vram_fg")
AM_RANGE(0x2000, 0x2fff) AM_RAM_WRITE(gp9001_top_tmap_w) AM_SHARE("vram_top")
AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram") AM_MIRROR(0x0800)
-// AM_RANGE(0x3800, 0x3fff) AM_RAM // sprite mirror?
+// AM_RANGE(0x3800, 0x3fff) AM_RAM // sprite mirror?
ADDRESS_MAP_END
diff --git a/src/mame/video/pastelg.c b/src/mame/video/pastelg.c
index ea66f484374..5460e2efbc2 100644
--- a/src/mame/video/pastelg.c
+++ b/src/mame/video/pastelg.c
@@ -283,7 +283,7 @@ void pastelg_state::video_start()
int height = m_screen->height();
m_videoram = auto_alloc_array_clear(machine(), UINT8, width * height);
-
+
save_item(NAME(m_blitter_desty));
save_item(NAME(m_blitter_sizex));
save_item(NAME(m_blitter_sizey));
diff --git a/src/mame/video/taitoair.c b/src/mame/video/taitoair.c
index fa8603da3f3..1b2195f0b93 100644
--- a/src/mame/video/taitoair.c
+++ b/src/mame/video/taitoair.c
@@ -230,14 +230,14 @@ void taitoair_state::fill_slope( bitmap_ind16 &bitmap, const rectangle &cliprect
int xx2 = x2 >> TAITOAIR_FRAC_SHIFT;
int grad_col;
int base_color;
-
+
if (xx1 <= cliprect.max_x || xx2 >= cliprect.min_x)
{
if (xx1 < cliprect.min_x)
xx1 = cliprect.min_x;
if (xx2 > cliprect.max_x)
xx2 = cliprect.max_x;
-
+
if(color & 0x40)
{
/* Non-terrain elements are colored with this. */
diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c
index 70f246ea999..bf523eda781 100644
--- a/src/mame/video/tia.c
+++ b/src/mame/video/tia.c
@@ -430,7 +430,7 @@ void tia_video_device::device_start()
helper[0] = auto_bitmap_ind16_alloc(machine(), cx, TIA_MAX_SCREEN_HEIGHT);
helper[1] = auto_bitmap_ind16_alloc(machine(), cx, TIA_MAX_SCREEN_HEIGHT);
helper[2] = auto_bitmap_ind16_alloc(machine(), cx, TIA_MAX_SCREEN_HEIGHT);
-
+
register_save_state();
}
diff --git a/src/mame/video/tia.h b/src/mame/video/tia.h
index 4dcf107977d..545a3898aca 100644
--- a/src/mame/video/tia.h
+++ b/src/mame/video/tia.h
@@ -199,7 +199,7 @@ private:
bitmap_ind16 *helper[3];
UINT16 screen_height;
-
+
void register_save_state();
};
diff --git a/src/mess/drivers/a2600.c b/src/mess/drivers/a2600.c
index 44a94ebd043..4cd6f991f77 100644
--- a/src/mess/drivers/a2600.c
+++ b/src/mess/drivers/a2600.c
@@ -316,7 +316,7 @@ MACHINE_START_MEMBER(a2600_state,a2600)
/* Banks may have changed, reset the cpu so it uses the correct reset vector */
m_maincpu->reset();
-
+
save_item(NAME(m_current_screen_height));
}
diff --git a/src/mess/drivers/banctec.c b/src/mess/drivers/banctec.c
index b4710668719..c69df794909 100644
--- a/src/mess/drivers/banctec.c
+++ b/src/mess/drivers/banctec.c
@@ -59,7 +59,7 @@ UINT32 banctec_state::screen_update_banctec(screen_device &screen, bitmap_ind16
MC6845_ON_UPDATE_ADDR_CHANGED(banctec_state::crtc_addr)
{
- /* What is this function meant to do ? */
+ /* What is this function meant to do ? */
}
/******************************
@@ -103,7 +103,7 @@ static MACHINE_CONFIG_START( banctec, banctec_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", banctec)
MCFG_PALETTE_ADD("palette", 2)
-// MCFG_PALETTE_INIT_OWNER(banctec_state, banctec)
+// MCFG_PALETTE_INIT_OWNER(banctec_state, banctec)
MCFG_MC6845_ADD("crtc", R6545_1, "screen", XTAL_20MHz) /* (?) */
MCFG_MC6845_SHOW_BORDER_AREA(false)
diff --git a/src/mess/drivers/cat.c b/src/mess/drivers/cat.c
index d5e51e66185..27543b3f780 100644
--- a/src/mess/drivers/cat.c
+++ b/src/mess/drivers/cat.c
@@ -223,7 +223,7 @@ J4: 18-pin sip header for keyboard ribbon cable; bottom edge of board is pin 1
Pins:
1: GND through 220k resistor r78
2: ? phone hook related? anode of diode d7; one of the pins of relay k2; topmost (boardwise) pin of transistor Q10
- 3: 74HCT34 pin
+ 3: 74HCT34 pin
J5: locking-tab-type "CONN HEADER VERT 4POS .100 TIN" connector for supplying power
through a small cable with a berg connector at the other end, to the floppy drive
@@ -240,7 +240,7 @@ J9: unpopulated DIL 40-pin straight connector for a ROM debug/expansion/RAM-shad
/HICE is !a15
/ROM_OE comes from pin 14 of DECODE_E pal, and is shorted to /ROM_OE' by the cuttable jumper B1 which is not cut
/ROM_OE' goes to the two EPROMS
- DECODE_18 is DECODE_E pal pin 18
+ DECODE_18 is DECODE_E pal pin 18
pin 1 (GND) is in the lower left and the pins count low-high then to the right
(gnd N/C E_CLK R/W /ROM_OE a17 vcc a14 a13 a8 a9 a11 /ROM_OE' a10 a15 d7 d6 d5 d4 d3 )
(GND /IPL1 DECODE_18 /RESET gnd a16 vcc a12 a7 a6 a5 a4 a3 a2 a1 a0 d0 d1 d2 gnd)
@@ -369,10 +369,10 @@ ToDo:
// pin 13 (PB3) :
// pin 14 (PB4) :
// pin 15 (PB5) :
-// pin 16 (PB6) :
+// pin 16 (PB6) :
// pin 17 (PB7) :
-// pin 18 (CB1) : ?from/to? Floppy connector j3 pin 8
-// pin 19 (CB2) : ?from/to? 6522 @ u35 pin 16 (PB6)
+// pin 18 (CB1) : ?from/to? Floppy connector j3 pin 8
+// pin 19 (CB2) : ?from/to? 6522 @ u35 pin 16 (PB6)
// pin 21 (/IRQ) : out to 68008 /IPL1 pin 41
// pin 22 (R/W) : in from 68008 R/W pin 30
// pin 23 (/CS2) : in from DECODE E pin 18
@@ -384,7 +384,7 @@ ToDo:
// pin 39 (CA2) is through inductor L11 and resistor r128 to peripheral connector pin 35 <end minus 26>
// pin 40 (CA1) is through inductor L30 and resistor r138 to peripheral connector pin 53 <end minus 8>
-// 6522 @ u35
+// 6522 @ u35
// pin 2 (PA0) :
// pin 3 (PA1) :
// pin 4 (PA2) :
@@ -421,9 +421,9 @@ ToDo:
// pin 4 (Y2) : out to 6522 @u35 pin 11
// pin 5 (A2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?>
// pin 6 (B2) : in from 4N37 @ u48 pin 5 (output side emitter pin) (tied via R189 to gnd) <ring indicator?>
-// pin 8 (B3) :
-// pin 9 (A3) :
-// pin 10 (Y3) :
+// pin 8 (B3) :
+// pin 9 (A3) :
+// pin 10 (Y3) :
// pin 11 (B4) : in from 68008 A15
// pin 12 (A4) : in from 68008 A15
// pin 13 (Y4) : out to EPROM @ U31 /CE
@@ -1743,7 +1743,7 @@ ROM_START( swyft )
* ||||\-------------Q? ?
* |||\--------------Q? ?
* ||\---------------Q> output to decode pal pin 2
- * |\----------------->? output? to ram multiplexer 'A' pins
+ * |\----------------->? output? to ram multiplexer 'A' pins
* \------------------< ?
*/
ROM_LOAD( "timing_b.ampal16r4a.u9.jed", 0x0000, 0xb08, CRC(643e6e83) SHA1(7db167883f9d6cf385ce496d08976dc16fc3e2c3))
diff --git a/src/mess/drivers/gamate.c b/src/mess/drivers/gamate.c
index cc18fa3ba98..3e0480b3d4f 100644
--- a/src/mess/drivers/gamate.c
+++ b/src/mess/drivers/gamate.c
@@ -20,7 +20,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_cart(*this, "cartslot")
-#ifdef USE_GFX
+#ifdef USE_GFX
, m_gfxdecode(*this, "gfxdecode")
#endif
, m_io_joy(*this, "JOY")
@@ -53,25 +53,25 @@ private:
struct
{
- UINT8 reg[8];
- struct {
- bool write;
- bool page2; // else page1
+ UINT8 reg[8];
+ struct {
+ bool write;
+ bool page2; // else page1
UINT8 ypos, xpos/*tennis*/;
- UINT8 data[2][0x100][0x20];
- } bitmap;
- UINT8 x, y;
+ UINT8 data[2][0x100][0x20];
+ } bitmap;
+ UINT8 x, y;
bool y_increment;
} video;
struct {
- bool set;
+ bool set;
int bit_shifter;
UINT8 cartridge_byte;
UINT16 address; // in reality something more like short local cartridge address offset
bool unprotected;
bool failed;
-
+
} card_protection;
required_device<cpu_device> m_maincpu;
@@ -84,14 +84,14 @@ private:
required_shared_ptr<UINT8> m_bios;
emu_timer *timer1;
emu_timer *timer2;
- UINT8 bank_multi;
+ UINT8 bank_multi;
UINT8 *m_cart_ptr;
};
WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
{
- logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
-
+ logerror("%.6f protection write %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, data, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
+
switch (offset) {
case 0:
card_protection.failed= card_protection.failed || ((card_protection.cartridge_byte&0x80)!=0) != ((data&4)!=0);
@@ -105,11 +105,10 @@ WRITE8_MEMBER( gamate_state::gamate_cart_protection_w )
}
READ8_MEMBER( gamate_state::gamate_cart_protection_r )
{
-
- UINT8 ret=1;
- if (card_protection.bit_shifter==7 && card_protection.unprotected) {
- ret=m_cart_ptr[bank_multi*0x4000];
- } else {
+ UINT8 ret=1;
+ if (card_protection.bit_shifter==7 && card_protection.unprotected) {
+ ret=m_cart_ptr[bank_multi*0x4000];
+ } else {
card_protection.bit_shifter++;
if (card_protection.bit_shifter==8) {
card_protection.bit_shifter=0;
@@ -118,62 +117,62 @@ READ8_MEMBER( gamate_state::gamate_cart_protection_r )
}
ret=(card_protection.cartridge_byte&0x80)?2:0;
if (card_protection.bit_shifter==7 && !card_protection.failed) { // now protection chip on cartridge activates cartridge chip select on cpu accesses
-// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working
+// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r)); // next time I will try to get this working
}
card_protection.cartridge_byte<<=1;
- }
- logerror("%.6f protection read %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, ret, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
- return ret;
+ }
+ logerror("%.6f protection read %x %x address:%x data:%x shift:%d\n",machine().time().as_double(), offset, ret, card_protection.address, card_protection.cartridge_byte, card_protection.bit_shifter);
+ return ret;
}
READ8_MEMBER( gamate_state::protection_r ) { return card_protection.set? 3: 1; } // bits 0 and 1 checked
WRITE8_MEMBER( gamate_state::protection_reset )
{
- // writes 0x20
- card_protection.address=0x6005-0x6001;
- card_protection.bit_shifter=0;
- card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];//m_cart_rom[card_protection.address++];
- card_protection.failed=false;
- card_protection.unprotected=false;
+ // writes 0x20
+ card_protection.address=0x6005-0x6001;
+ card_protection.bit_shifter=0;
+ card_protection.cartridge_byte=m_cart_ptr[card_protection.address++];//m_cart_rom[card_protection.address++];
+ card_protection.failed=false;
+ card_protection.unprotected=false;
}
READ8_MEMBER( gamate_state::newer_protection_set )
{
- card_protection.set=true;
- return 0;
+ card_protection.set=true;
+ return 0;
}
WRITE8_MEMBER( gamate_state::gamate_video_w )
{
- video.reg[offset]=data;
- switch (offset) {
- case 1: video.bitmap.write=data&0xc0; // more addressing mode
+ video.reg[offset]=data;
+ switch (offset) {
+ case 1: video.bitmap.write=data&0xc0; // more addressing mode
video.y_increment=data&0x40;
break;
case 2: video.bitmap.xpos=data;break; // at least 7 bits
case 3: video.bitmap.ypos=data;break; // at least 7 bits
- case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
- case 5: video.y=data;break;
- case 7:
- if (video.bitmap.write) {
- if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
- video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
- else
- logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
- } else {
- video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
- }
- if (video.y_increment) video.y++;
+ case 4: video.bitmap.page2=data&0x80;video.x=data&0x7f;break;
+ case 5: video.y=data;break;
+ case 7:
+ if (video.bitmap.write) {
+ if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
+ video.bitmap.data[video.bitmap.page2][video.y][video.x]=data;
+ else
+ logerror("%.6f %04x video bitmap x %x invalid\n",machine().time().as_double(), m_maincpu->pc(), video.x);
+ } else {
+ video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)]=data;
+ }
+ if (video.y_increment) video.y++;
else video.x++;
- }
+ }
}
WRITE8_MEMBER( gamate_state::cart_bankswitchmulti_w )
{
- bank_multi=data;
- membank("bankmulti")->set_base(m_cart_ptr+0x4000*data+1);
+ bank_multi=data;
+ membank("bankmulti")->set_base(m_cart_ptr+0x4000*data+1);
}
WRITE8_MEMBER( gamate_state::cart_bankswitch_w )
@@ -184,55 +183,55 @@ WRITE8_MEMBER( gamate_state::cart_bankswitch_w )
READ8_MEMBER( gamate_state::gamate_video_r )
{
if (offset!=6) return 0;
- UINT8 data=0;
- if (video.bitmap.write) {
- if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
- data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
- else
- logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
- } else {
- data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
- }
- if (m_maincpu->pc()<0xf000)
- logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
- return data;
+ UINT8 data=0;
+ if (video.bitmap.write) {
+ if (video.x<ARRAY_LENGTH(video.bitmap.data[0][0]) /*&& video.y<ARRAY_LENGTH(video.bitmap.data[0])*/)
+ data=video.bitmap.data[video.bitmap.page2][video.y][video.x];
+ else
+ logerror("%.6f video bitmap x %x invalid\n",machine().time().as_double(),video.x);
+ } else {
+ data=video.bitmap.data[0][video.y][video.x&(ARRAY_LENGTH(video.bitmap.data[0][0])-1)];
+ }
+ if (m_maincpu->pc()<0xf000)
+ logerror("%.6f video read %04x %02x\n",machine().time().as_double(),offset, data);
+ return data;
}
WRITE8_MEMBER( gamate_state::gamate_audio_w )
{
- logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
+ logerror("%.6f %04x audio write %04x %02x\n",machine().time().as_double(),m_maincpu->pc(),offset,data);
}
READ8_MEMBER( gamate_state::gamate_audio_r )
{
- logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
+ logerror("%.6f %04x audio read %04x \n",machine().time().as_double(),m_maincpu->pc(),offset);
return 0;
}
READ8_MEMBER( gamate_state::gamate_pad_r )
{
- UINT8 data=m_io_joy->read();
- return data;
+ UINT8 data=m_io_joy->read();
+ return data;
}
static ADDRESS_MAP_START( gamate_mem, AS_PROGRAM, 8, gamate_state )
- AM_RANGE(0x0000, 0x03ff) AM_RAM
- AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
- AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
- AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
- AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set)
- AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset)
- AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
+ AM_RANGE(0x0000, 0x03ff) AM_RAM
+ AM_RANGE(0x4000, 0x400d) AM_READWRITE(gamate_audio_r, gamate_audio_w)
+ AM_RANGE(0x4400, 0x4400) AM_READ(gamate_pad_r)
+ AM_RANGE(0x5000, 0x5007) AM_READWRITE(gamate_video_r, gamate_video_w)
+ AM_RANGE(0x5800, 0x5800) AM_READ(newer_protection_set)
+ AM_RANGE(0x5900, 0x5900) AM_WRITE(protection_reset)
+ AM_RANGE(0x5a00, 0x5a00) AM_READ(protection_r)
- AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti")
- AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
+ AM_RANGE(0x6001, 0x9fff) AM_READ_BANK("bankmulti")
+ AM_RANGE(0xa000, 0xdfff) AM_READ_BANK("bank")
AM_RANGE(0x6000, 0x6000) AM_READWRITE(gamate_cart_protection_r, gamate_cart_protection_w)
AM_RANGE(0x8000, 0x8000) AM_WRITE(cart_bankswitchmulti_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(cart_bankswitch_w)
- AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
+ AM_RANGE(0xf000, 0xffff) AM_ROM AM_SHARE("bios")
ADDRESS_MAP_END
@@ -251,30 +250,30 @@ INPUT_PORTS_END
#ifdef USE_GFX
static const struct gfx_layout gamate_charlayout =
{
- 4, /* width of object */
- 1, /* height of object */
- 256,/* 256 characters */
- 2, /* bits per pixel */
- { 0,4 }, /* no bitplanes */
- /* x offsets */
- { 0,1,2,3 },
- /* y offsets */
- { 0 },
- 8*1 /* size of 1 object in bits */
+ 4, /* width of object */
+ 1, /* height of object */
+ 256,/* 256 characters */
+ 2, /* bits per pixel */
+ { 0,4 }, /* no bitplanes */
+ /* x offsets */
+ { 0,1,2,3 },
+ /* y offsets */
+ { 0 },
+ 8*1 /* size of 1 object in bits */
};
static GFXDECODE_START( gamate )
- GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
+ GFXDECODE_ENTRY( "gfx1", 0x0000, gamate_charlayout, 0, 0x100 )
GFXDECODE_END
#endif
/* palette in red, green, blue tribles */
static const unsigned char gamate_colors[4][3] =
{
- { 255,255,255 },
- { 0xa0, 0xa0, 0xa0 },
- { 0x60, 0x60, 0x60 },
- { 0, 0, 0 }
+ { 255,255,255 },
+ { 0xa0, 0xa0, 0xa0 },
+ { 0x60, 0x60, 0x60 },
+ { 0, 0, 0 }
};
PALETTE_INIT_MEMBER(gamate_state, gamate)
@@ -299,21 +298,21 @@ static void BlitPlane(UINT16* line, UINT8 plane1, UINT8 plane2)
UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- int x, y, j;
- for (y=0;y<152;y++) {
- for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {
- UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
- UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
+ int x, y, j;
+ for (y=0;y<152;y++) {
+ for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) {
+ UINT8 d1=video.bitmap.data[0][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
+ UINT8 d2=video.bitmap.data[1][(y+video.bitmap.ypos)&0xff][(j+video.bitmap.xpos/8)&0x1f];
#ifdef USE_GFX
- m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1&0xf)|((d2&0xf)<<4), 0,0,0,x+4,y);
+ m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1&0xf)|((d2&0xf)<<4), 0,0,0,x+4,y);
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, (d1>>4)|(d2&0xf0),0,0,0,x,y);
#else
- BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
- BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
-#endif
- }
- }
- return 0;
+ BlitPlane(&bitmap.pix16(y, x+4), d1, d2);
+ BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4);
+#endif
+ }
+ }
+ return 0;
}
DRIVER_INIT_MEMBER(gamate_state,gamate)
@@ -322,7 +321,7 @@ DRIVER_INIT_MEMBER(gamate_state,gamate)
#ifdef USE_GFX
UINT8 *gfx=memregion("gfx1")->base();
for (int i=0; i<256; i++) gfx[i]=i;
-#endif
+#endif
timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer),this));
timer2 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gamate_state::gamate_timer2),this));
}
@@ -332,12 +331,12 @@ void gamate_state::machine_start()
{
m_cart_ptr = memregion("maincpu")->base() + 0x6000;
if (m_cart->exists()) {
-// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
+// m_maincpu->space(AS_PROGRAM).install_read_handler(0x6000, 0x6000, READ8_DELEGATE(gamate_state, gamate_cart_protection_r));
m_cart_ptr = m_cart->get_rom_base();
membank("bankmulti")->set_base(m_cart->get_rom_base()+1);
membank("bank")->set_base(m_cart->get_rom_base()+0x4000); // bankswitched games in reality no offset
}
-// m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback
+// m_bios[0xdf1]=0xea; m_bios[0xdf2]=0xea; // default bios: $47 protection readback
card_protection.set=false;
bank_multi=0;
card_protection.unprotected=false;
@@ -390,7 +389,7 @@ static MACHINE_CONFIG_START( gamate, gamate_state )
#ifdef USE_GFX
MCFG_GFXDECODE_ADD("gfxdecode", "palette", gamate )
-#endif
+#endif
MCFG_PALETTE_ADD("palette", ARRAY_LENGTH(gamate_colors))
MCFG_PALETTE_INIT_OWNER(gamate_state, gamate)
MCFG_DEFAULT_LAYOUT(layout_lcd)
@@ -408,13 +407,11 @@ ROM_START(gamate)
ROMX_LOAD("gamate_bios_umc.bin", 0xf000, 0x1000, CRC(07090415) SHA1(ea449dc607601f9a68d855ad6ab53800d2e99297), ROM_BIOS(1) )
ROM_SYSTEM_BIOS(1, "newer", "NEWER")
ROMX_LOAD("gamate_bios_9130__unknown__bit_icasc00001_9130-bs_r32261.bin", 0xf000, 0x1000, CRC(03a5f3a7) SHA1(4e9dfbfe916ca485530ef4221593ab68738e2217), ROM_BIOS(2) )
-#ifdef USE_GFX
+#ifdef USE_GFX
ROM_REGION(0x100,"gfx1", ROMREGION_ERASEFF)
-#endif
+#endif
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */
CONS( 19??, gamate, 0, 0, gamate, gamate, gamate_state, gamate, "Bit Corp", "Gamate", GAME_NO_SOUND)
-
-
diff --git a/src/mess/drivers/hp16500.c b/src/mess/drivers/hp16500.c
index 158cc05e8a2..ea9f58d37a6 100644
--- a/src/mess/drivers/hp16500.c
+++ b/src/mess/drivers/hp16500.c
@@ -19,7 +19,7 @@
MC68000 @ 10 MHz
MC68A45 CRTC
Z0765A08PSC floppy controller (NEC765 type)
- TMS9914A GPIB bus interface
+ TMS9914A GPIB bus interface
SCN2661 DUART/timer
16500b:
@@ -50,10 +50,10 @@
#include "video/mc6845.h"
#include "machine/mc68681.h"
-#define MAINCPU_TAG "maincpu"
-#define CRTC_TAG "crtc"
-#define SCREEN_TAG "screen"
-#define DUART_TAG "duart"
+#define MAINCPU_TAG "maincpu"
+#define CRTC_TAG "crtc"
+#define SCREEN_TAG "screen"
+#define DUART_TAG "duart"
class hp16500_state : public driver_device
{
diff --git a/src/mess/drivers/hp9k_3xx.c b/src/mess/drivers/hp9k_3xx.c
index 5996047b29a..f79f09b94c1 100644
--- a/src/mess/drivers/hp9k_3xx.c
+++ b/src/mess/drivers/hp9k_3xx.c
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:R. Belmont
/***************************************************************************
-
+
hp9k3xx.c: preliminary driver for HP9000 300 Series (aka HP9000/3xx)
Currently supporting:
@@ -16,20 +16,20 @@
MC68881 FPU
330:
- MC68020 CPU @ 16.67 MHz
- MC68851 MMU
- MC68881 FPU
+ MC68020 CPU @ 16.67 MHz
+ MC68851 MMU
+ MC68881 FPU
340:
MC68030 CPU @ 16.67 MHz w/built-in MMU
- MC68881 FPU
+ MC68881 FPU
380:
MC68040 CPU @ 25 MHz w/built-in MMU and FPU
382:
MC68040 CPU @ 25? MHz w/built-in MMU and FPU
- Built-in VGA compatible video
+ Built-in VGA compatible video
All models have an MC6840 PIT on IRQ6 clocked at 250 kHz.
@@ -132,28 +132,28 @@ UINT32 hp9k3xx_state::hp98544_update(screen_device &screen, bitmap_rgb32 &bitmap
// shared mappings for all 9000/3xx systems
static ADDRESS_MAP_START(hp9k3xx_common, AS_PROGRAM, 32, hp9k3xx_state)
- AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP // writes to 1fffc are the LED
+ AM_RANGE(0x00000000, 0x0001ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP // writes to 1fffc are the LED
- AM_RANGE(0x00500000, 0x0050000f) AM_RAM // this is sufficient to pass the DMA test for now
+ AM_RANGE(0x00500000, 0x0050000f) AM_RAM // this is sufficient to pass the DMA test for now
- AM_RANGE(0x00510000, 0x00510003) AM_READWRITE(buserror_r, buserror_w) // no "Alpha display"
- AM_RANGE(0x00538000, 0x00538003) AM_READWRITE(buserror_r, buserror_w) // no "Graphics"
- AM_RANGE(0x005c0000, 0x005c0003) AM_READWRITE(buserror_r, buserror_w) // no add-on FP coprocessor
+ AM_RANGE(0x00510000, 0x00510003) AM_READWRITE(buserror_r, buserror_w) // no "Alpha display"
+ AM_RANGE(0x00538000, 0x00538003) AM_READWRITE(buserror_r, buserror_w) // no "Graphics"
+ AM_RANGE(0x005c0000, 0x005c0003) AM_READWRITE(buserror_r, buserror_w) // no add-on FP coprocessor
AM_RANGE(0x005f8000, 0x005f800f) AM_DEVREADWRITE8(PTM6840_TAG, ptm6840_device, read, write, 0x00ff00ff)
ADDRESS_MAP_END
// 9000/310 - has onboard video that the graphics card used in other 3xxes conflicts with
static ADDRESS_MAP_START(hp9k310_map, AS_PROGRAM, 16, hp9k3xx_state)
- AM_RANGE(0x000000, 0x01ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP // writes to 1fffc are the LED
+ AM_RANGE(0x000000, 0x01ffff) AM_ROM AM_REGION("maincpu",0) AM_WRITENOP // writes to 1fffc are the LED
- AM_RANGE(0x510000, 0x510003) AM_READWRITE(buserror16_r, buserror16_w) // no "Alpha display"
- AM_RANGE(0x538000, 0x538003) AM_READWRITE(buserror16_r, buserror16_w) // no "Graphics"
- AM_RANGE(0x5c0000, 0x5c0003) AM_READWRITE(buserror16_r, buserror16_w) // no add-on FP coprocessor
+ AM_RANGE(0x510000, 0x510003) AM_READWRITE(buserror16_r, buserror16_w) // no "Alpha display"
+ AM_RANGE(0x538000, 0x538003) AM_READWRITE(buserror16_r, buserror16_w) // no "Graphics"
+ AM_RANGE(0x5c0000, 0x5c0003) AM_READWRITE(buserror16_r, buserror16_w) // no add-on FP coprocessor
AM_RANGE(0x5f8000, 0x5f800f) AM_DEVREADWRITE8(PTM6840_TAG, ptm6840_device, read, write, 0x00ff)
- AM_RANGE(0x200000, 0x2fffff) AM_RAM AM_SHARE("vram16") // 98544 mono framebuffer
- AM_RANGE(0x560000, 0x563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
+ AM_RANGE(0x200000, 0x2fffff) AM_RAM AM_SHARE("vram16") // 98544 mono framebuffer
+ AM_RANGE(0x560000, 0x563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
AM_RANGE(0x700000, 0x7fffff) AM_READWRITE(buserror16_r, buserror16_w)
AM_RANGE(0x800000, 0xffffff) AM_RAM
@@ -161,8 +161,8 @@ ADDRESS_MAP_END
// 9000/320
static ADDRESS_MAP_START(hp9k320_map, AS_PROGRAM, 32, hp9k3xx_state)
- AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
- AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
+ AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
+ AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
AM_RANGE(0xffe00000, 0xffefffff) AM_READWRITE(buserror_r, buserror_w)
AM_RANGE(0xfff00000, 0xffffffff) AM_RAM
@@ -172,8 +172,8 @@ ADDRESS_MAP_END
// 9000/330 and 9000/340
static ADDRESS_MAP_START(hp9k330_map, AS_PROGRAM, 32, hp9k3xx_state)
- AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
- AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
+ AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
+ AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
AM_RANGE(0xffb00000, 0xffbfffff) AM_READWRITE(buserror_r, buserror_w)
AM_RANGE(0xffc00000, 0xffffffff) AM_RAM
@@ -183,8 +183,8 @@ ADDRESS_MAP_END
// 9000/370 - 8 MB RAM standard
static ADDRESS_MAP_START(hp9k370_map, AS_PROGRAM, 32, hp9k3xx_state)
- AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
- AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
+ AM_RANGE(0x00200000, 0x002fffff) AM_RAM AM_SHARE("vram") // 98544 mono framebuffer
+ AM_RANGE(0x00560000, 0x00563fff) AM_ROM AM_REGION("graphics", 0x0000) // 98544 mono ROM
AM_RANGE(0xff700000, 0xff7fffff) AM_READWRITE(buserror_r, buserror_w)
AM_RANGE(0xff800000, 0xffffffff) AM_RAM
@@ -292,7 +292,7 @@ static MACHINE_CONFIG_START( hp9k310, hp9k3xx_state )
MCFG_CPU_PROGRAM_MAP(hp9k310_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -308,7 +308,7 @@ static MACHINE_CONFIG_START( hp9k320, hp9k3xx_state )
MCFG_CPU_PROGRAM_MAP(hp9k320_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -324,7 +324,7 @@ static MACHINE_CONFIG_START( hp9k330, hp9k3xx_state )
MCFG_CPU_PROGRAM_MAP(hp9k330_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -340,7 +340,7 @@ static MACHINE_CONFIG_START( hp9k340, hp9k3xx_state )
MCFG_CPU_PROGRAM_MAP(hp9k330_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -356,7 +356,7 @@ static MACHINE_CONFIG_START( hp9k370, hp9k3xx_state )
MCFG_CPU_PROGRAM_MAP(hp9k370_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -368,11 +368,11 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( hp9k380, hp9k3xx_state )
/* basic machine hardware */
- MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000) // 25 MHz? 33?
+ MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000) // 25 MHz? 33?
MCFG_CPU_PROGRAM_MAP(hp9k330_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -384,11 +384,11 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_START( hp9k382, hp9k3xx_state )
/* basic machine hardware */
- MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000) // 25 MHz? 33?
+ MCFG_CPU_ADD(MAINCPU_TAG, M68040, 25000000) // 25 MHz? 33?
MCFG_CPU_PROGRAM_MAP(hp9k382_map)
MCFG_DEVICE_ADD(PTM6840_TAG, PTM6840, 0)
- MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
+ MCFG_PTM6840_INTERNAL_CLOCK(250000.0f) // from oscillator module next to the 6840
MCFG_PTM6840_EXTERNAL_CLOCKS(250000.0f, 250000.0f, 250000.0f)
MCFG_SCREEN_ADD( "screen", RASTER)
@@ -400,12 +400,12 @@ MACHINE_CONFIG_END
ROM_START( hp9k310 )
ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
- ROM_LOAD16_BYTE( "1818-3771.bin", 0x000001, 0x008000, CRC(b9e4e3ad) SHA1(ed6f1fad94a15d95362701dbe124b52877fc3ec4) )
- ROM_LOAD16_BYTE( "1818-3772.bin", 0x000000, 0x008000, CRC(a3665919) SHA1(ec1bc7e5b7990a1b09af947a06401e8ed3cb0516) )
+ ROM_LOAD16_BYTE( "1818-3771.bin", 0x000001, 0x008000, CRC(b9e4e3ad) SHA1(ed6f1fad94a15d95362701dbe124b52877fc3ec4) )
+ ROM_LOAD16_BYTE( "1818-3772.bin", 0x000000, 0x008000, CRC(a3665919) SHA1(ec1bc7e5b7990a1b09af947a06401e8ed3cb0516) )
ROM_REGION( 0x800, "mcu", 0 )
- ROM_LOAD( "1820-4784_1.bin", 0x000000, 0x000800, CRC(e929044a) SHA1(90849a10bdb8c6e38e73ce027c9c0ad8b3956b1b) )
- ROM_LOAD( "1820-4784_2.bin", 0x000000, 0x000800, CRC(8defcf50) SHA1(d3abfea468a43db7c2369500a3e390e77a8e22e6) )
+ ROM_LOAD( "1820-4784_1.bin", 0x000000, 0x000800, CRC(e929044a) SHA1(90849a10bdb8c6e38e73ce027c9c0ad8b3956b1b) )
+ ROM_LOAD( "1820-4784_2.bin", 0x000000, 0x000800, CRC(8defcf50) SHA1(d3abfea468a43db7c2369500a3e390e77a8e22e6) )
ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE )
ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000000, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
@@ -413,10 +413,10 @@ ROM_END
ROM_START( hp9k320 )
ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
- ROM_LOAD16_BYTE( "5061-6538.bin", 0x000001, 0x004000, CRC(d6aafeb1) SHA1(88c6b0b2f504303cbbac0c496c26b85458ac5d63) )
- ROM_LOAD16_BYTE( "5061-6539.bin", 0x000000, 0x004000, CRC(a7ff104c) SHA1(c640fe68314654716bd41b04c6a7f4e560036c7e) )
- ROM_LOAD16_BYTE( "5061-6540.bin", 0x008001, 0x004000, CRC(4f6796d6) SHA1(fd254897ac1afb8628f40ea93213f60a082c8d36) )
- ROM_LOAD16_BYTE( "5061-6541.bin", 0x008000, 0x004000, CRC(39d32998) SHA1(6de1bda75187b0878c03c074942b807cf2924f0e) )
+ ROM_LOAD16_BYTE( "5061-6538.bin", 0x000001, 0x004000, CRC(d6aafeb1) SHA1(88c6b0b2f504303cbbac0c496c26b85458ac5d63) )
+ ROM_LOAD16_BYTE( "5061-6539.bin", 0x000000, 0x004000, CRC(a7ff104c) SHA1(c640fe68314654716bd41b04c6a7f4e560036c7e) )
+ ROM_LOAD16_BYTE( "5061-6540.bin", 0x008001, 0x004000, CRC(4f6796d6) SHA1(fd254897ac1afb8628f40ea93213f60a082c8d36) )
+ ROM_LOAD16_BYTE( "5061-6541.bin", 0x008000, 0x004000, CRC(39d32998) SHA1(6de1bda75187b0878c03c074942b807cf2924f0e) )
ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
@@ -424,8 +424,8 @@ ROM_END
ROM_START( hp9k330 )
ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
- ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
- ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
+ ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
+ ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
@@ -433,8 +433,8 @@ ROM_END
ROM_START( hp9k340 )
ROM_REGION( 0x20000, MAINCPU_TAG, 0 )
- ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
- ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
+ ROM_LOAD16_BYTE( "1818-4416.bin", 0x000000, 0x010000, CRC(cd71e85e) SHA1(3e83a80682f733417fdc3720410e45a2cfdcf869) )
+ ROM_LOAD16_BYTE( "1818-4417.bin", 0x000001, 0x010000, CRC(374d49db) SHA1(a12cbf6c151e2f421da4571000b5dffa3ef403b3) )
ROM_REGION( 0x4000, "graphics", ROMREGION_ERASEFF | ROMREGION_BE | ROMREGION_32BIT )
ROM_LOAD16_BYTE( "98544_1818-1999.bin", 0x000001, 0x002000, CRC(8c7d6480) SHA1(d2bcfd39452c38bc652df39f84c7041cfdf6bd51) )
diff --git a/src/mess/drivers/nes.c b/src/mess/drivers/nes.c
index 9a5ff708c76..48904369ecf 100644
--- a/src/mess/drivers/nes.c
+++ b/src/mess/drivers/nes.c
@@ -214,7 +214,7 @@ MACHINE_START_MEMBER( nes_state, fds )
{
m_ciram = auto_alloc_array(machine(), UINT8, 0x800);
setup_disk(m_disk);
-
+
// register saves
save_item(NAME(m_last_frame_flip));
save_pointer(NAME(m_ciram), 0x800);
diff --git a/src/mess/drivers/ngen.c b/src/mess/drivers/ngen.c
index ab2d3249c0f..6ba901c161b 100644
--- a/src/mess/drivers/ngen.c
+++ b/src/mess/drivers/ngen.c
@@ -406,7 +406,7 @@ READ16_MEMBER(ngen_state::peripheral_r)
// X-bus module select
// The bootstrap ROM creates a table at 0:FC9h, with a count, followed by the module IDs of each
-// expansion module. The base I/O address for the currently selected module is set by writing to
+// expansion module. The base I/O address for the currently selected module is set by writing to
// this register (bits 0-7 are ignored)
// TODO: make expansion modules slot devices
WRITE16_MEMBER(ngen_state::xbus_w)
@@ -435,7 +435,7 @@ WRITE16_MEMBER(ngen_state::xbus_w)
READ16_MEMBER(ngen_state::xbus_r)
{
UINT16 ret = 0xffff;
-
+
switch(m_xbus_current)
{
case 0x00:
@@ -647,8 +647,8 @@ WRITE_LINE_MEMBER( ngen_state::dack3_w ) { set_dma_channel(3, state); }
READ8_MEMBER(ngen_state::dma_3_dack_r)
{
- UINT16 ret = 0xffff;
-
+ UINT16 ret = 0xffff;
+
if((m_hdc_control & 0x04) && m_disk_rom)
{
ret = m_disk_rom->base()[m_disk_rom_ptr++] << 8;
@@ -659,7 +659,7 @@ READ8_MEMBER(ngen_state::dma_3_dack_r)
//m_dmac->dreq3_w(0);
}
}
- m_dma_high_byte = ret & 0xff00;
+ m_dma_high_byte = ret & 0xff00;
return ret;
}
@@ -737,16 +737,16 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( ngen_io, AS_IO, 16, ngen_state )
AM_RANGE(0x0000, 0x0001) AM_READWRITE(xbus_r,xbus_w)
-
+
// Floppy/Hard disk module
-// AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff) // a guess for now
-// AM_RANGE(0x0108, 0x0109) AM_WRITE8(fdc_control_w,0x00ff)
-// AM_RANGE(0x010a, 0x010b) AM_WRITE8(hdc_control_w,0x00ff)
-// AM_RANGE(0x010e, 0x010f) AM_WRITE8(disk_addr_ext,0x00ff) // X-Bus extended address register
-// AM_RANGE(0x0110, 0x0117) AM_DEVREADWRITE8("fdc_timer",pit8253_device,read,write,0x00ff)
+// AM_RANGE(0x0100, 0x0107) AM_DEVREADWRITE8("fdc",wd2797_t,read,write,0x00ff) // a guess for now
+// AM_RANGE(0x0108, 0x0109) AM_WRITE8(fdc_control_w,0x00ff)
+// AM_RANGE(0x010a, 0x010b) AM_WRITE8(hdc_control_w,0x00ff)
+// AM_RANGE(0x010e, 0x010f) AM_WRITE8(disk_addr_ext,0x00ff) // X-Bus extended address register
+// AM_RANGE(0x0110, 0x0117) AM_DEVREADWRITE8("fdc_timer",pit8253_device,read,write,0x00ff)
// 0x0120-0x012f - WD1010 Winchester disk controller (unemulated)
-// AM_RANGE(0x0130, 0x0137) AM_DEVREADWRITE8("hdc_timer",pit8253_device,read,write,0x00ff)
-
+// AM_RANGE(0x0130, 0x0137) AM_DEVREADWRITE8("hdc_timer",pit8253_device,read,write,0x00ff)
+
ADDRESS_MAP_END
static ADDRESS_MAP_START( ngen386_mem, AS_PROGRAM, 32, ngen_state )
@@ -851,7 +851,7 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
// keyboard UART (patent says i8251 is used for keyboard communications, it is located on the video board)
MCFG_DEVICE_ADD("videouart", I8251, 0) // main clock unknown, Rx/Tx clocks are 19.53kHz
-// MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
+// MCFG_I8251_TXEMPTY_HANDLER(DEVWRITELINE("pic",pic8259_device,ir4_w))
MCFG_I8251_TXD_HANDLER(DEVWRITELINE("keyboard", rs232_port_device, write_txd))
MCFG_RS232_PORT_ADD("keyboard", keyboard, "ngen")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("videouart", i8251_device, write_rxd))
@@ -865,12 +865,12 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu",i80186_cpu_device,drq1_w))
MCFG_WD_FDC_FORCE_READY
MCFG_DEVICE_ADD("fdc_timer", PIT8253, 0)
- MCFG_PIT8253_CLK0(XTAL_20MHz / 20)
+ MCFG_PIT8253_CLK0(XTAL_20MHz / 20)
MCFG_PIT8253_OUT0_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) // clocked on FDC data register access
MCFG_PIT8253_CLK1(XTAL_20MHz / 20)
MCFG_PIT8253_OUT1_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w)) // 1MHz
MCFG_PIT8253_CLK2(XTAL_20MHz / 10)
- MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w))
+ MCFG_PIT8253_OUT2_HANDLER(DEVWRITELINE("pic",pic8259_device,ir7_w))
// TODO: WD1010 HDC (not implemented), use WD2010 for now
MCFG_DEVICE_ADD("hdc", WD2010, XTAL_20MHz / 4)
MCFG_WD2010_IN_BCS_CB(READ8(ngen_state,hd_buffer_r))
diff --git a/src/mess/drivers/pasogo.c b/src/mess/drivers/pasogo.c
index 99f83dc1abf..b59011319c5 100644
--- a/src/mess/drivers/pasogo.c
+++ b/src/mess/drivers/pasogo.c
@@ -681,7 +681,7 @@ void pasogo_state::machine_reset()
astring region_tag;
m_maincpu_rom = memregion("maincpu");
m_cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
- if (!m_cart_rom) // this should never happen, since we make carts mandatory!
+ if (!m_cart_rom) // this should never happen, since we make carts mandatory!
m_cart_rom = memregion("maincpu");
membank("bank27")->set_base(m_cart_rom->base());
diff --git a/src/mess/drivers/splitsec.c b/src/mess/drivers/splitsec.c
index 719b67eb474..06b28f9163e 100644
--- a/src/mess/drivers/splitsec.c
+++ b/src/mess/drivers/splitsec.c
@@ -4,7 +4,7 @@
Parker Brothers Split Second
* TMS1400NLL MP7314-N2 (die labeled MP7314)
-
+
This is an electronic handheld reflex gaming device, it's straightforward
to use. The included mini-games are:
1, 2, 3: Mad Maze*
@@ -12,7 +12,7 @@
6: Auto Cross
7: Stomp
8: Speedball
-
+
*: higher number indicates higher difficulty
@@ -167,7 +167,7 @@ WRITE16_MEMBER(splitsec_state::write_r)
{
// R8: speaker out
m_speaker->level_w(data >> 8 & 1);
-
+
// R9,R10: input mux
// R0-R7: led columns
m_r = data;
diff --git a/src/mess/drivers/tispeak.c b/src/mess/drivers/tispeak.c
index 9848aebbc80..cf42755f006 100644
--- a/src/mess/drivers/tispeak.c
+++ b/src/mess/drivers/tispeak.c
@@ -693,7 +693,7 @@ COMP( 1978, snspell, 0, 0, snspell, snspell, tispeak_state, snspell,
COMP( 1980, snspella, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (US set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
COMP( 1978, snspelluk, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
COMP( 1981, snspelluka, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (UK set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // different voice actor
-COMP( 1979, snspelljp, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
+COMP( 1979, snspelljp, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "Speak & Spell (Japan)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
COMP( 1980, ladictee, snspell, 0, snspell, snspell, tispeak_state, snspell, "Texas Instruments", "La Dictee Magique (France)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND ) // doesn't work due to missing CD2702 MCU dump, German version has CD2702 too
COMP( 1980, snmath, 0, 0, snmath, snmath, driver_device, 0, "Texas Instruments", "Speak & Math (US prototype)", GAME_IMPERFECT_SOUND ) // also US set 1
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index 82e5df5959d..c923ac860d9 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -291,9 +291,9 @@ public:
INT32 m_adb_linestate;
bool m_adb_srqflag;
#define kADBKeyBufSize 32
- UINT8 m_adb_keybuf[kADBKeyBufSize];
- UINT8 m_adb_keybuf_start;
- UINT8 m_adb_keybuf_end;
+ UINT8 m_adb_keybuf[kADBKeyBufSize];
+ UINT8 m_adb_keybuf_start;
+ UINT8 m_adb_keybuf_end;
// Portable/PB100 Power Manager IC comms (chapter 4, "Guide to the Macintosh Family Hardware", second edition)
UINT8 m_pm_data_send, m_pm_data_recv, m_pm_ack, m_pm_req, m_pm_cmd[32], m_pm_out[32], m_pm_dptr, m_pm_sptr, m_pm_slen, m_pm_state;
diff --git a/src/mess/machine/amstrad.c b/src/mess/machine/amstrad.c
index 8c692622488..8600075be1d 100644
--- a/src/mess/machine/amstrad.c
+++ b/src/mess/machine/amstrad.c
@@ -3034,7 +3034,7 @@ MACHINE_START_MEMBER(amstrad_state,plus)
astring region_tag;
m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
- if (!m_region_cart) // this should never happen, since we make carts mandatory!
+ if (!m_region_cart) // this should never happen, since we make carts mandatory!
m_region_cart = memregion("maincpu");
}
@@ -3078,7 +3078,7 @@ MACHINE_START_MEMBER(amstrad_state,gx4000)
astring region_tag;
m_region_cart = memregion(region_tag.cpy(m_cart->tag()).cat(GENERIC_ROM_REGION_TAG));
- if (!m_region_cart) // this should never happen, since we make carts mandatory!
+ if (!m_region_cart) // this should never happen, since we make carts mandatory!
m_region_cart = memregion("maincpu");
}
diff --git a/src/mess/machine/macadb.c b/src/mess/machine/macadb.c
index 05d7b32db3a..dd0dafa208f 100644
--- a/src/mess/machine/macadb.c
+++ b/src/mess/machine/macadb.c
@@ -427,7 +427,7 @@ void mac_state::adb_talk()
{
if(m_adb_keybuf_start == m_adb_keybuf_end)
{
- // printf("%s: buffer empty\n", __func__);
+ // printf("%s: buffer empty\n", __func__);
m_adb_buffer[0] = 0xff;
m_adb_buffer[1] = 0xff;
}
diff --git a/src/mess/machine/nes.c b/src/mess/machine/nes.c
index b6cf0d1d086..8990fb6ae03 100644
--- a/src/mess/machine/nes.c
+++ b/src/mess/machine/nes.c
@@ -139,7 +139,7 @@ READ8_MEMBER(nes_state::fc_in0_r)
// bit 0 to controller port
ret |= m_ctrl1->read_bit0();
- // expansion port bits (in the original FC, P2 controller was hooked to these lines
+ // expansion port bits (in the original FC, P2 controller was hooked to these lines
// too, so in principle some homebrew hardware modification could use the same
// connection with P1 controller too)
ret |= m_ctrl1->read_exp(0);
@@ -160,7 +160,7 @@ READ8_MEMBER(nes_state::fc_in1_r)
// bit 0 to controller port
ret |= m_ctrl2->read_bit0();
- // expansion port bits (in the original FC, P2 controller was hooked to these lines
+ // expansion port bits (in the original FC, P2 controller was hooked to these lines
// too, so in principle some homebrew hardware modification could use the same
// connection with P1 controller too)
ret |= m_ctrl1->read_exp(1);
@@ -193,10 +193,10 @@ NESCTRL_BRIGHTPIXEL_CB(nes_state::bright_pixel)
{
// get the pixel at the gun position
UINT32 pix = m_ppu->get_pixel(x, y);
-
+
// get the color base from the ppu
UINT32 color_base = m_ppu->get_colorbase();
-
+
// check if the cursor is over a bright pixel
if ((pix == color_base + 0x20) || (pix == color_base + 0x30) ||
(pix == color_base + 0x33) || (pix == color_base + 0x34))
diff --git a/src/osd/modules/debugger/debug_module.h b/src/osd/modules/debugger/debug_module.h
index 789e511e596..78b15aa41ef 100644
--- a/src/osd/modules/debugger/debug_module.h
+++ b/src/osd/modules/debugger/debug_module.h
@@ -20,11 +20,11 @@ class debug_module
{
public:
- virtual ~debug_module() { }
+ virtual ~debug_module() { }
- virtual void init_debugger(running_machine &machine) = 0;
- virtual void wait_for_debugger(device_t &device, bool firststop) = 0;
- virtual void debugger_update() = 0;
+ virtual void init_debugger(running_machine &machine) = 0;
+ virtual void wait_for_debugger(device_t &device, bool firststop) = 0;
+ virtual void debugger_update() = 0;
};
diff --git a/src/osd/modules/debugger/debugint.c b/src/osd/modules/debugger/debugint.c
index dcf9e80b3e7..3230e032bb8 100644
--- a/src/osd/modules/debugger/debugint.c
+++ b/src/osd/modules/debugger/debugint.c
@@ -27,23 +27,23 @@
class debug_internal : public osd_module, public debug_module
{
public:
- debug_internal()
- : osd_module(OSD_DEBUG_PROVIDER, "internal"), debug_module(),
- m_machine(NULL)
- {
- }
+ debug_internal()
+ : osd_module(OSD_DEBUG_PROVIDER, "internal"), debug_module(),
+ m_machine(NULL)
+ {
+ }
- virtual ~debug_internal() { }
+ virtual ~debug_internal() { }
- virtual int init() { return 0;}
- virtual void exit();
+ virtual int init() { return 0;}
+ virtual void exit();
- virtual void init_debugger(running_machine &machine);
- virtual void wait_for_debugger(device_t &device, bool firststop);
- virtual void debugger_update();
+ virtual void init_debugger(running_machine &machine);
+ virtual void wait_for_debugger(device_t &device, bool firststop);
+ virtual void debugger_update();
private:
- running_machine *m_machine;
+ running_machine *m_machine;
};
diff --git a/src/osd/modules/debugger/debugqt.c b/src/osd/modules/debugger/debugqt.c
index bd1914e1d71..ce675a0180d 100644
--- a/src/osd/modules/debugger/debugqt.c
+++ b/src/osd/modules/debugger/debugqt.c
@@ -37,23 +37,23 @@
class debug_qt : public osd_module, public debug_module
{
public:
- debug_qt()
- : osd_module(OSD_DEBUG_PROVIDER, "qt"), debug_module(),
- m_machine(NULL)
- {
- }
+ debug_qt()
+ : osd_module(OSD_DEBUG_PROVIDER, "qt"), debug_module(),
+ m_machine(NULL)
+ {
+ }
- virtual ~debug_qt() { }
+ virtual ~debug_qt() { }
- virtual int init() { return 0;}
- virtual void exit() { }
+ virtual int init() { return 0;}
+ virtual void exit() { }
- virtual void init_debugger(running_machine &machine);
- virtual void wait_for_debugger(device_t &device, bool firststop);
- virtual void debugger_update();
+ virtual void init_debugger(running_machine &machine);
+ virtual void wait_for_debugger(device_t &device, bool firststop);
+ virtual void debugger_update();
private:
- running_machine *m_machine;
+ running_machine *m_machine;
};
//============================================================
@@ -357,7 +357,7 @@ void debug_qt::debugger_update()
}
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(debug_qt, OSD_DEBUG_PROVIDER, "qt")
+ MODULE_NOT_SUPPORTED(debug_qt, OSD_DEBUG_PROVIDER, "qt")
#endif
MODULE_DEFINITION(DEBUG_QT, debug_qt)
diff --git a/src/osd/modules/debugger/debugwin.c b/src/osd/modules/debugger/debugwin.c
index 5d31bf3cbdc..658731bc09c 100644
--- a/src/osd/modules/debugger/debugwin.c
+++ b/src/osd/modules/debugger/debugwin.c
@@ -44,23 +44,23 @@
class debugger_windows : public osd_module, public debug_module
{
public:
- debugger_windows()
- : osd_module(OSD_DEBUG_PROVIDER, "windows"), debug_module(),
- m_machine(NULL)
- {
- }
+ debugger_windows()
+ : osd_module(OSD_DEBUG_PROVIDER, "windows"), debug_module(),
+ m_machine(NULL)
+ {
+ }
- virtual ~debugger_windows() { }
+ virtual ~debugger_windows() { }
- virtual int init() { return 0;}
- virtual void exit();
+ virtual int init() { return 0;}
+ virtual void exit();
- virtual void init_debugger(running_machine &machine);
- virtual void wait_for_debugger(device_t &device, bool firststop);
- virtual void debugger_update();
+ virtual void init_debugger(running_machine &machine);
+ virtual void wait_for_debugger(device_t &device, bool firststop);
+ virtual void debugger_update();
private:
- running_machine *m_machine;
+ running_machine *m_machine;
};
//============================================================
// PARAMETERS
@@ -3094,7 +3094,7 @@ static void smart_show_all(BOOL show)
smart_show_window(info->wnd, show);
}
#else /* not windows */
- MODULE_NOT_SUPPORTED(debugger_windows, OSD_DEBUG_PROVIDER, "windows")
+ MODULE_NOT_SUPPORTED(debugger_windows, OSD_DEBUG_PROVIDER, "windows")
#endif
MODULE_DEFINITION(DEBUG_WINDOWS, debugger_windows)
diff --git a/src/osd/modules/debugger/none.c b/src/osd/modules/debugger/none.c
index 41e51174f05..7fc671880fd 100644
--- a/src/osd/modules/debugger/none.c
+++ b/src/osd/modules/debugger/none.c
@@ -12,28 +12,28 @@
class debug_none : public osd_module, public debug_module
{
public:
- debug_none()
- : osd_module(OSD_DEBUG_PROVIDER, "none"), debug_module(),
- m_machine(NULL)
- {
- }
+ debug_none()
+ : osd_module(OSD_DEBUG_PROVIDER, "none"), debug_module(),
+ m_machine(NULL)
+ {
+ }
- virtual ~debug_none() { }
+ virtual ~debug_none() { }
- virtual int init() { return 0;}
- virtual void exit() { }
+ virtual int init() { return 0;}
+ virtual void exit() { }
- virtual void init_debugger(running_machine &machine);
- virtual void wait_for_debugger(device_t &device, bool firststop);
- virtual void debugger_update();
+ virtual void init_debugger(running_machine &machine);
+ virtual void wait_for_debugger(device_t &device, bool firststop);
+ virtual void debugger_update();
private:
- running_machine *m_machine;
+ running_machine *m_machine;
};
void debug_none::init_debugger(running_machine &machine)
{
- m_machine = &machine;
+ m_machine = &machine;
}
void debug_none::wait_for_debugger(device_t &device, bool firststop)
diff --git a/src/osd/modules/font/font_module.h b/src/osd/modules/font/font_module.h
index e5e5499a2f5..816b6fc839b 100644
--- a/src/osd/modules/font/font_module.h
+++ b/src/osd/modules/font/font_module.h
@@ -18,8 +18,8 @@
class font_module
{
public:
- virtual ~font_module() { }
- virtual osd_font *font_alloc() = 0;
+ virtual ~font_module() { }
+ virtual osd_font *font_alloc() = 0;
};
diff --git a/src/osd/modules/font/font_none.c b/src/osd/modules/font/font_none.c
index 4d6cdbe48c9..8f19e448be1 100644
--- a/src/osd/modules/font/font_none.c
+++ b/src/osd/modules/font/font_none.c
@@ -14,17 +14,17 @@
class osd_font_none : public osd_font
{
public:
- virtual ~osd_font_none() {};
+ virtual ~osd_font_none() {};
- virtual bool open(const char *font_path, const char *name, int &height);
- virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool open(const char *font_path, const char *name, int &height);
+ virtual void close();
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
private:
};
bool osd_font_none::open(const char *font_path, const char *_name, int &height)
{
- return false;
+ return false;
}
//-------------------------------------------------
@@ -46,22 +46,21 @@ void osd_font_none::close()
bool osd_font_none::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
- return false;
+ return false;
}
class font_none : public osd_module, public font_module
{
public:
- font_none()
- : osd_module(OSD_FONT_PROVIDER, "none"), font_module()
- {
- }
+ font_none()
+ : osd_module(OSD_FONT_PROVIDER, "none"), font_module()
+ {
+ }
- osd_font *font_alloc()
- {
- return global_alloc(osd_font_none);
- }
+ osd_font *font_alloc()
+ {
+ return global_alloc(osd_font_none);
+ }
};
MODULE_DEFINITION(FONT_NONE, font_none)
-
diff --git a/src/osd/modules/font/font_osx.c b/src/osd/modules/font/font_osx.c
index 6e7e62acedf..e7e58b35ad9 100644
--- a/src/osd/modules/font/font_osx.c
+++ b/src/osd/modules/font/font_osx.c
@@ -26,71 +26,71 @@
class osd_font_osx : public osd_font
{
public:
- virtual ~osd_font_osx() {};
+ virtual ~osd_font_osx() {};
- virtual bool open(const char *font_path, const char *name, int &height);
- virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool open(const char *font_path, const char *name, int &height);
+ virtual void close();
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
private:
- CTFontRef m_font;
+ CTFontRef m_font;
};
bool osd_font_osx::open(const char *font_path, const char *_name, int &height)
{
- CFStringRef font_name = NULL;
- CTFontRef ct_font = NULL;
- CTFontDescriptorRef font_descriptor;
- CGAffineTransform affine_transform = CGAffineTransformIdentity;
-
- m_font = NULL;
- astring name(_name);
- printf("FONT NAME %s\n", _name);
+ CFStringRef font_name = NULL;
+ CTFontRef ct_font = NULL;
+ CTFontDescriptorRef font_descriptor;
+ CGAffineTransform affine_transform = CGAffineTransformIdentity;
+
+ m_font = NULL;
+ astring name(_name);
+ printf("FONT NAME %s\n", _name);
#if 0
- if (name == "default")
- {
- name = "LucidaGrande";
- }
+ if (name == "default")
+ {
+ name = "LucidaGrande";
+ }
#endif
- /* handle bdf fonts in the core */
- if (name.len() > 4)
- if (name.makeupper().substr(name.len()-4,4) == ".BDF" )
- return false;
-
- font_name = CFStringCreateWithCString( NULL, name.cstr(), kCFStringEncodingUTF8 );
- if( font_name != NULL )
- {
- font_descriptor = CTFontDescriptorCreateWithNameAndSize( font_name, 0.0); //POINT_SIZE );
-
- if( font_descriptor != NULL )
- {
- ct_font = CTFontCreateWithFontDescriptor( font_descriptor, POINT_SIZE, &affine_transform );
-
- CFRelease( font_descriptor );
- }
- }
-
- CFRelease( font_name );
-
- if (!ct_font)
- {
- osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name.cstr());
- return false;
- }
-
- CFStringRef real_name = CTFontCopyPostScriptName( ct_font );
- char real_name_c_string[255];
- CFStringGetCString ( real_name, real_name_c_string, 255, kCFStringEncodingUTF8 );
- osd_printf_verbose("Matching font: %s\n", real_name_c_string);
- CFRelease( real_name );
-
- CGFloat line_height = 0.0;
- line_height += CTFontGetAscent(ct_font);
- line_height += CTFontGetDescent(ct_font);
- line_height += CTFontGetLeading(ct_font);
- height = ceilf(line_height * EXTRA_HEIGHT);
-
- m_font = ct_font;
- return true;
+ /* handle bdf fonts in the core */
+ if (name.len() > 4)
+ if (name.makeupper().substr(name.len()-4,4) == ".BDF" )
+ return false;
+
+ font_name = CFStringCreateWithCString( NULL, name.cstr(), kCFStringEncodingUTF8 );
+ if( font_name != NULL )
+ {
+ font_descriptor = CTFontDescriptorCreateWithNameAndSize( font_name, 0.0); //POINT_SIZE );
+
+ if( font_descriptor != NULL )
+ {
+ ct_font = CTFontCreateWithFontDescriptor( font_descriptor, POINT_SIZE, &affine_transform );
+
+ CFRelease( font_descriptor );
+ }
+ }
+
+ CFRelease( font_name );
+
+ if (!ct_font)
+ {
+ osd_printf_verbose("Couldn't find/open font %s, using MAME default\n", name.cstr());
+ return false;
+ }
+
+ CFStringRef real_name = CTFontCopyPostScriptName( ct_font );
+ char real_name_c_string[255];
+ CFStringGetCString ( real_name, real_name_c_string, 255, kCFStringEncodingUTF8 );
+ osd_printf_verbose("Matching font: %s\n", real_name_c_string);
+ CFRelease( real_name );
+
+ CGFloat line_height = 0.0;
+ line_height += CTFontGetAscent(ct_font);
+ line_height += CTFontGetDescent(ct_font);
+ line_height += CTFontGetLeading(ct_font);
+ height = ceilf(line_height * EXTRA_HEIGHT);
+
+ m_font = ct_font;
+ return true;
}
//-------------------------------------------------
@@ -100,10 +100,10 @@ bool osd_font_osx::open(const char *font_path, const char *_name, int &height)
void osd_font_osx::close()
{
- if( m_font != NULL )
- {
- CFRelease( m_font );
- }
+ if( m_font != NULL )
+ {
+ CFRelease( m_font );
+ }
}
//-------------------------------------------------
@@ -116,88 +116,88 @@ void osd_font_osx::close()
bool osd_font_osx::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
- UniChar uni_char;
- CGGlyph glyph;
- CTFontRef ct_font = m_font;
- const CFIndex count = 1;
- CGRect bounding_rect, success_rect;
- CGContextRef context_ref;
-
- if( chnum == ' ' )
- {
- uni_char = 'n';
- CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
- success_rect = CTFontGetBoundingRectsForGlyphs( ct_font, kCTFontDefaultOrientation, &glyph, &bounding_rect, count );
- uni_char = chnum;
- CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
- }
- else
- {
- uni_char = chnum;
- CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
- success_rect = CTFontGetBoundingRectsForGlyphs( ct_font, kCTFontDefaultOrientation, &glyph, &bounding_rect, count );
- }
-
- if( CGRectEqualToRect( success_rect, CGRectNull ) == false )
- {
- size_t bitmap_width;
- size_t bitmap_height;
-
- bitmap_width = ceilf(bounding_rect.size.width * EXTRA_WIDTH);
- bitmap_width = bitmap_width == 0 ? 1 : bitmap_width;
-
- bitmap_height = ceilf( (CTFontGetAscent(ct_font) + CTFontGetDescent(ct_font) + CTFontGetLeading(ct_font)) * EXTRA_HEIGHT);
-
- xoffs = yoffs = 0;
- width = bitmap_width;
-
- size_t bits_per_component;
- CGColorSpaceRef color_space;
- CGBitmapInfo bitmap_info = kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst;
-
- color_space = CGColorSpaceCreateDeviceRGB();
- bits_per_component = 8;
-
- bitmap.allocate(bitmap_width, bitmap_height);
-
- context_ref = CGBitmapContextCreate( bitmap.raw_pixptr(0), bitmap_width, bitmap_height, bits_per_component, bitmap.rowpixels()*4, color_space, bitmap_info );
-
- if( context_ref != NULL )
- {
- CGFontRef font_ref;
- font_ref = CTFontCopyGraphicsFont( ct_font, NULL );
- CGContextSetTextPosition(context_ref, -bounding_rect.origin.x*EXTRA_WIDTH, CTFontGetDescent(ct_font)+CTFontGetLeading(ct_font) );
- CGContextSetRGBFillColor(context_ref, 1.0, 1.0, 1.0, 1.0);
- CGContextSetFont( context_ref, font_ref );
- CGContextSetFontSize( context_ref, POINT_SIZE );
- CGContextShowGlyphs( context_ref, &glyph, count );
- CGFontRelease( font_ref );
- CGContextRelease( context_ref );
- }
-
- CGColorSpaceRelease( color_space );
- }
-
- return bitmap.valid();
+ UniChar uni_char;
+ CGGlyph glyph;
+ CTFontRef ct_font = m_font;
+ const CFIndex count = 1;
+ CGRect bounding_rect, success_rect;
+ CGContextRef context_ref;
+
+ if( chnum == ' ' )
+ {
+ uni_char = 'n';
+ CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
+ success_rect = CTFontGetBoundingRectsForGlyphs( ct_font, kCTFontDefaultOrientation, &glyph, &bounding_rect, count );
+ uni_char = chnum;
+ CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
+ }
+ else
+ {
+ uni_char = chnum;
+ CTFontGetGlyphsForCharacters( ct_font, &uni_char, &glyph, count );
+ success_rect = CTFontGetBoundingRectsForGlyphs( ct_font, kCTFontDefaultOrientation, &glyph, &bounding_rect, count );
+ }
+
+ if( CGRectEqualToRect( success_rect, CGRectNull ) == false )
+ {
+ size_t bitmap_width;
+ size_t bitmap_height;
+
+ bitmap_width = ceilf(bounding_rect.size.width * EXTRA_WIDTH);
+ bitmap_width = bitmap_width == 0 ? 1 : bitmap_width;
+
+ bitmap_height = ceilf( (CTFontGetAscent(ct_font) + CTFontGetDescent(ct_font) + CTFontGetLeading(ct_font)) * EXTRA_HEIGHT);
+
+ xoffs = yoffs = 0;
+ width = bitmap_width;
+
+ size_t bits_per_component;
+ CGColorSpaceRef color_space;
+ CGBitmapInfo bitmap_info = kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst;
+
+ color_space = CGColorSpaceCreateDeviceRGB();
+ bits_per_component = 8;
+
+ bitmap.allocate(bitmap_width, bitmap_height);
+
+ context_ref = CGBitmapContextCreate( bitmap.raw_pixptr(0), bitmap_width, bitmap_height, bits_per_component, bitmap.rowpixels()*4, color_space, bitmap_info );
+
+ if( context_ref != NULL )
+ {
+ CGFontRef font_ref;
+ font_ref = CTFontCopyGraphicsFont( ct_font, NULL );
+ CGContextSetTextPosition(context_ref, -bounding_rect.origin.x*EXTRA_WIDTH, CTFontGetDescent(ct_font)+CTFontGetLeading(ct_font) );
+ CGContextSetRGBFillColor(context_ref, 1.0, 1.0, 1.0, 1.0);
+ CGContextSetFont( context_ref, font_ref );
+ CGContextSetFontSize( context_ref, POINT_SIZE );
+ CGContextShowGlyphs( context_ref, &glyph, count );
+ CGFontRelease( font_ref );
+ CGContextRelease( context_ref );
+ }
+
+ CGColorSpaceRelease( color_space );
+ }
+
+ return bitmap.valid();
}
class font_osx : public osd_module, public font_module
{
public:
- font_osx()
- : osd_module(OSD_FONT_PROVIDER, "osx"), font_module()
- {
- }
+ font_osx()
+ : osd_module(OSD_FONT_PROVIDER, "osx"), font_module()
+ {
+ }
- osd_font *font_alloc()
- {
- return global_alloc(osd_font_osx);
- }
+ osd_font *font_alloc()
+ {
+ return global_alloc(osd_font_osx);
+ }
};
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
+ MODULE_NOT_SUPPORTED(font_osx, OSD_FONT_PROVIDER, "osx")
#endif
MODULE_DEFINITION(FONT_OSX, font_osx)
diff --git a/src/osd/modules/font/font_sdl.c b/src/osd/modules/font/font_sdl.c
index 6ae72ca4fb3..d10f7209ab1 100644
--- a/src/osd/modules/font/font_sdl.c
+++ b/src/osd/modules/font/font_sdl.c
@@ -32,95 +32,95 @@
class osd_font_sdl : public osd_font
{
public:
- virtual ~osd_font_sdl() {};
+ virtual ~osd_font_sdl() {};
- virtual bool open(const char *font_path, const char *name, int &height);
- virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool open(const char *font_path, const char *name, int &height);
+ virtual void close();
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
private:
#ifndef SDLMAME_HAIKU
- TTF_Font *search_font_config(astring name, bool bold, bool italic, bool underline, bool &bakedstyles);
+ TTF_Font *search_font_config(astring name, bool bold, bool italic, bool underline, bool &bakedstyles);
#endif
- bool BDF_Check_Magic(astring name);
- TTF_Font * TTF_OpenFont_Magic(astring name, int fsize);
- TTF_Font *m_font;
+ bool BDF_Check_Magic(astring name);
+ TTF_Font * TTF_OpenFont_Magic(astring name, int fsize);
+ TTF_Font *m_font;
};
bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
{
- TTF_Font *font = (TTF_Font *)NULL;
- bool bakedstyles = false;
- int style = 0;
-
- // accept qualifiers from the name
- astring name(_name);
-
- if (name == "default")
- {
- name = "Liberation Sans";
- }
-
- bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0);
- bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0);
- bool underline = (name.replace(0, "[U]", "") + name.replace(0, "[u]", "") > 0);
- bool strike = (name.replace(0, "[S]", "") + name.replace(0, "[s]", "") > 0);
-
- // first up, try it as a filename
- font = TTF_OpenFont_Magic(name, POINT_SIZE);
-
- // if no success, try the font path
-
- if (!font)
- {
- osd_printf_verbose("Searching font %s in -%s\n", name.cstr(), OPTION_FONTPATH);
- //emu_file file(options().font_path(), OPEN_FLAG_READ);
- emu_file file(font_path, OPEN_FLAG_READ);
- if (file.open(name) == FILERR_NONE)
- {
- astring full_name = file.fullpath();
- font = TTF_OpenFont_Magic(full_name, POINT_SIZE);
- if (font)
- osd_printf_verbose("Found font %s\n", full_name.cstr());
- }
- }
-
- // if that didn't work, crank up the FontConfig database
+ TTF_Font *font = (TTF_Font *)NULL;
+ bool bakedstyles = false;
+ int style = 0;
+
+ // accept qualifiers from the name
+ astring name(_name);
+
+ if (name == "default")
+ {
+ name = "Liberation Sans";
+ }
+
+ bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0);
+ bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0);
+ bool underline = (name.replace(0, "[U]", "") + name.replace(0, "[u]", "") > 0);
+ bool strike = (name.replace(0, "[S]", "") + name.replace(0, "[s]", "") > 0);
+
+ // first up, try it as a filename
+ font = TTF_OpenFont_Magic(name, POINT_SIZE);
+
+ // if no success, try the font path
+
+ if (!font)
+ {
+ osd_printf_verbose("Searching font %s in -%s\n", name.cstr(), OPTION_FONTPATH);
+ //emu_file file(options().font_path(), OPEN_FLAG_READ);
+ emu_file file(font_path, OPEN_FLAG_READ);
+ if (file.open(name) == FILERR_NONE)
+ {
+ astring full_name = file.fullpath();
+ font = TTF_OpenFont_Magic(full_name, POINT_SIZE);
+ if (font)
+ osd_printf_verbose("Found font %s\n", full_name.cstr());
+ }
+ }
+
+ // if that didn't work, crank up the FontConfig database
#ifndef SDLMAME_HAIKU
- if (!font)
- {
- font = search_font_config(name, bold, italic, underline, bakedstyles);
- }
+ if (!font)
+ {
+ font = search_font_config(name, bold, italic, underline, bakedstyles);
+ }
#endif
- if (!font)
- {
- if (!BDF_Check_Magic(name))
- {
- osd_printf_verbose("font %s is not TrueType or BDF, using MAME default\n", name.cstr());
- }
- return NULL;
- }
-
- // apply styles
- if (!bakedstyles)
- {
- style |= bold ? TTF_STYLE_BOLD : 0;
- style |= italic ? TTF_STYLE_ITALIC : 0;
- }
- style |= underline ? TTF_STYLE_UNDERLINE : 0;
- // SDL_ttf 2.0.9 and earlier does not define TTF_STYLE_STRIKETHROUGH
+ if (!font)
+ {
+ if (!BDF_Check_Magic(name))
+ {
+ osd_printf_verbose("font %s is not TrueType or BDF, using MAME default\n", name.cstr());
+ }
+ return NULL;
+ }
+
+ // apply styles
+ if (!bakedstyles)
+ {
+ style |= bold ? TTF_STYLE_BOLD : 0;
+ style |= italic ? TTF_STYLE_ITALIC : 0;
+ }
+ style |= underline ? TTF_STYLE_UNDERLINE : 0;
+ // SDL_ttf 2.0.9 and earlier does not define TTF_STYLE_STRIKETHROUGH
#if SDL_VERSIONNUM(TTF_MAJOR_VERSION, TTF_MINOR_VERSION, TTF_PATCHLEVEL) > SDL_VERSIONNUM(2,0,9)
- style |= strike ? TTF_STYLE_STRIKETHROUGH : 0;
+ style |= strike ? TTF_STYLE_STRIKETHROUGH : 0;
#else
- if (strike)
- osd_printf_warning("Ignoring strikethrough for SDL_TTF older than 2.0.10\n");
+ if (strike)
+ osd_printf_warning("Ignoring strikethrough for SDL_TTF older than 2.0.10\n");
#endif // PATCHLEVEL
- TTF_SetFontStyle(font, style);
+ TTF_SetFontStyle(font, style);
- height = TTF_FontLineSkip(font);
+ height = TTF_FontLineSkip(font);
- m_font = font;
- return true;
+ m_font = font;
+ return true;
}
//-------------------------------------------------
@@ -130,7 +130,7 @@ bool osd_font_sdl::open(const char *font_path, const char *_name, int &height)
void osd_font_sdl::close()
{
- TTF_CloseFont(this->m_font);
+ TTF_CloseFont(this->m_font);
}
//-------------------------------------------------
@@ -143,184 +143,184 @@ void osd_font_sdl::close()
bool osd_font_sdl::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
- TTF_Font *ttffont;
- SDL_Surface *drawsurf;
- SDL_Color fcol = { 0xff, 0xff, 0xff };
- UINT16 ustr[16];
+ TTF_Font *ttffont;
+ SDL_Surface *drawsurf;
+ SDL_Color fcol = { 0xff, 0xff, 0xff };
+ UINT16 ustr[16];
- ttffont = m_font;
+ ttffont = m_font;
- memset(ustr,0,sizeof(ustr));
- ustr[0] = (UINT16)chnum;
- drawsurf = TTF_RenderUNICODE_Solid(ttffont, ustr, fcol);
+ memset(ustr,0,sizeof(ustr));
+ ustr[0] = (UINT16)chnum;
+ drawsurf = TTF_RenderUNICODE_Solid(ttffont, ustr, fcol);
- // was nothing returned?
- if (drawsurf)
- {
- // allocate a MAME destination bitmap
- bitmap.allocate(drawsurf->w, drawsurf->h);
+ // was nothing returned?
+ if (drawsurf)
+ {
+ // allocate a MAME destination bitmap
+ bitmap.allocate(drawsurf->w, drawsurf->h);
- // copy the rendered character image into it
- for (int y = 0; y < bitmap.height(); y++)
- {
- UINT32 *dstrow = &bitmap.pix32(y);
- UINT8 *srcrow = (UINT8 *)drawsurf->pixels;
+ // copy the rendered character image into it
+ for (int y = 0; y < bitmap.height(); y++)
+ {
+ UINT32 *dstrow = &bitmap.pix32(y);
+ UINT8 *srcrow = (UINT8 *)drawsurf->pixels;
- srcrow += (y * drawsurf->pitch);
+ srcrow += (y * drawsurf->pitch);
- for (int x = 0; x < drawsurf->w; x++)
- {
- dstrow[x] = srcrow[x] ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
- }
- }
+ for (int x = 0; x < drawsurf->w; x++)
+ {
+ dstrow[x] = srcrow[x] ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
+ }
+ }
- // what are these?
- xoffs = yoffs = 0;
- width = drawsurf->w;
+ // what are these?
+ xoffs = yoffs = 0;
+ width = drawsurf->w;
- SDL_FreeSurface(drawsurf);
- }
+ SDL_FreeSurface(drawsurf);
+ }
- return bitmap.valid();
+ return bitmap.valid();
}
TTF_Font * osd_font_sdl::TTF_OpenFont_Magic(astring name, int fsize)
{
- emu_file file(OPEN_FLAG_READ);
- if (file.open(name) == FILERR_NONE)
- {
- unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff };
- unsigned char magic[5] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
- file.read(buffer,5);
- if (memcmp(buffer, magic, 5))
- return NULL;
- }
- return TTF_OpenFont(name.cstr(), POINT_SIZE);
+ emu_file file(OPEN_FLAG_READ);
+ if (file.open(name) == FILERR_NONE)
+ {
+ unsigned char buffer[5] = { 0xff, 0xff, 0xff, 0xff, 0xff };
+ unsigned char magic[5] = { 0x00, 0x01, 0x00, 0x00, 0x00 };
+ file.read(buffer,5);
+ if (memcmp(buffer, magic, 5))
+ return NULL;
+ }
+ return TTF_OpenFont(name.cstr(), POINT_SIZE);
}
bool osd_font_sdl::BDF_Check_Magic(astring name)
{
- emu_file file(OPEN_FLAG_READ);
- if (file.open(name) == FILERR_NONE)
- {
- unsigned char buffer[9];
- unsigned char magic[9] = { 'S', 'T', 'A', 'R', 'T', 'F', 'O', 'N', 'T' };
- file.read(buffer, 9);
- file.close();
- if (!memcmp(buffer, magic, 9))
- return true;
- }
-
- return false;
+ emu_file file(OPEN_FLAG_READ);
+ if (file.open(name) == FILERR_NONE)
+ {
+ unsigned char buffer[9];
+ unsigned char magic[9] = { 'S', 'T', 'A', 'R', 'T', 'F', 'O', 'N', 'T' };
+ file.read(buffer, 9);
+ file.close();
+ if (!memcmp(buffer, magic, 9))
+ return true;
+ }
+
+ return false;
}
#ifndef SDLMAME_HAIKU
TTF_Font *osd_font_sdl::search_font_config(astring name, bool bold, bool italic, bool underline, bool &bakedstyles)
{
- TTF_Font *font = (TTF_Font *)NULL;
- FcConfig *config;
- FcPattern *pat;
- FcObjectSet *os;
- FcFontSet *fontset;
- FcValue val;
-
- config = FcConfigGetCurrent();
- pat = FcPatternCreate();
- os = FcObjectSetCreate();
- FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.cstr());
-
- // try and get a font with the requested styles baked-in
- if (bold)
- {
- if (italic)
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold Italic");
- }
- else
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold");
- }
- }
- else if (italic)
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Italic");
- }
- else
- {
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
- }
-
- FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
-
- FcObjectSetAdd(os, FC_FILE);
- fontset = FcFontList(config, pat, os);
-
- for (int i = 0; i < fontset->nfont; i++)
- {
- if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
- {
- continue;
- }
-
- if (val.type != FcTypeString)
- {
- continue;
- }
-
- osd_printf_verbose("Matching font: %s\n", val.u.s);
- {
- astring match_name((const char*)val.u.s);
- font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
- }
-
- if (font)
- {
- bakedstyles = true;
- break;
- }
- }
-
- // didn't get a font above? try again with no baked-in styles
- if (!font)
- {
- FcPatternDestroy(pat);
- FcFontSetDestroy(fontset);
-
- pat = FcPatternCreate();
- FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.cstr());
- FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
- FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
- fontset = FcFontList(config, pat, os);
-
- for (int i = 0; i < fontset->nfont; i++)
- {
- if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
- {
- continue;
- }
-
- if (val.type != FcTypeString)
- {
- continue;
- }
-
- osd_printf_verbose("Matching unstyled font: %s\n", val.u.s);
- {
- astring match_name((const char*)val.u.s);
- font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
- }
-
- if (font)
- {
- break;
- }
- }
- }
-
- FcPatternDestroy(pat);
- FcObjectSetDestroy(os);
- FcFontSetDestroy(fontset);
- return font;
+ TTF_Font *font = (TTF_Font *)NULL;
+ FcConfig *config;
+ FcPattern *pat;
+ FcObjectSet *os;
+ FcFontSet *fontset;
+ FcValue val;
+
+ config = FcConfigGetCurrent();
+ pat = FcPatternCreate();
+ os = FcObjectSetCreate();
+ FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.cstr());
+
+ // try and get a font with the requested styles baked-in
+ if (bold)
+ {
+ if (italic)
+ {
+ FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold Italic");
+ }
+ else
+ {
+ FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Bold");
+ }
+ }
+ else if (italic)
+ {
+ FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Italic");
+ }
+ else
+ {
+ FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
+ }
+
+ FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
+
+ FcObjectSetAdd(os, FC_FILE);
+ fontset = FcFontList(config, pat, os);
+
+ for (int i = 0; i < fontset->nfont; i++)
+ {
+ if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
+ {
+ continue;
+ }
+
+ if (val.type != FcTypeString)
+ {
+ continue;
+ }
+
+ osd_printf_verbose("Matching font: %s\n", val.u.s);
+ {
+ astring match_name((const char*)val.u.s);
+ font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
+ }
+
+ if (font)
+ {
+ bakedstyles = true;
+ break;
+ }
+ }
+
+ // didn't get a font above? try again with no baked-in styles
+ if (!font)
+ {
+ FcPatternDestroy(pat);
+ FcFontSetDestroy(fontset);
+
+ pat = FcPatternCreate();
+ FcPatternAddString(pat, FC_FAMILY, (const FcChar8 *)name.cstr());
+ FcPatternAddString(pat, FC_STYLE, (const FcChar8 *)"Regular");
+ FcPatternAddString(pat, FC_FONTFORMAT, (const FcChar8 *)"TrueType");
+ fontset = FcFontList(config, pat, os);
+
+ for (int i = 0; i < fontset->nfont; i++)
+ {
+ if (FcPatternGet(fontset->fonts[i], FC_FILE, 0, &val) != FcResultMatch)
+ {
+ continue;
+ }
+
+ if (val.type != FcTypeString)
+ {
+ continue;
+ }
+
+ osd_printf_verbose("Matching unstyled font: %s\n", val.u.s);
+ {
+ astring match_name((const char*)val.u.s);
+ font = TTF_OpenFont_Magic(match_name, POINT_SIZE);
+ }
+
+ if (font)
+ {
+ break;
+ }
+ }
+ }
+
+ FcPatternDestroy(pat);
+ FcObjectSetDestroy(os);
+ FcFontSetDestroy(fontset);
+ return font;
}
#endif
@@ -328,35 +328,33 @@ TTF_Font *osd_font_sdl::search_font_config(astring name, bool bold, bool italic,
class font_sdl : public osd_module, public font_module
{
public:
- font_sdl()
- : osd_module(OSD_FONT_PROVIDER, "sdl"), font_module()
- {
- }
-
- osd_font *font_alloc()
- {
- return global_alloc(osd_font_sdl);
- }
-
- int init()
- {
- if (TTF_Init() == -1)
- {
- osd_printf_error("SDL_ttf failed: %s\n", TTF_GetError());
- return -1;
- }
- return 0;
- }
-
- virtual void exit()
- {
- TTF_Quit();
- }
+ font_sdl()
+ : osd_module(OSD_FONT_PROVIDER, "sdl"), font_module()
+ {
+ }
+
+ osd_font *font_alloc()
+ {
+ return global_alloc(osd_font_sdl);
+ }
+
+ int init()
+ {
+ if (TTF_Init() == -1)
+ {
+ osd_printf_error("SDL_ttf failed: %s\n", TTF_GetError());
+ return -1;
+ }
+ return 0;
+ }
+
+ virtual void exit()
+ {
+ TTF_Quit();
+ }
};
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(font_sdl, OSD_FONT_PROVIDER, "sdl")
+ MODULE_NOT_SUPPORTED(font_sdl, OSD_FONT_PROVIDER, "sdl")
#endif
MODULE_DEFINITION(FONT_SDL, font_sdl)
-
-
diff --git a/src/osd/modules/font/font_windows.c b/src/osd/modules/font/font_windows.c
index 054ef077148..458534f3a74 100644
--- a/src/osd/modules/font/font_windows.c
+++ b/src/osd/modules/font/font_windows.c
@@ -34,72 +34,72 @@
class osd_font_windows : public osd_font
{
public:
- virtual ~osd_font_windows() {};
+ virtual ~osd_font_windows() {};
- virtual bool open(const char *font_path, const char *name, int &height);
- virtual void close();
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
+ virtual bool open(const char *font_path, const char *name, int &height);
+ virtual void close();
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs);
private:
- HGDIOBJ m_font;
+ HGDIOBJ m_font;
};
bool osd_font_windows::open(const char *font_path, const char *_name, int &height)
{
- // accept qualifiers from the name
- astring name(_name);
- if (name == "default") name = "Tahoma";
- bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0);
- bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0);
-
- // build a basic LOGFONT description of what we want
- LOGFONT logfont;
- logfont.lfHeight = DEFAULT_FONT_HEIGHT;
- logfont.lfWidth = 0;
- logfont.lfEscapement = 0;
- logfont.lfOrientation = 0;
- logfont.lfWeight = bold ? FW_BOLD : FW_MEDIUM;
- logfont.lfItalic = italic;
- logfont.lfUnderline = FALSE;
- logfont.lfStrikeOut = FALSE;
- logfont.lfCharSet = ANSI_CHARSET;
- logfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
- logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
- logfont.lfQuality = NONANTIALIASED_QUALITY;
- logfont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
-
- // copy in the face name
- TCHAR *face = tstring_from_utf8(name);
- _tcsncpy(logfont.lfFaceName, face, sizeof(logfont.lfFaceName) / sizeof(TCHAR));
- logfont.lfFaceName[sizeof(logfont.lfFaceName) / sizeof(TCHAR)-1] = 0;
- osd_free(face);
-
- // create the font
- height = logfont.lfHeight;
- m_font = CreateFontIndirect(&logfont);
- if (m_font == NULL)
- return false;
-
- // select it into a temp DC and get the real font name
- HDC dummyDC = CreateCompatibleDC(NULL);
- HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
- TCHAR realname[100];
- GetTextFace(dummyDC, ARRAY_LENGTH(realname), realname);
- SelectObject(dummyDC, oldfont);
- DeleteDC(dummyDC);
-
- // if it doesn't match our request, fail
- char *utf = utf8_from_tstring(realname);
- int result = core_stricmp(utf, name);
- osd_free(utf);
-
- // if we didn't match, nuke our font and fall back
- if (result != 0)
- {
- DeleteObject(m_font);
- m_font = NULL;
- return false;
- }
- return true;
+ // accept qualifiers from the name
+ astring name(_name);
+ if (name == "default") name = "Tahoma";
+ bool bold = (name.replace(0, "[B]", "") + name.replace(0, "[b]", "") > 0);
+ bool italic = (name.replace(0, "[I]", "") + name.replace(0, "[i]", "") > 0);
+
+ // build a basic LOGFONT description of what we want
+ LOGFONT logfont;
+ logfont.lfHeight = DEFAULT_FONT_HEIGHT;
+ logfont.lfWidth = 0;
+ logfont.lfEscapement = 0;
+ logfont.lfOrientation = 0;
+ logfont.lfWeight = bold ? FW_BOLD : FW_MEDIUM;
+ logfont.lfItalic = italic;
+ logfont.lfUnderline = FALSE;
+ logfont.lfStrikeOut = FALSE;
+ logfont.lfCharSet = ANSI_CHARSET;
+ logfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
+ logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
+ logfont.lfQuality = NONANTIALIASED_QUALITY;
+ logfont.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
+
+ // copy in the face name
+ TCHAR *face = tstring_from_utf8(name);
+ _tcsncpy(logfont.lfFaceName, face, sizeof(logfont.lfFaceName) / sizeof(TCHAR));
+ logfont.lfFaceName[sizeof(logfont.lfFaceName) / sizeof(TCHAR)-1] = 0;
+ osd_free(face);
+
+ // create the font
+ height = logfont.lfHeight;
+ m_font = CreateFontIndirect(&logfont);
+ if (m_font == NULL)
+ return false;
+
+ // select it into a temp DC and get the real font name
+ HDC dummyDC = CreateCompatibleDC(NULL);
+ HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
+ TCHAR realname[100];
+ GetTextFace(dummyDC, ARRAY_LENGTH(realname), realname);
+ SelectObject(dummyDC, oldfont);
+ DeleteDC(dummyDC);
+
+ // if it doesn't match our request, fail
+ char *utf = utf8_from_tstring(realname);
+ int result = core_stricmp(utf, name);
+ osd_free(utf);
+
+ // if we didn't match, nuke our font and fall back
+ if (result != 0)
+ {
+ DeleteObject(m_font);
+ m_font = NULL;
+ return false;
+ }
+ return true;
}
//-------------------------------------------------
@@ -109,9 +109,9 @@ bool osd_font_windows::open(const char *font_path, const char *_name, int &heigh
void osd_font_windows::close()
{
- // delete the font ojbect
- if (m_font != NULL)
- DeleteObject(m_font);
+ // delete the font ojbect
+ if (m_font != NULL)
+ DeleteObject(m_font);
}
@@ -125,155 +125,155 @@ void osd_font_windows::close()
bool osd_font_windows::get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs)
{
- // create a dummy DC to work with
- HDC dummyDC = CreateCompatibleDC(NULL);
- HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
-
- // get the text metrics
- TEXTMETRIC metrics = { 0 };
- GetTextMetrics(dummyDC, &metrics);
-
- // get the width of this character
- ABC abc;
- if (!GetCharABCWidths(dummyDC, chnum, chnum, &abc))
- {
- abc.abcA = 0;
- abc.abcC = 0;
- GetCharWidth32(dummyDC, chnum, chnum, reinterpret_cast<LPINT>(&abc.abcB));
- }
- width = abc.abcA + abc.abcB + abc.abcC;
-
- // determine desired bitmap size
- int bmwidth = (50 + abc.abcA + abc.abcB + abc.abcC + 50 + 31) & ~31;
- int bmheight = 50 + metrics.tmHeight + 50;
-
- // describe the bitmap we want
- BYTE bitmapinfodata[sizeof(BITMAPINFOHEADER)+2 * sizeof(RGBQUAD)] = { 0 };
- BITMAPINFO &info = *reinterpret_cast<BITMAPINFO *>(bitmapinfodata);
- info.bmiHeader.biSize = sizeof(info.bmiHeader);
- info.bmiHeader.biWidth = bmwidth;
- info.bmiHeader.biHeight = -bmheight;
- info.bmiHeader.biPlanes = 1;
- info.bmiHeader.biBitCount = 1;
- info.bmiHeader.biCompression = BI_RGB;
- info.bmiHeader.biSizeImage = 0;
- info.bmiHeader.biXPelsPerMeter = GetDeviceCaps(dummyDC, HORZRES) / GetDeviceCaps(dummyDC, HORZSIZE);
- info.bmiHeader.biYPelsPerMeter = GetDeviceCaps(dummyDC, VERTRES) / GetDeviceCaps(dummyDC, VERTSIZE);
- info.bmiHeader.biClrUsed = 0;
- info.bmiHeader.biClrImportant = 0;
- RGBQUAD col1 = info.bmiColors[0];
- RGBQUAD col2 = info.bmiColors[1];
- col1.rgbBlue = col1.rgbGreen = col1.rgbRed = 0x00;
- col2.rgbBlue = col2.rgbGreen = col2.rgbRed = 0xff;
-
- // create a DIB to render to
- BYTE *bits;
- HBITMAP dib = CreateDIBSection(dummyDC, &info, DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits), NULL, 0);
- HGDIOBJ oldbitmap = SelectObject(dummyDC, dib);
-
- // clear the bitmap
- int rowbytes = bmwidth / 8;
- memset(bits, 0, rowbytes * bmheight);
-
- // now draw the character
- WCHAR tempchar = chnum;
- SetTextColor(dummyDC, RGB(0xff, 0xff, 0xff));
- SetBkColor(dummyDC, RGB(0x00, 0x00, 0x00));
- ExtTextOutW(dummyDC, 50 + abc.abcA, 50, ETO_OPAQUE, NULL, &tempchar, 1, NULL);
-
- // characters are expected to be full-height
- rectangle actbounds;
- actbounds.min_y = 50;
- actbounds.max_y = 50 + metrics.tmHeight - 1;
-
- // determine the actual left of the character
- for (actbounds.min_x = 0; actbounds.min_x < rowbytes; actbounds.min_x++)
- {
- BYTE *offs = bits + actbounds.min_x;
- UINT8 summary = 0;
- for (int y = 0; y < bmheight; y++)
- summary |= offs[y * rowbytes];
- if (summary != 0)
- {
- actbounds.min_x *= 8;
- if (!(summary & 0x80)) actbounds.min_x++;
- if (!(summary & 0xc0)) actbounds.min_x++;
- if (!(summary & 0xe0)) actbounds.min_x++;
- if (!(summary & 0xf0)) actbounds.min_x++;
- if (!(summary & 0xf8)) actbounds.min_x++;
- if (!(summary & 0xfc)) actbounds.min_x++;
- if (!(summary & 0xfe)) actbounds.min_x++;
- break;
- }
- }
-
- // determine the actual right of the character
- for (actbounds.max_x = rowbytes - 1; actbounds.max_x >= 0; actbounds.max_x--)
- {
- BYTE *offs = bits + actbounds.max_x;
- UINT8 summary = 0;
- for (int y = 0; y < bmheight; y++)
- summary |= offs[y * rowbytes];
- if (summary != 0)
- {
- actbounds.max_x *= 8;
- if (summary & 0x7f) actbounds.max_x++;
- if (summary & 0x3f) actbounds.max_x++;
- if (summary & 0x1f) actbounds.max_x++;
- if (summary & 0x0f) actbounds.max_x++;
- if (summary & 0x07) actbounds.max_x++;
- if (summary & 0x03) actbounds.max_x++;
- if (summary & 0x01) actbounds.max_x++;
- break;
- }
- }
-
- // allocate a new bitmap
- if (actbounds.max_x >= actbounds.min_x && actbounds.max_y >= actbounds.min_y)
- {
- bitmap.allocate(actbounds.max_x + 1 - actbounds.min_x, actbounds.max_y + 1 - actbounds.min_y);
-
- // copy the bits into it
- for (int y = 0; y < bitmap.height(); y++)
- {
- UINT32 *dstrow = &bitmap.pix32(y);
- UINT8 *srcrow = &bits[(y + actbounds.min_y) * rowbytes];
- for (int x = 0; x < bitmap.width(); x++)
- {
- int effx = x + actbounds.min_x;
- dstrow[x] = ((srcrow[effx / 8] << (effx % 8)) & 0x80) ? rgb_t(0xff, 0xff, 0xff, 0xff) : rgb_t(0x00, 0xff, 0xff, 0xff);
- }
- }
-
- // set the final offset values
- xoffs = actbounds.min_x - (50 + abc.abcA);
- yoffs = actbounds.max_y - (50 + metrics.tmAscent);
- }
-
- // de-select the font and release the DC
- SelectObject(dummyDC, oldbitmap);
- DeleteObject(dib);
- SelectObject(dummyDC, oldfont);
- DeleteDC(dummyDC);
- return bitmap.valid();
+ // create a dummy DC to work with
+ HDC dummyDC = CreateCompatibleDC(NULL);
+ HGDIOBJ oldfont = SelectObject(dummyDC, m_font);
+
+ // get the text metrics
+ TEXTMETRIC metrics = { 0 };
+ GetTextMetrics(dummyDC, &metrics);
+
+ // get the width of this character
+ ABC abc;
+ if (!GetCharABCWidths(dummyDC, chnum, chnum, &abc))
+ {
+ abc.abcA = 0;
+ abc.abcC = 0;
+ GetCharWidth32(dummyDC, chnum, chnum, reinterpret_cast<LPINT>(&abc.abcB));
+ }
+ width = abc.abcA + abc.abcB + abc.abcC;
+
+ // determine desired bitmap size
+ int bmwidth = (50 + abc.abcA + abc.abcB + abc.abcC + 50 + 31) & ~31;
+ int bmheight = 50 + metrics.tmHeight + 50;
+
+ // describe the bitmap we want
+ BYTE bitmapinfodata[sizeof(BITMAPINFOHEADER)+2 * sizeof(RGBQUAD)] = { 0 };
+ BITMAPINFO &info = *reinterpret_cast<BITMAPINFO *>(bitmapinfodata);
+ info.bmiHeader.biSize = sizeof(info.bmiHeader);
+ info.bmiHeader.biWidth = bmwidth;
+ info.bmiHeader.biHeight = -bmheight;
+ info.bmiHeader.biPlanes = 1;
+ info.bmiHeader.biBitCount = 1;
+ info.bmiHeader.biCompression = BI_RGB;
+ info.bmiHeader.biSizeImage = 0;
+ info.bmiHeader.biXPelsPerMeter = GetDeviceCaps(dummyDC, HORZRES) / GetDeviceCaps(dummyDC, HORZSIZE);
+ info.bmiHeader.biYPelsPerMeter = GetDeviceCaps(dummyDC, VERTRES) / GetDeviceCaps(dummyDC, VERTSIZE);
+ info.bmiHeader.biClrUsed = 0;
+ info.bmiHeader.biClrImportant = 0;
+ RGBQUAD col1 = info.bmiColors[0];
+ RGBQUAD col2 = info.bmiColors[1];
+ col1.rgbBlue = col1.rgbGreen = col1.rgbRed = 0x00;
+ col2.rgbBlue = col2.rgbGreen = col2.rgbRed = 0xff;
+
+ // create a DIB to render to
+ BYTE *bits;
+ HBITMAP dib = CreateDIBSection(dummyDC, &info, DIB_RGB_COLORS, reinterpret_cast<VOID **>(&bits), NULL, 0);
+ HGDIOBJ oldbitmap = SelectObject(dummyDC, dib);
+
+ // clear the bitmap
+ int rowbytes = bmwidth / 8;
+ memset(bits, 0, rowbytes * bmheight);
+
+ // now draw the character
+ WCHAR tempchar = chnum;
+ SetTextColor(dummyDC, RGB(0xff, 0xff, 0xff));
+ SetBkColor(dummyDC, RGB(0x00, 0x00, 0x00));
+ ExtTextOutW(dummyDC, 50 + abc.abcA, 50, ETO_OPAQUE, NULL, &tempchar, 1, NULL);
+
+ // characters are expected to be full-height
+ rectangle actbounds;
+ actbounds.min_y = 50;
+ actbounds.max_y = 50 + metrics.tmHeight - 1;
+
+ // determine the actual left of the character
+ for (actbounds.min_x = 0; actbounds.min_x < rowbytes; actbounds.min_x++)
+ {
+ BYTE *offs = bits + actbounds.min_x;
+ UINT8 summary = 0;
+ for (int y = 0; y < bmheight; y++)
+ summary |= offs[y * rowbytes];
+ if (summary != 0)
+ {
+ actbounds.min_x *= 8;
+ if (!(summary & 0x80)) actbounds.min_x++;
+ if (!(summary & 0xc0)) actbounds.min_x++;
+ if (!(summary & 0xe0)) actbounds.min_x++;
+ if (!(summary & 0xf0)) actbounds.min_x++;
+ if (!(summary & 0xf8)) actbounds.min_x++;
+ if (!(summary & 0xfc)) actbounds.min_x++;
+ if (!(summary & 0xfe)) actbounds.min_x++;
+ break;
+ }
+ }
+
+ // determine the actual right of the character
+ for (actbounds.max_x = rowbytes - 1; actbounds.max_x >= 0; actbounds.max_x--)
+ {
+ BYTE *offs = bits + actbounds.max_x;
+ UINT8 summary = 0;
+ for (int y = 0; y < bmheight; y++)
+ summary |= offs[y * rowbytes];
+ if (summary != 0)
+ {
+ actbounds.max_x *= 8;
+ if (summary & 0x7f) actbounds.max_x++;
+ if (summary & 0x3f) actbounds.max_x++;
+ if (summary & 0x1f) actbounds.max_x++;
+ if (summary & 0x0f) actbounds.max_x++;
+ if (summary & 0x07) actbounds.max_x++;
+ if (summary & 0x03) actbounds.max_x++;
+ if (summary & 0x01) actbounds.max_x++;
+ break;
+ }
+ }
+
+ // allocate a new bitmap
+ if (actbounds.max_x >= actbounds.min_x && actbounds.max_y >= actbounds.min_y)
+ {
+ bitmap.allocate(actbounds.max_x + 1 - actbounds.min_x, actbounds.max_y + 1 - actbounds.min_y);
+
+ // copy the bits into it
+ for (int y = 0; y < bitmap.height(); y++)
+ {
+ UINT32 *dstrow = &bitmap.pix32(y);
+ UINT8 *srcrow = &bits[(y + actbounds.min_y) * rowbytes];
+ for (int x = 0; x < bitmap.width(); x++)
+ {
+ int effx = x + actbounds.min_x;
+ dstrow[x] = ((srcrow[effx / 8] << (effx % 8)) & 0x80) ? rgb_t(0xff, 0xff, 0xff, 0xff) : rgb_t(0x00, 0xff, 0xff, 0xff);
+ }
+ }
+
+ // set the final offset values
+ xoffs = actbounds.min_x - (50 + abc.abcA);
+ yoffs = actbounds.max_y - (50 + metrics.tmAscent);
+ }
+
+ // de-select the font and release the DC
+ SelectObject(dummyDC, oldbitmap);
+ DeleteObject(dib);
+ SelectObject(dummyDC, oldfont);
+ DeleteDC(dummyDC);
+ return bitmap.valid();
}
class font_win : public osd_module, public font_module
{
public:
- font_win()
- : osd_module(OSD_FONT_PROVIDER, "win"), font_module()
- {
- }
+ font_win()
+ : osd_module(OSD_FONT_PROVIDER, "win"), font_module()
+ {
+ }
- osd_font *font_alloc()
- {
- return global_alloc(osd_font_windows);
- }
+ osd_font *font_alloc()
+ {
+ return global_alloc(osd_font_windows);
+ }
};
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(font_win, OSD_FONT_PROVIDER, "win")
+ MODULE_NOT_SUPPORTED(font_win, OSD_FONT_PROVIDER, "win")
#endif
MODULE_DEFINITION(FONT_WINDOWS, font_win)
diff --git a/src/osd/modules/lib/osdlib_macosx.c b/src/osd/modules/lib/osdlib_macosx.c
index 5d6233bce25..088cbd969df 100644
--- a/src/osd/modules/lib/osdlib_macosx.c
+++ b/src/osd/modules/lib/osdlib_macosx.c
@@ -34,7 +34,7 @@
const char *osd_getenv(const char *name)
{
- return getenv(name);
+ return getenv(name);
}
//============================================================
@@ -43,7 +43,7 @@ const char *osd_getenv(const char *name)
int osd_setenv(const char *name, const char *value, int overwrite)
{
- return setenv(name, value, overwrite);
+ return setenv(name, value, overwrite);
}
//============================================================
@@ -52,7 +52,7 @@ int osd_setenv(const char *name, const char *value, int overwrite)
void osd_process_kill(void)
{
- kill(getpid(), SIGKILL);
+ kill(getpid(), SIGKILL);
}
//============================================================
@@ -61,22 +61,22 @@ void osd_process_kill(void)
int osd_get_num_processors(void)
{
- int processors = 1;
-
- struct host_basic_info host_basic_info;
- unsigned int count;
- kern_return_t r;
- mach_port_t my_mach_host_self;
-
- count = HOST_BASIC_INFO_COUNT;
- my_mach_host_self = mach_host_self();
- if ( ( r = host_info(my_mach_host_self, HOST_BASIC_INFO, (host_info_t)(&host_basic_info), &count)) == KERN_SUCCESS )
- {
- processors = host_basic_info.avail_cpus;
- }
- mach_port_deallocate(mach_task_self(), my_mach_host_self);
-
- return processors;
+ int processors = 1;
+
+ struct host_basic_info host_basic_info;
+ unsigned int count;
+ kern_return_t r;
+ mach_port_t my_mach_host_self;
+
+ count = HOST_BASIC_INFO_COUNT;
+ my_mach_host_self = mach_host_self();
+ if ( ( r = host_info(my_mach_host_self, HOST_BASIC_INFO, (host_info_t)(&host_basic_info), &count)) == KERN_SUCCESS )
+ {
+ processors = host_basic_info.avail_cpus;
+ }
+ mach_port_deallocate(mach_task_self(), my_mach_host_self);
+
+ return processors;
}
//============================================================
@@ -86,7 +86,7 @@ int osd_get_num_processors(void)
void *osd_malloc(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -100,7 +100,7 @@ void *osd_malloc(size_t size)
void *osd_malloc_array(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -114,7 +114,7 @@ void *osd_malloc_array(size_t size)
void osd_free(void *ptr)
{
#ifndef MALLOC_DEBUG
- free(ptr);
+ free(ptr);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -131,9 +131,9 @@ void osd_free(void *ptr)
void *osd_alloc_executable(size_t size)
{
#if defined(SDLMAME_BSD) || defined(SDLMAME_MACOSX)
- return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
+ return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
#elif defined(SDLMAME_UNIX)
- return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
+ return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
#endif
}
@@ -146,9 +146,9 @@ void *osd_alloc_executable(size_t size)
void osd_free_executable(void *ptr, size_t size)
{
#ifdef SDLMAME_SOLARIS
- munmap((char *)ptr, size);
+ munmap((char *)ptr, size);
#else
- munmap(ptr, size);
+ munmap(ptr, size);
#endif
}
@@ -158,13 +158,13 @@ void osd_free_executable(void *ptr, size_t size)
void osd_break_into_debugger(const char *message)
{
- #ifdef MAME_DEBUG
- printf("MAME exception: %s\n", message);
- printf("Attempting to fall into debugger\n");
- kill(getpid(), SIGTRAP);
- #else
- printf("Ignoring MAME exception: %s\n", message);
- #endif
+ #ifdef MAME_DEBUG
+ printf("MAME exception: %s\n", message);
+ printf("Attempting to fall into debugger\n");
+ kill(getpid(), SIGTRAP);
+ #else
+ printf("Ignoring MAME exception: %s\n", message);
+ #endif
}
@@ -191,36 +191,36 @@ static osd_ticks_t ticks_per_second;
static osd_ticks_t init_cycle_counter(void)
{
- osd_ticks_t start, end;
- osd_ticks_t a, b;
+ osd_ticks_t start, end;
+ osd_ticks_t a, b;
- cycle_counter = mach_cycle_counter;
- ticks_counter = mach_cycle_counter;
+ cycle_counter = mach_cycle_counter;
+ ticks_counter = mach_cycle_counter;
- // wait for an edge on the timeGetTime call
- a = SDL_GetTicks();
- do
- {
- b = SDL_GetTicks();
- } while (a == b);
+ // wait for an edge on the timeGetTime call
+ a = SDL_GetTicks();
+ do
+ {
+ b = SDL_GetTicks();
+ } while (a == b);
- // get the starting cycle count
- start = (*cycle_counter)();
+ // get the starting cycle count
+ start = (*cycle_counter)();
- // now wait for 1/4 second total
- do
- {
- a = SDL_GetTicks();
- } while (a - b < 250);
+ // now wait for 1/4 second total
+ do
+ {
+ a = SDL_GetTicks();
+ } while (a - b < 250);
- // get the ending cycle count
- end = (*cycle_counter)();
+ // get the ending cycle count
+ end = (*cycle_counter)();
- // compute ticks_per_sec
- ticks_per_second = (end - start) * 4;
+ // compute ticks_per_sec
+ ticks_per_second = (end - start) * 4;
- // return the current cycle count
- return (*cycle_counter)();
+ // return the current cycle count
+ return (*cycle_counter)();
}
//============================================================
@@ -232,7 +232,7 @@ static osd_ticks_t init_cycle_counter(void)
//============================================================
static osd_ticks_t mach_cycle_counter(void)
{
- return mach_absolute_time();
+ return mach_absolute_time();
}
//============================================================
@@ -241,7 +241,7 @@ static osd_ticks_t mach_cycle_counter(void)
osd_ticks_t osd_ticks(void)
{
- return (*cycle_counter)();
+ return (*cycle_counter)();
}
@@ -251,12 +251,12 @@ osd_ticks_t osd_ticks(void)
osd_ticks_t osd_ticks_per_second(void)
{
- if (ticks_per_second == 0)
- {
- // if we haven't computed the value yet, there's no time like the present
- init_cycle_counter();
- }
- return ticks_per_second;
+ if (ticks_per_second == 0)
+ {
+ // if we haven't computed the value yet, there's no time like the present
+ init_cycle_counter();
+ }
+ return ticks_per_second;
}
@@ -267,20 +267,20 @@ osd_ticks_t osd_ticks_per_second(void)
void osd_sleep(osd_ticks_t duration)
{
- UINT32 msec;
-
- // make sure we've computed ticks_per_second
- if (ticks_per_second == 0)
- (void)osd_ticks();
-
- // convert to milliseconds, rounding down
- msec = (UINT32)(duration * 1000 / ticks_per_second);
-
- // only sleep if at least 2 full milliseconds
- if (msec >= 2)
- {
- // take a couple of msecs off the top for good measure
- msec -= 2;
- usleep(msec*1000);
- }
+ UINT32 msec;
+
+ // make sure we've computed ticks_per_second
+ if (ticks_per_second == 0)
+ (void)osd_ticks();
+
+ // convert to milliseconds, rounding down
+ msec = (UINT32)(duration * 1000 / ticks_per_second);
+
+ // only sleep if at least 2 full milliseconds
+ if (msec >= 2)
+ {
+ // take a couple of msecs off the top for good measure
+ msec -= 2;
+ usleep(msec*1000);
+ }
}
diff --git a/src/osd/modules/lib/osdlib_os2.c b/src/osd/modules/lib/osdlib_os2.c
index d852ea5ce93..9e1ab8fd52d 100644
--- a/src/osd/modules/lib/osdlib_os2.c
+++ b/src/osd/modules/lib/osdlib_os2.c
@@ -31,7 +31,7 @@
const char *osd_getenv(const char *name)
{
- return getenv(name);
+ return getenv(name);
}
//============================================================
@@ -40,7 +40,7 @@ const char *osd_getenv(const char *name)
int osd_setenv(const char *name, const char *value, int overwrite)
{
- return setenv(name, value, overwrite);
+ return setenv(name, value, overwrite);
}
//============================================================
@@ -49,7 +49,7 @@ int osd_setenv(const char *name, const char *value, int overwrite)
void osd_process_kill(void)
{
- fprintf(stderr,"osd_process_kill missing in OS/2 build\n");
+ fprintf(stderr,"osd_process_kill missing in OS/2 build\n");
}
//============================================================
@@ -58,11 +58,11 @@ void osd_process_kill(void)
int osd_get_num_processors(void)
{
- ULONG numprocs = 1;
+ ULONG numprocs = 1;
- DosQuerySysInfo(QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numprocs, sizeof(numprocs));
+ DosQuerySysInfo(QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numprocs, sizeof(numprocs));
- return numprocs;
+ return numprocs;
}
//============================================================
@@ -72,7 +72,7 @@ int osd_get_num_processors(void)
void *osd_malloc(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -86,7 +86,7 @@ void *osd_malloc(size_t size)
void *osd_malloc_array(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -100,7 +100,7 @@ void *osd_malloc_array(size_t size)
void osd_free(void *ptr)
{
#ifndef MALLOC_DEBUG
- free(ptr);
+ free(ptr);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -116,10 +116,10 @@ void osd_free(void *ptr)
void *osd_alloc_executable(size_t size)
{
- void *p;
+ void *p;
- DosAllocMem( &p, size, fALLOC );
- return p;
+ DosAllocMem( &p, size, fALLOC );
+ return p;
}
//============================================================
@@ -130,7 +130,7 @@ void *osd_alloc_executable(size_t size)
void osd_free_executable(void *ptr, size_t size)
{
- DosFreeMem( ptr );
+ DosFreeMem( ptr );
}
//============================================================
@@ -139,7 +139,7 @@ void osd_free_executable(void *ptr, size_t size)
void osd_break_into_debugger(const char *message)
{
- printf("Ignoring MAME exception: %s\n", message);
+ printf("Ignoring MAME exception: %s\n", message);
}
//============================================================
@@ -167,65 +167,65 @@ static osd_ticks_t ticks_per_second;
static osd_ticks_t init_cycle_counter(void)
{
- osd_ticks_t start, end;
- osd_ticks_t a, b;
-
- ULONG frequency;
- PTIB ptib;
- ULONG ulClass;
- ULONG ulDelta;
-
- DosGetInfoBlocks( &ptib, NULL );
- ulClass = HIBYTE( ptib->tib_ptib2->tib2_ulpri );
- ulDelta = LOBYTE( ptib->tib_ptib2->tib2_ulpri );
-
- if ( DosTmrQueryFreq( &frequency ) == 0 )
- {
- // use performance counter if available as it is constant
- cycle_counter = performance_cycle_counter;
- ticks_counter = performance_cycle_counter;
-
- ticks_per_second = frequency;
-
- // return the current cycle count
- return (*cycle_counter)();
- }
- else
- {
- fprintf(stderr, "No Timer available!\n");
- exit(-1);
- }
-
- // temporarily set our priority higher
- DosSetPriority( PRTYS_THREAD, PRTYC_TIMECRITICAL, PRTYD_MAXIMUM, 0 );
-
- // wait for an edge on the timeGetTime call
- a = SDL_GetTicks();
- do
- {
- b = SDL_GetTicks();
- } while (a == b);
-
- // get the starting cycle count
- start = (*cycle_counter)();
-
- // now wait for 1/4 second total
- do
- {
- a = SDL_GetTicks();
- } while (a - b < 250);
-
- // get the ending cycle count
- end = (*cycle_counter)();
-
- // compute ticks_per_sec
- ticks_per_second = (end - start) * 4;
-
- // restore our priority
- DosSetPriority( PRTYS_THREAD, ulClass, ulDelta, 0 );
-
- // return the current cycle count
- return (*cycle_counter)();
+ osd_ticks_t start, end;
+ osd_ticks_t a, b;
+
+ ULONG frequency;
+ PTIB ptib;
+ ULONG ulClass;
+ ULONG ulDelta;
+
+ DosGetInfoBlocks( &ptib, NULL );
+ ulClass = HIBYTE( ptib->tib_ptib2->tib2_ulpri );
+ ulDelta = LOBYTE( ptib->tib_ptib2->tib2_ulpri );
+
+ if ( DosTmrQueryFreq( &frequency ) == 0 )
+ {
+ // use performance counter if available as it is constant
+ cycle_counter = performance_cycle_counter;
+ ticks_counter = performance_cycle_counter;
+
+ ticks_per_second = frequency;
+
+ // return the current cycle count
+ return (*cycle_counter)();
+ }
+ else
+ {
+ fprintf(stderr, "No Timer available!\n");
+ exit(-1);
+ }
+
+ // temporarily set our priority higher
+ DosSetPriority( PRTYS_THREAD, PRTYC_TIMECRITICAL, PRTYD_MAXIMUM, 0 );
+
+ // wait for an edge on the timeGetTime call
+ a = SDL_GetTicks();
+ do
+ {
+ b = SDL_GetTicks();
+ } while (a == b);
+
+ // get the starting cycle count
+ start = (*cycle_counter)();
+
+ // now wait for 1/4 second total
+ do
+ {
+ a = SDL_GetTicks();
+ } while (a - b < 250);
+
+ // get the ending cycle count
+ end = (*cycle_counter)();
+
+ // compute ticks_per_sec
+ ticks_per_second = (end - start) * 4;
+
+ // restore our priority
+ DosSetPriority( PRTYS_THREAD, ulClass, ulDelta, 0 );
+
+ // return the current cycle count
+ return (*cycle_counter)();
}
//============================================================
@@ -234,10 +234,10 @@ static osd_ticks_t init_cycle_counter(void)
static osd_ticks_t performance_cycle_counter(void)
{
- QWORD qwTime;
+ QWORD qwTime;
- DosTmrQueryTime( &qwTime );
- return (osd_ticks_t)qwTime.ulLo;
+ DosTmrQueryTime( &qwTime );
+ return (osd_ticks_t)qwTime.ulLo;
}
//============================================================
@@ -246,7 +246,7 @@ static osd_ticks_t performance_cycle_counter(void)
osd_ticks_t osd_ticks(void)
{
- return (*cycle_counter)();
+ return (*cycle_counter)();
}
@@ -256,12 +256,12 @@ osd_ticks_t osd_ticks(void)
osd_ticks_t osd_ticks_per_second(void)
{
- if (ticks_per_second == 0)
- {
- // if we haven't computed the value yet, there's no time like the present
- init_cycle_counter();
- }
- return ticks_per_second;
+ if (ticks_per_second == 0)
+ {
+ // if we haven't computed the value yet, there's no time like the present
+ init_cycle_counter();
+ }
+ return ticks_per_second;
}
@@ -271,21 +271,20 @@ osd_ticks_t osd_ticks_per_second(void)
void osd_sleep(osd_ticks_t duration)
{
- UINT32 msec;
-
- // make sure we've computed ticks_per_second
- if (ticks_per_second == 0)
- (void)osd_ticks();
-
- // convert to milliseconds, rounding down
- msec = (UINT32)(duration * 1000 / ticks_per_second);
-
- // only sleep if at least 2 full milliseconds
- if (msec >= 2)
- {
- // take a couple of msecs off the top for good measure
- msec -= 2;
- usleep(msec*1000);
- }
+ UINT32 msec;
+
+ // make sure we've computed ticks_per_second
+ if (ticks_per_second == 0)
+ (void)osd_ticks();
+
+ // convert to milliseconds, rounding down
+ msec = (UINT32)(duration * 1000 / ticks_per_second);
+
+ // only sleep if at least 2 full milliseconds
+ if (msec >= 2)
+ {
+ // take a couple of msecs off the top for good measure
+ msec -= 2;
+ usleep(msec*1000);
+ }
}
-
diff --git a/src/osd/modules/lib/osdlib_unix.c b/src/osd/modules/lib/osdlib_unix.c
index 39eed83b918..7fe3c37988d 100644
--- a/src/osd/modules/lib/osdlib_unix.c
+++ b/src/osd/modules/lib/osdlib_unix.c
@@ -30,7 +30,7 @@
const char *osd_getenv(const char *name)
{
- return getenv(name);
+ return getenv(name);
}
//============================================================
@@ -39,7 +39,7 @@ const char *osd_getenv(const char *name)
int osd_setenv(const char *name, const char *value, int overwrite)
{
- return setenv(name, value, overwrite);
+ return setenv(name, value, overwrite);
}
//============================================================
@@ -48,7 +48,7 @@ int osd_setenv(const char *name, const char *value, int overwrite)
void osd_process_kill(void)
{
- kill(getpid(), SIGKILL);
+ kill(getpid(), SIGKILL);
}
//============================================================
@@ -57,12 +57,12 @@ void osd_process_kill(void)
int osd_get_num_processors(void)
{
- int processors = 1;
+ int processors = 1;
#if defined(_SC_NPROCESSORS_ONLN)
- processors = sysconf(_SC_NPROCESSORS_ONLN);
+ processors = sysconf(_SC_NPROCESSORS_ONLN);
#endif
- return processors;
+ return processors;
}
//============================================================
@@ -72,7 +72,7 @@ int osd_get_num_processors(void)
void *osd_malloc(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -86,7 +86,7 @@ void *osd_malloc(size_t size)
void *osd_malloc_array(size_t size)
{
#ifndef MALLOC_DEBUG
- return malloc(size);
+ return malloc(size);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -100,7 +100,7 @@ void *osd_malloc_array(size_t size)
void osd_free(void *ptr)
{
#ifndef MALLOC_DEBUG
- free(ptr);
+ free(ptr);
#else
#error "MALLOC_DEBUG not yet supported"
#endif
@@ -116,9 +116,9 @@ void osd_free(void *ptr)
void *osd_alloc_executable(size_t size)
{
#if defined(SDLMAME_BSD) || defined(SDLMAME_MACOSX)
- return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
+ return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0);
#elif defined(SDLMAME_UNIX)
- return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
+ return (void *)mmap(0, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, 0, 0);
#endif
}
@@ -131,9 +131,9 @@ void *osd_alloc_executable(size_t size)
void osd_free_executable(void *ptr, size_t size)
{
#ifdef SDLMAME_SOLARIS
- munmap((char *)ptr, size);
+ munmap((char *)ptr, size);
#else
- munmap(ptr, size);
+ munmap(ptr, size);
#endif
}
@@ -143,13 +143,13 @@ void osd_free_executable(void *ptr, size_t size)
void osd_break_into_debugger(const char *message)
{
- #ifdef MAME_DEBUG
- printf("MAME exception: %s\n", message);
- printf("Attempting to fall into debugger\n");
- kill(getpid(), SIGTRAP);
- #else
- printf("Ignoring MAME exception: %s\n", message);
- #endif
+ #ifdef MAME_DEBUG
+ printf("MAME exception: %s\n", message);
+ printf("Attempting to fall into debugger\n");
+ kill(getpid(), SIGTRAP);
+ #else
+ printf("Ignoring MAME exception: %s\n", message);
+ #endif
}
@@ -160,15 +160,15 @@ void osd_break_into_debugger(const char *message)
osd_ticks_t osd_ticks(void)
{
#ifdef SDLMAME_EMSCRIPTEN
- return (osd_ticks_t)(emscripten_get_now() * 1000.0);
+ return (osd_ticks_t)(emscripten_get_now() * 1000.0);
#else
- struct timeval tp;
- static osd_ticks_t start_sec = 0;
+ struct timeval tp;
+ static osd_ticks_t start_sec = 0;
- gettimeofday(&tp, NULL);
- if (start_sec==0)
- start_sec = tp.tv_sec;
- return (tp.tv_sec - start_sec) * (osd_ticks_t) 1000000 + tp.tv_usec;
+ gettimeofday(&tp, NULL);
+ if (start_sec==0)
+ start_sec = tp.tv_sec;
+ return (tp.tv_sec - start_sec) * (osd_ticks_t) 1000000 + tp.tv_usec;
#endif
}
@@ -179,7 +179,7 @@ osd_ticks_t osd_ticks(void)
osd_ticks_t osd_ticks_per_second(void)
{
- return (osd_ticks_t) 1000000;
+ return (osd_ticks_t) 1000000;
}
//============================================================
@@ -188,16 +188,16 @@ osd_ticks_t osd_ticks_per_second(void)
void osd_sleep(osd_ticks_t duration)
{
- UINT32 msec;
-
- // convert to milliseconds, rounding down
- msec = (UINT32)(duration * 1000 / osd_ticks_per_second());
-
- // only sleep if at least 2 full milliseconds
- if (msec >= 2)
- {
- // take a couple of msecs off the top for good measure
- msec -= 2;
- usleep(msec*1000);
- }
+ UINT32 msec;
+
+ // convert to milliseconds, rounding down
+ msec = (UINT32)(duration * 1000 / osd_ticks_per_second());
+
+ // only sleep if at least 2 full milliseconds
+ if (msec >= 2)
+ {
+ // take a couple of msecs off the top for good measure
+ msec -= 2;
+ usleep(msec*1000);
+ }
}
diff --git a/src/osd/modules/lib/osdlib_win32.c b/src/osd/modules/lib/osdlib_win32.c
index 4d78820f7d6..3150cdafc97 100644
--- a/src/osd/modules/lib/osdlib_win32.c
+++ b/src/osd/modules/lib/osdlib_win32.c
@@ -53,7 +53,7 @@ void (*s_debugger_stack_crawler)() = NULL;
const char *osd_getenv(const char *name)
{
- return getenv(name);
+ return getenv(name);
}
@@ -63,23 +63,23 @@ const char *osd_getenv(const char *name)
int osd_setenv(const char *name, const char *value, int overwrite)
{
- char *buf;
- int result;
-
- if (!overwrite)
- {
- if (osd_getenv(name) != NULL)
- return 0;
- }
- buf = (char *) osd_malloc_array(strlen(name)+strlen(value)+2);
- sprintf(buf, "%s=%s", name, value);
- result = putenv(buf);
-
- /* will be referenced by environment
- * Therefore it is not freed here
- */
-
- return result;
+ char *buf;
+ int result;
+
+ if (!overwrite)
+ {
+ if (osd_getenv(name) != NULL)
+ return 0;
+ }
+ buf = (char *) osd_malloc_array(strlen(name)+strlen(value)+2);
+ sprintf(buf, "%s=%s", name, value);
+ result = putenv(buf);
+
+ /* will be referenced by environment
+ * Therefore it is not freed here
+ */
+
+ return result;
}
//============================================================
@@ -88,7 +88,7 @@ int osd_setenv(const char *name, const char *value, int overwrite)
void osd_process_kill(void)
{
- TerminateProcess(GetCurrentProcess(), -1);
+ TerminateProcess(GetCurrentProcess(), -1);
}
//============================================================
@@ -97,13 +97,13 @@ void osd_process_kill(void)
int osd_get_num_processors(void)
{
- SYSTEM_INFO info;
+ SYSTEM_INFO info;
- // otherwise, fetch the info from the system
- GetSystemInfo(&info);
+ // otherwise, fetch the info from the system
+ GetSystemInfo(&info);
- // max out at 4 for now since scaling above that seems to do poorly
- return MIN(info.dwNumberOfProcessors, 4);
+ // max out at 4 for now since scaling above that seems to do poorly
+ return MIN(info.dwNumberOfProcessors, 4);
}
//============================================================
@@ -113,17 +113,17 @@ int osd_get_num_processors(void)
void *osd_malloc(size_t size)
{
#ifndef MALLOC_DEBUG
- return HeapAlloc(GetProcessHeap(), 0, size);
+ return HeapAlloc(GetProcessHeap(), 0, size);
#else
- // add in space for the size
- size += sizeof(size_t);
+ // add in space for the size
+ size += sizeof(size_t);
- // basic objects just come from the heap
- void *result = HeapAlloc(GetProcessHeap(), 0, size);
+ // basic objects just come from the heap
+ void *result = HeapAlloc(GetProcessHeap(), 0, size);
- // store the size and return and pointer to the data afterward
- *reinterpret_cast<size_t *>(result) = size;
- return reinterpret_cast<UINT8 *>(result) + sizeof(size_t);
+ // store the size and return and pointer to the data afterward
+ *reinterpret_cast<size_t *>(result) = size;
+ return reinterpret_cast<UINT8 *>(result) + sizeof(size_t);
#endif
}
@@ -135,30 +135,30 @@ void *osd_malloc(size_t size)
void *osd_malloc_array(size_t size)
{
#ifndef MALLOC_DEBUG
- return HeapAlloc(GetProcessHeap(), 0, size);
+ return HeapAlloc(GetProcessHeap(), 0, size);
#else
- // add in space for the size
- size += sizeof(size_t);
+ // add in space for the size
+ size += sizeof(size_t);
- // round the size up to a page boundary
- size_t rounded_size = ((size + sizeof(void *) + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
+ // round the size up to a page boundary
+ size_t rounded_size = ((size + sizeof(void *) + PAGE_SIZE - 1) / PAGE_SIZE) * PAGE_SIZE;
- // reserve that much memory, plus two guard pages
- void *page_base = VirtualAlloc(NULL, rounded_size + 2 * PAGE_SIZE, MEM_RESERVE, PAGE_NOACCESS);
- if (page_base == NULL)
- return NULL;
+ // reserve that much memory, plus two guard pages
+ void *page_base = VirtualAlloc(NULL, rounded_size + 2 * PAGE_SIZE, MEM_RESERVE, PAGE_NOACCESS);
+ if (page_base == NULL)
+ return NULL;
- // now allow access to everything but the first and last pages
- page_base = VirtualAlloc(reinterpret_cast<UINT8 *>(page_base) + PAGE_SIZE, rounded_size, MEM_COMMIT, PAGE_READWRITE);
- if (page_base == NULL)
- return NULL;
+ // now allow access to everything but the first and last pages
+ page_base = VirtualAlloc(reinterpret_cast<UINT8 *>(page_base) + PAGE_SIZE, rounded_size, MEM_COMMIT, PAGE_READWRITE);
+ if (page_base == NULL)
+ return NULL;
- // work backwards from the page base to get to the block base
- void *result = GUARD_ALIGN_START ? page_base : (reinterpret_cast<UINT8 *>(page_base) + rounded_size - size);
+ // work backwards from the page base to get to the block base
+ void *result = GUARD_ALIGN_START ? page_base : (reinterpret_cast<UINT8 *>(page_base) + rounded_size - size);
- // store the size at the start with a flag indicating it has a guard page
- *reinterpret_cast<size_t *>(result) = size | 0x80000000;
- return reinterpret_cast<UINT8 *>(result) + sizeof(size_t);
+ // store the size at the start with a flag indicating it has a guard page
+ *reinterpret_cast<size_t *>(result) = size | 0x80000000;
+ return reinterpret_cast<UINT8 *>(result) + sizeof(size_t);
#endif
}
@@ -170,20 +170,20 @@ void *osd_malloc_array(size_t size)
void osd_free(void *ptr)
{
#ifndef MALLOC_DEBUG
- HeapFree(GetProcessHeap(), 0, ptr);
+ HeapFree(GetProcessHeap(), 0, ptr);
#else
- size_t size = reinterpret_cast<size_t *>(ptr)[-1];
-
- // if no guard page, just free the pointer
- if ((size & 0x80000000) == 0)
- HeapFree(GetProcessHeap(), 0, reinterpret_cast<UINT8 *>(ptr) - sizeof(size_t));
-
- // large items need more care
- else
- {
- ULONG_PTR page_base = (reinterpret_cast<ULONG_PTR>(ptr) - sizeof(size_t)) & ~(PAGE_SIZE - 1);
- VirtualFree(reinterpret_cast<void *>(page_base - PAGE_SIZE), 0, MEM_RELEASE);
- }
+ size_t size = reinterpret_cast<size_t *>(ptr)[-1];
+
+ // if no guard page, just free the pointer
+ if ((size & 0x80000000) == 0)
+ HeapFree(GetProcessHeap(), 0, reinterpret_cast<UINT8 *>(ptr) - sizeof(size_t));
+
+ // large items need more care
+ else
+ {
+ ULONG_PTR page_base = (reinterpret_cast<ULONG_PTR>(ptr) - sizeof(size_t)) & ~(PAGE_SIZE - 1);
+ VirtualFree(reinterpret_cast<void *>(page_base - PAGE_SIZE), 0, MEM_RELEASE);
+ }
#endif
}
@@ -197,7 +197,7 @@ void osd_free(void *ptr)
void *osd_alloc_executable(size_t size)
{
- return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
}
@@ -209,7 +209,7 @@ void *osd_alloc_executable(size_t size)
void osd_free_executable(void *ptr, size_t size)
{
- VirtualFree(ptr, 0, MEM_RELEASE);
+ VirtualFree(ptr, 0, MEM_RELEASE);
}
@@ -220,19 +220,19 @@ void osd_free_executable(void *ptr, size_t size)
void osd_break_into_debugger(const char *message)
{
#ifdef OSD_WINDOWS
- if (IsDebuggerPresent())
- {
- win_output_debug_string_utf8(message);
- DebugBreak();
- }
- else if (s_debugger_stack_crawler != NULL)
- (*s_debugger_stack_crawler)();
+ if (IsDebuggerPresent())
+ {
+ win_output_debug_string_utf8(message);
+ DebugBreak();
+ }
+ else if (s_debugger_stack_crawler != NULL)
+ (*s_debugger_stack_crawler)();
#else
- if (IsDebuggerPresent())
- {
- OutputDebugStringA(message);
- DebugBreak();
- }
+ if (IsDebuggerPresent())
+ {
+ OutputDebugStringA(message);
+ DebugBreak();
+ }
#endif
}
@@ -252,36 +252,36 @@ static BOOL using_qpc = TRUE;
osd_ticks_t osd_ticks(void)
{
- LARGE_INTEGER performance_count;
-
- // if we're suspended, just return that
- if (suspend_ticks != 0)
- return suspend_ticks;
-
- // if we have a per second count, just go for it
- if (ticks_per_second != 0)
- {
- // QueryPerformanceCounter if we can
- if (using_qpc)
- {
- QueryPerformanceCounter(&performance_count);
- return (osd_ticks_t)performance_count.QuadPart - suspend_ticks;
- }
-
- // otherwise, fall back to timeGetTime
- else
- return (osd_ticks_t)timeGetTime() - suspend_ticks;
- }
-
- // if not, we have to determine it
- using_qpc = QueryPerformanceFrequency(&performance_count) && (performance_count.QuadPart != 0);
- if (using_qpc)
- ticks_per_second = (osd_ticks_t)performance_count.QuadPart;
- else
- ticks_per_second = 1000;
-
- // call ourselves to get the first value
- return osd_ticks();
+ LARGE_INTEGER performance_count;
+
+ // if we're suspended, just return that
+ if (suspend_ticks != 0)
+ return suspend_ticks;
+
+ // if we have a per second count, just go for it
+ if (ticks_per_second != 0)
+ {
+ // QueryPerformanceCounter if we can
+ if (using_qpc)
+ {
+ QueryPerformanceCounter(&performance_count);
+ return (osd_ticks_t)performance_count.QuadPart - suspend_ticks;
+ }
+
+ // otherwise, fall back to timeGetTime
+ else
+ return (osd_ticks_t)timeGetTime() - suspend_ticks;
+ }
+
+ // if not, we have to determine it
+ using_qpc = QueryPerformanceFrequency(&performance_count) && (performance_count.QuadPart != 0);
+ if (using_qpc)
+ ticks_per_second = (osd_ticks_t)performance_count.QuadPart;
+ else
+ ticks_per_second = 1000;
+
+ // call ourselves to get the first value
+ return osd_ticks();
}
@@ -291,9 +291,9 @@ osd_ticks_t osd_ticks(void)
osd_ticks_t osd_ticks_per_second(void)
{
- if (ticks_per_second == 0)
- osd_ticks();
- return ticks_per_second;
+ if (ticks_per_second == 0)
+ osd_ticks();
+ return ticks_per_second;
}
//============================================================
@@ -302,28 +302,28 @@ osd_ticks_t osd_ticks_per_second(void)
void osd_sleep(osd_ticks_t duration)
{
- DWORD msec;
-
- // make sure we've computed ticks_per_second
- if (ticks_per_second == 0)
- (void)osd_ticks();
-
- // convert to milliseconds, rounding down
- msec = (DWORD)(duration * 1000 / ticks_per_second);
-
- // only sleep if at least 2 full milliseconds
- if (msec >= 2)
- {
- HANDLE current_thread = GetCurrentThread();
- int old_priority = GetThreadPriority(current_thread);
-
- // take a couple of msecs off the top for good measure
- msec -= 2;
-
- // bump our thread priority super high so that we get
- // priority when we need it
- SetThreadPriority(current_thread, THREAD_PRIORITY_TIME_CRITICAL);
- Sleep(msec);
- SetThreadPriority(current_thread, old_priority);
- }
+ DWORD msec;
+
+ // make sure we've computed ticks_per_second
+ if (ticks_per_second == 0)
+ (void)osd_ticks();
+
+ // convert to milliseconds, rounding down
+ msec = (DWORD)(duration * 1000 / ticks_per_second);
+
+ // only sleep if at least 2 full milliseconds
+ if (msec >= 2)
+ {
+ HANDLE current_thread = GetCurrentThread();
+ int old_priority = GetThreadPriority(current_thread);
+
+ // take a couple of msecs off the top for good measure
+ msec -= 2;
+
+ // bump our thread priority super high so that we get
+ // priority when we need it
+ SetThreadPriority(current_thread, THREAD_PRIORITY_TIME_CRITICAL);
+ Sleep(msec);
+ SetThreadPriority(current_thread, old_priority);
+ }
}
diff --git a/src/osd/modules/lib/osdobj_common.c b/src/osd/modules/lib/osdobj_common.c
index 73580dba2fd..57731edc591 100644
--- a/src/osd/modules/lib/osdobj_common.c
+++ b/src/osd/modules/lib/osdobj_common.c
@@ -17,79 +17,79 @@ extern bool g_print_verbose;
const options_entry osd_options::s_option_entries[] =
{
- { NULL, NULL, OPTION_HEADER, "OSD FONT OPTIONS" },
- { OSD_FONT_PROVIDER, "auto", OPTION_STRING, "provider for ui font: " },
-
- { NULL, NULL, OPTION_HEADER, "OSD CLI OPTIONS" },
- { OSDCOMMAND_LIST_MIDI_DEVICES ";mlist", "0", OPTION_COMMAND, "list available MIDI I/O devices" },
- { OSDCOMMAND_LIST_NETWORK_ADAPTERS ";nlist", "0", OPTION_COMMAND, "list available network adapters" },
-
- // debugging options
- { NULL, NULL, OPTION_HEADER, "OSD DEBUGGING OPTIONS" },
- { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, OPTION_STRING, "debugger used : " },
- { OSDOPTION_WATCHDOG ";wdog", "0", OPTION_INTEGER, "force the program to terminate if no updates within specified number of seconds" },
-
- // performance options
- { NULL, NULL, OPTION_HEADER, "OSD PERFORMANCE OPTIONS" },
- { OSDOPTION_MULTITHREADING ";mt", "0", OPTION_BOOLEAN, "enable multithreading; this enables rendering and blitting on a separate thread" },
- { OSDOPTION_NUMPROCESSORS ";np", OSDOPTVAL_AUTO, OPTION_STRING, "number of processors; this overrides the number the system reports" },
- { OSDOPTION_BENCH, "0", OPTION_INTEGER, "benchmark for the given number of emulated seconds; implies -video none -sound none -nothrottle" },
- // video options
- { NULL, NULL, OPTION_HEADER, "OSD VIDEO OPTIONS" },
+ { NULL, NULL, OPTION_HEADER, "OSD FONT OPTIONS" },
+ { OSD_FONT_PROVIDER, "auto", OPTION_STRING, "provider for ui font: " },
+
+ { NULL, NULL, OPTION_HEADER, "OSD CLI OPTIONS" },
+ { OSDCOMMAND_LIST_MIDI_DEVICES ";mlist", "0", OPTION_COMMAND, "list available MIDI I/O devices" },
+ { OSDCOMMAND_LIST_NETWORK_ADAPTERS ";nlist", "0", OPTION_COMMAND, "list available network adapters" },
+
+ // debugging options
+ { NULL, NULL, OPTION_HEADER, "OSD DEBUGGING OPTIONS" },
+ { OSDOPTION_DEBUGGER, OSDOPTVAL_AUTO, OPTION_STRING, "debugger used : " },
+ { OSDOPTION_WATCHDOG ";wdog", "0", OPTION_INTEGER, "force the program to terminate if no updates within specified number of seconds" },
+
+ // performance options
+ { NULL, NULL, OPTION_HEADER, "OSD PERFORMANCE OPTIONS" },
+ { OSDOPTION_MULTITHREADING ";mt", "0", OPTION_BOOLEAN, "enable multithreading; this enables rendering and blitting on a separate thread" },
+ { OSDOPTION_NUMPROCESSORS ";np", OSDOPTVAL_AUTO, OPTION_STRING, "number of processors; this overrides the number the system reports" },
+ { OSDOPTION_BENCH, "0", OPTION_INTEGER, "benchmark for the given number of emulated seconds; implies -video none -sound none -nothrottle" },
+ // video options
+ { NULL, NULL, OPTION_HEADER, "OSD VIDEO OPTIONS" },
// OS X can be trusted to have working hardware OpenGL, so default to it on for the best user experience
- { OSDOPTION_VIDEO, OSDOPTVAL_AUTO, OPTION_STRING, "video output method: " },
- { OSDOPTION_NUMSCREENS "(1-4)", "1", OPTION_INTEGER, "number of screens to create; usually, you want just one" },
- { OSDOPTION_WINDOW ";w", "0", OPTION_BOOLEAN, "enable window mode; otherwise, full screen mode is assumed" },
- { OSDOPTION_MAXIMIZE ";max", "1", OPTION_BOOLEAN, "default to maximized windows; otherwise, windows will be minimized" },
- { OSDOPTION_KEEPASPECT ";ka", "1", OPTION_BOOLEAN, "constrain to the proper aspect ratio" },
- { OSDOPTION_UNEVENSTRETCH ";ues", "1", OPTION_BOOLEAN, "allow non-integer stretch factors" },
- { OSDOPTION_WAITVSYNC ";vs", "0", OPTION_BOOLEAN, "enable waiting for the start of VBLANK before flipping screens; reduces tearing effects" },
- { OSDOPTION_SYNCREFRESH ";srf", "0", OPTION_BOOLEAN, "enable using the start of VBLANK for throttling instead of the game time" },
-
- // per-window options
- { NULL, NULL, OPTION_HEADER, "OSD PER-WINDOW VIDEO OPTIONS" },
- { OSDOPTION_SCREEN, OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_ASPECT ";screen_aspect", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio for all screens; 'auto' here will try to make a best guess" },
- { OSDOPTION_RESOLUTION ";r", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution for all screens; format is <width>x<height>[@<refreshrate>] or 'auto'" },
- { OSDOPTION_VIEW, OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for all screens" },
-
- { OSDOPTION_SCREEN "0", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_ASPECT "0", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the first screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_RESOLUTION "0;r0", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the first screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
- { OSDOPTION_VIEW "0", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the first screen" },
-
- { OSDOPTION_SCREEN "1", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the second screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_ASPECT "1", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the second screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_RESOLUTION "1;r1", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the second screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
- { OSDOPTION_VIEW "1", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the second screen" },
-
- { OSDOPTION_SCREEN "2", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the third screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_ASPECT "2", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the third screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_RESOLUTION "2;r2", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the third screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
- { OSDOPTION_VIEW "2", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the third screen" },
-
- { OSDOPTION_SCREEN "3", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the fourth screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_ASPECT "3", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the fourth screen; 'auto' here will try to make a best guess" },
- { OSDOPTION_RESOLUTION "3;r3", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the fourth screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
- { OSDOPTION_VIEW "3", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the fourth screen" },
-
- // full screen options
- { NULL, NULL, OPTION_HEADER, "OSD FULL SCREEN OPTIONS" },
- { OSDOPTION_SWITCHRES, "0", OPTION_BOOLEAN, "enable resolution switching" },
-
- // sound options
- { NULL, NULL, OPTION_HEADER, "OSD SOUND OPTIONS" },
- { OSDOPTION_SOUND, OSDOPTVAL_AUTO, OPTION_STRING, "sound output method: " },
- { OSDOPTION_AUDIO_LATENCY "(1-5)", "2", OPTION_INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" },
-
- // End of list
- { NULL }
+ { OSDOPTION_VIDEO, OSDOPTVAL_AUTO, OPTION_STRING, "video output method: " },
+ { OSDOPTION_NUMSCREENS "(1-4)", "1", OPTION_INTEGER, "number of screens to create; usually, you want just one" },
+ { OSDOPTION_WINDOW ";w", "0", OPTION_BOOLEAN, "enable window mode; otherwise, full screen mode is assumed" },
+ { OSDOPTION_MAXIMIZE ";max", "1", OPTION_BOOLEAN, "default to maximized windows; otherwise, windows will be minimized" },
+ { OSDOPTION_KEEPASPECT ";ka", "1", OPTION_BOOLEAN, "constrain to the proper aspect ratio" },
+ { OSDOPTION_UNEVENSTRETCH ";ues", "1", OPTION_BOOLEAN, "allow non-integer stretch factors" },
+ { OSDOPTION_WAITVSYNC ";vs", "0", OPTION_BOOLEAN, "enable waiting for the start of VBLANK before flipping screens; reduces tearing effects" },
+ { OSDOPTION_SYNCREFRESH ";srf", "0", OPTION_BOOLEAN, "enable using the start of VBLANK for throttling instead of the game time" },
+
+ // per-window options
+ { NULL, NULL, OPTION_HEADER, "OSD PER-WINDOW VIDEO OPTIONS" },
+ { OSDOPTION_SCREEN, OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_ASPECT ";screen_aspect", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio for all screens; 'auto' here will try to make a best guess" },
+ { OSDOPTION_RESOLUTION ";r", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution for all screens; format is <width>x<height>[@<refreshrate>] or 'auto'" },
+ { OSDOPTION_VIEW, OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for all screens" },
+
+ { OSDOPTION_SCREEN "0", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the first screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_ASPECT "0", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the first screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_RESOLUTION "0;r0", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the first screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
+ { OSDOPTION_VIEW "0", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the first screen" },
+
+ { OSDOPTION_SCREEN "1", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the second screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_ASPECT "1", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the second screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_RESOLUTION "1;r1", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the second screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
+ { OSDOPTION_VIEW "1", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the second screen" },
+
+ { OSDOPTION_SCREEN "2", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the third screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_ASPECT "2", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the third screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_RESOLUTION "2;r2", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the third screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
+ { OSDOPTION_VIEW "2", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the third screen" },
+
+ { OSDOPTION_SCREEN "3", OSDOPTVAL_AUTO, OPTION_STRING, "explicit name of the fourth screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_ASPECT "3", OSDOPTVAL_AUTO, OPTION_STRING, "aspect ratio of the fourth screen; 'auto' here will try to make a best guess" },
+ { OSDOPTION_RESOLUTION "3;r3", OSDOPTVAL_AUTO, OPTION_STRING, "preferred resolution of the fourth screen; format is <width>x<height>[@<refreshrate>] or 'auto'" },
+ { OSDOPTION_VIEW "3", OSDOPTVAL_AUTO, OPTION_STRING, "preferred view for the fourth screen" },
+
+ // full screen options
+ { NULL, NULL, OPTION_HEADER, "OSD FULL SCREEN OPTIONS" },
+ { OSDOPTION_SWITCHRES, "0", OPTION_BOOLEAN, "enable resolution switching" },
+
+ // sound options
+ { NULL, NULL, OPTION_HEADER, "OSD SOUND OPTIONS" },
+ { OSDOPTION_SOUND, OSDOPTVAL_AUTO, OPTION_STRING, "sound output method: " },
+ { OSDOPTION_AUDIO_LATENCY "(1-5)", "2", OPTION_INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" },
+
+ // End of list
+ { NULL }
};
osd_options::osd_options()
: cli_options()
{
- add_entries(osd_options::s_option_entries);
+ add_entries(osd_options::s_option_entries);
};
@@ -99,9 +99,9 @@ osd_options::osd_options()
osd_common_t::osd_common_t(osd_options &options)
: m_machine(NULL),
- m_options(options),
- m_sound(NULL),
- m_debugger(NULL)
+ m_options(options),
+ m_sound(NULL),
+ m_debugger(NULL)
{
}
@@ -110,52 +110,51 @@ osd_common_t::osd_common_t(osd_options &options)
void osd_common_t::register_options()
{
+ REGISTER_MODULE(m_mod_man, FONT_OSX);
+ REGISTER_MODULE(m_mod_man, FONT_WINDOWS);
+ REGISTER_MODULE(m_mod_man, FONT_SDL);
+ REGISTER_MODULE(m_mod_man, FONT_NONE);
- REGISTER_MODULE(m_mod_man, FONT_OSX);
- REGISTER_MODULE(m_mod_man, FONT_WINDOWS);
- REGISTER_MODULE(m_mod_man, FONT_SDL);
- REGISTER_MODULE(m_mod_man, FONT_NONE);
-
- REGISTER_MODULE(m_mod_man, SOUND_DSOUND);
- REGISTER_MODULE(m_mod_man, SOUND_JS);
- REGISTER_MODULE(m_mod_man, SOUND_SDL);
- REGISTER_MODULE(m_mod_man, SOUND_NONE);
+ REGISTER_MODULE(m_mod_man, SOUND_DSOUND);
+ REGISTER_MODULE(m_mod_man, SOUND_JS);
+ REGISTER_MODULE(m_mod_man, SOUND_SDL);
+ REGISTER_MODULE(m_mod_man, SOUND_NONE);
#ifdef SDLMAME_MACOSX
- REGISTER_MODULE(m_mod_man, DEBUG_OSX);
+ REGISTER_MODULE(m_mod_man, DEBUG_OSX);
#endif
- REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS);
- REGISTER_MODULE(m_mod_man, DEBUG_QT);
- REGISTER_MODULE(m_mod_man, DEBUG_INTERNAL);
- REGISTER_MODULE(m_mod_man, DEBUG_NONE);
-
- // after initialization we know which modules are supported
-
- const char *names[20];
- int num;
- m_mod_man.get_module_names(OSD_FONT_PROVIDER, 20, &num, names);
- dynamic_array<const char *> dnames;
- for (int i = 0; i < num; i++)
- dnames.append(names[i]);
- update_option(OSD_FONT_PROVIDER, dnames);
-
- m_mod_man.get_module_names(OSD_SOUND_PROVIDER, 20, &num, names);
- dnames.reset();
- for (int i = 0; i < num; i++)
- dnames.append(names[i]);
- update_option(OSD_SOUND_PROVIDER, dnames);
-
- // Register debugger options and update options
- m_mod_man.get_module_names(OSD_DEBUG_PROVIDER, 20, &num, names);
- dnames.reset();
- for (int i = 0; i < num; i++)
- dnames.append(names[i]);
- update_option(OSD_DEBUG_PROVIDER, dnames);
-
- // Register video options and update options
- video_options_add("none", NULL);
- video_register();
- update_option(OSDOPTION_VIDEO, m_video_names);
+ REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS);
+ REGISTER_MODULE(m_mod_man, DEBUG_QT);
+ REGISTER_MODULE(m_mod_man, DEBUG_INTERNAL);
+ REGISTER_MODULE(m_mod_man, DEBUG_NONE);
+
+ // after initialization we know which modules are supported
+
+ const char *names[20];
+ int num;
+ m_mod_man.get_module_names(OSD_FONT_PROVIDER, 20, &num, names);
+ dynamic_array<const char *> dnames;
+ for (int i = 0; i < num; i++)
+ dnames.append(names[i]);
+ update_option(OSD_FONT_PROVIDER, dnames);
+
+ m_mod_man.get_module_names(OSD_SOUND_PROVIDER, 20, &num, names);
+ dnames.reset();
+ for (int i = 0; i < num; i++)
+ dnames.append(names[i]);
+ update_option(OSD_SOUND_PROVIDER, dnames);
+
+ // Register debugger options and update options
+ m_mod_man.get_module_names(OSD_DEBUG_PROVIDER, 20, &num, names);
+ dnames.reset();
+ for (int i = 0; i < num; i++)
+ dnames.append(names[i]);
+ update_option(OSD_DEBUG_PROVIDER, dnames);
+
+ // Register video options and update options
+ video_options_add("none", NULL);
+ video_register();
+ update_option(OSDOPTION_VIDEO, m_video_names);
}
void osd_common_t::update_option(const char * key, dynamic_array<const char *> &values)
@@ -305,7 +304,7 @@ void osd_common_t::update_audio_stream(const INT16 *buffer, int samples_this_fra
// It provides an array of stereo samples in L-R order which should be
// output at the configured sample_rate.
//
- m_sound->update_audio_stream(m_machine->video().throttled(), buffer,samples_this_frame);
+ m_sound->update_audio_stream(m_machine->video().throttled(), buffer,samples_this_frame);
}
@@ -322,8 +321,8 @@ void osd_common_t::set_mastervolume(int attenuation)
// while (attenuation++ < 0)
// volume /= 1.122018454; // = (10 ^ (1/20)) = 1dB
//
- if (m_sound != NULL)
- m_sound->set_mastervolume(attenuation);
+ if (m_sound != NULL)
+ m_sound->set_mastervolume(attenuation);
}
@@ -398,20 +397,20 @@ void *osd_common_t::get_slider_list()
bool osd_common_t::execute_command(const char *command)
{
- if (strcmp(command, OSDCOMMAND_LIST_NETWORK_ADAPTERS) == 0)
- {
- network_init();
- osd_list_network_adapters();
- network_exit();
- return true;
- }
- else if (strcmp(command, OSDCOMMAND_LIST_MIDI_DEVICES) == 0)
- {
- osd_list_midi_devices();
- return true;
- }
+ if (strcmp(command, OSDCOMMAND_LIST_NETWORK_ADAPTERS) == 0)
+ {
+ network_init();
+ osd_list_network_adapters();
+ network_exit();
+ return true;
+ }
+ else if (strcmp(command, OSDCOMMAND_LIST_MIDI_DEVICES) == 0)
+ {
+ osd_list_midi_devices();
+ return true;
+ }
- return false;
+ return false;
}
@@ -437,15 +436,15 @@ void osd_common_t::init_subsystems()
#endif
midi_init();
- m_font_module = select_module_options<font_module *>(options(), OSD_FONT_PROVIDER);
+ m_font_module = select_module_options<font_module *>(options(), OSD_FONT_PROVIDER);
- m_sound = select_module_options<sound_module *>(options(), OSD_SOUND_PROVIDER);
- m_sound->m_sample_rate = options().sample_rate();
- m_sound->m_audio_latency = options().audio_latency();
+ m_sound = select_module_options<sound_module *>(options(), OSD_SOUND_PROVIDER);
+ m_sound->m_sample_rate = options().sample_rate();
+ m_sound->m_audio_latency = options().audio_latency();
- m_debugger = select_module_options<debug_module *>(options(), OSD_DEBUG_PROVIDER);
+ m_debugger = select_module_options<debug_module *>(options(), OSD_DEBUG_PROVIDER);
- m_mod_man.init();
+ m_mod_man.init();
}
@@ -524,9 +523,9 @@ void osd_common_t::network_exit()
void osd_common_t::osd_exit()
{
- m_mod_man.exit();
+ m_mod_man.exit();
- exit_subsystems();
+ exit_subsystems();
}
void osd_common_t::video_options_add(const char *name, void *type)
@@ -537,13 +536,11 @@ void osd_common_t::video_options_add(const char *name, void *type)
bool osd_common_t::midi_init()
{
- // this should be done on the OS_level
- return osd_midi_init();
+ // this should be done on the OS_level
+ return osd_midi_init();
}
void osd_common_t::midi_exit()
{
- osd_midi_exit();
+ osd_midi_exit();
}
-
-
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index 3ea631a4495..322bcadf682 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -62,47 +62,47 @@
class osd_options : public cli_options
{
public:
- // construction/destruction
- osd_options();
-
- // debugging options
- const char *debugger() const { return value(OSDOPTION_DEBUGGER); }
- int watchdog() const { return int_value(OSDOPTION_WATCHDOG); }
-
- // performance options
- bool multithreading() const { return bool_value(OSDOPTION_MULTITHREADING); }
- const char *numprocessors() const { return value(OSDOPTION_NUMPROCESSORS); }
- int bench() const { return int_value(OSDOPTION_BENCH); }
-
- // video options
- const char *video() const { return value(OSDOPTION_VIDEO); }
- int numscreens() const { return int_value(OSDOPTION_NUMSCREENS); }
- bool window() const { return bool_value(OSDOPTION_WINDOW); }
- bool maximize() const { return bool_value(OSDOPTION_MAXIMIZE); }
- bool keep_aspect() const { return bool_value(OSDOPTION_KEEPASPECT); }
- bool uneven_stretch() const { return bool_value(OSDOPTION_UNEVENSTRETCH); }
- bool wait_vsync() const { return bool_value(OSDOPTION_WAITVSYNC); }
- bool sync_refresh() const { return bool_value(OSDOPTION_SYNCREFRESH); }
-
- // per-window options
- const char *screen() const { return value(OSDOPTION_SCREEN); }
- const char *aspect() const { return value(OSDOPTION_ASPECT); }
- const char *resolution() const { return value(OSDOPTION_RESOLUTION); }
- const char *view() const { return value(OSDOPTION_VIEW); }
- const char *screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SCREEN, index)); }
- const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index)); }
- const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index)); }
- const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index)); }
-
- // full screen options
- bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); }
-
- // sound options
- const char *sound() const { return value(OSDOPTION_SOUND); }
- int audio_latency() const { return int_value(OSDOPTION_AUDIO_LATENCY); }
+ // construction/destruction
+ osd_options();
+
+ // debugging options
+ const char *debugger() const { return value(OSDOPTION_DEBUGGER); }
+ int watchdog() const { return int_value(OSDOPTION_WATCHDOG); }
+
+ // performance options
+ bool multithreading() const { return bool_value(OSDOPTION_MULTITHREADING); }
+ const char *numprocessors() const { return value(OSDOPTION_NUMPROCESSORS); }
+ int bench() const { return int_value(OSDOPTION_BENCH); }
+
+ // video options
+ const char *video() const { return value(OSDOPTION_VIDEO); }
+ int numscreens() const { return int_value(OSDOPTION_NUMSCREENS); }
+ bool window() const { return bool_value(OSDOPTION_WINDOW); }
+ bool maximize() const { return bool_value(OSDOPTION_MAXIMIZE); }
+ bool keep_aspect() const { return bool_value(OSDOPTION_KEEPASPECT); }
+ bool uneven_stretch() const { return bool_value(OSDOPTION_UNEVENSTRETCH); }
+ bool wait_vsync() const { return bool_value(OSDOPTION_WAITVSYNC); }
+ bool sync_refresh() const { return bool_value(OSDOPTION_SYNCREFRESH); }
+
+ // per-window options
+ const char *screen() const { return value(OSDOPTION_SCREEN); }
+ const char *aspect() const { return value(OSDOPTION_ASPECT); }
+ const char *resolution() const { return value(OSDOPTION_RESOLUTION); }
+ const char *view() const { return value(OSDOPTION_VIEW); }
+ const char *screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SCREEN, index)); }
+ const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index)); }
+ const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index)); }
+ const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index)); }
+
+ // full screen options
+ bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); }
+
+ // sound options
+ const char *sound() const { return value(OSDOPTION_SOUND); }
+ int audio_latency() const { return int_value(OSDOPTION_AUDIO_LATENCY); }
private:
- static const options_entry s_option_entries[];
+ static const options_entry s_option_entries[];
};
// ======================> osd_interface
@@ -142,77 +142,77 @@ public:
// video overridables
virtual void *get_slider_list();
- // command option overrides
- virtual bool execute_command(const char *command);
+ // command option overrides
+ virtual bool execute_command(const char *command);
- osd_font *font_alloc() { return m_font_module->font_alloc(); }
+ osd_font *font_alloc() { return m_font_module->font_alloc(); }
// FIXME: everything below seems to be osd specific and not part of
// this INTERFACE but part of the osd IMPLEMENTATION
- // getters
- running_machine &machine() { assert(m_machine != NULL); return *m_machine; }
+ // getters
+ running_machine &machine() { assert(m_machine != NULL); return *m_machine; }
- virtual void debugger_update();
+ virtual void debugger_update();
- virtual void init_subsystems();
+ virtual void init_subsystems();
- virtual bool video_init();
- virtual void video_register();
- virtual bool window_init();
+ virtual bool video_init();
+ virtual void video_register();
+ virtual bool window_init();
- virtual void input_resume();
- virtual bool output_init();
- virtual bool network_init();
- virtual bool midi_init();
+ virtual void input_resume();
+ virtual bool output_init();
+ virtual bool network_init();
+ virtual bool midi_init();
- virtual void exit_subsystems();
- virtual void video_exit();
- virtual void window_exit();
- virtual void input_exit();
- virtual void output_exit();
- virtual void network_exit();
- virtual void midi_exit();
+ virtual void exit_subsystems();
+ virtual void video_exit();
+ virtual void window_exit();
+ virtual void input_exit();
+ virtual void output_exit();
+ virtual void network_exit();
+ virtual void midi_exit();
- virtual void osd_exit();
+ virtual void osd_exit();
- virtual void video_options_add(const char *name, void *type);
+ virtual void video_options_add(const char *name, void *type);
- osd_options &options() { return m_options; }
+ osd_options &options() { return m_options; }
protected:
- virtual bool input_init();
- virtual void input_pause();
+ virtual bool input_init();
+ virtual void input_pause();
private:
// internal state
running_machine * m_machine;
osd_options& m_options;
- osd_module_manager m_mod_man;
- font_module *m_font_module;
+ osd_module_manager m_mod_man;
+ font_module *m_font_module;
void update_option(const char * key, dynamic_array<const char *> &values);
- // FIXME: should be elsewhere
- osd_module *select_module_options(const core_options &opts, const astring &opt_name)
- {
- astring opt_val = opts.value(opt_name);
- if (opt_val == "auto")
- opt_val = "";
- else if (!m_mod_man.type_has_name(opt_name, opt_val))
- {
- osd_printf_warning("Value %s not supported for option %s - falling back to auto\n", opt_val.cstr(), opt_name.cstr());
- opt_val = "";
- }
- return m_mod_man.select_module(opt_name, opt_val);
- }
-
- template<class C>
- C select_module_options(const core_options &opts, const astring &opt_name)
- {
- return dynamic_cast<C>(select_module_options(opts, opt_name));
- }
+ // FIXME: should be elsewhere
+ osd_module *select_module_options(const core_options &opts, const astring &opt_name)
+ {
+ astring opt_val = opts.value(opt_name);
+ if (opt_val == "auto")
+ opt_val = "";
+ else if (!m_mod_man.type_has_name(opt_name, opt_val))
+ {
+ osd_printf_warning("Value %s not supported for option %s - falling back to auto\n", opt_val.cstr(), opt_name.cstr());
+ opt_val = "";
+ }
+ return m_mod_man.select_module(opt_name, opt_val);
+ }
+
+ template<class C>
+ C select_module_options(const core_options &opts, const astring &opt_name)
+ {
+ return dynamic_cast<C>(select_module_options(opts, opt_name));
+ }
protected:
sound_module* m_sound;
diff --git a/src/osd/modules/midi/none.c b/src/osd/modules/midi/none.c
index 2f5658fc973..4319eef5ea8 100644
--- a/src/osd/modules/midi/none.c
+++ b/src/osd/modules/midi/none.c
@@ -10,12 +10,12 @@
struct osd_midi_device
{
- int dummy;
+ int dummy;
};
bool osd_midi_init()
{
- return true;
+ return true;
}
void osd_midi_exit()
@@ -24,17 +24,17 @@ void osd_midi_exit()
void osd_list_midi_devices(void)
{
- osd_printf_warning("\nMIDI is not supported in this build\n");
+ osd_printf_warning("\nMIDI is not supported in this build\n");
}
osd_midi_device *osd_open_midi_input(const char *devname)
{
- return NULL;
+ return NULL;
}
osd_midi_device *osd_open_midi_output(const char *devname)
{
- return NULL;
+ return NULL;
}
void osd_close_midi_channel(osd_midi_device *dev)
@@ -43,12 +43,12 @@ void osd_close_midi_channel(osd_midi_device *dev)
bool osd_poll_midi_channel(osd_midi_device *dev)
{
- return false;
+ return false;
}
int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut)
{
- return 0;
+ return 0;
}
void osd_write_midi_channel(osd_midi_device *dev, UINT8 data)
diff --git a/src/osd/modules/midi/portmidi.c b/src/osd/modules/midi/portmidi.c
index 2e0add931a3..0b93bf690dd 100644
--- a/src/osd/modules/midi/portmidi.c
+++ b/src/osd/modules/midi/portmidi.c
@@ -16,405 +16,405 @@ static const int RX_EVENT_BUF_SIZE = 512;
struct osd_midi_device
{
- PortMidiStream *pmStream;
- PmEvent rx_evBuf[RX_EVENT_BUF_SIZE];
- UINT8 xmit_in[4]; // Pm_Messages mean we can at most have 3 residue bytes
- int xmit_cnt;
- UINT8 last_status;
- bool rx_sysex;
+ PortMidiStream *pmStream;
+ PmEvent rx_evBuf[RX_EVENT_BUF_SIZE];
+ UINT8 xmit_in[4]; // Pm_Messages mean we can at most have 3 residue bytes
+ int xmit_cnt;
+ UINT8 last_status;
+ bool rx_sysex;
};
bool osd_midi_init()
{
- Pm_Initialize();
- return true;
+ Pm_Initialize();
+ return true;
}
void osd_midi_exit()
{
- Pm_Terminate();
+ Pm_Terminate();
}
void osd_list_midi_devices(void)
{
- int num_devs = Pm_CountDevices();
- const PmDeviceInfo *pmInfo;
-
- printf("\n");
-
- if (num_devs == 0)
- {
- printf("No MIDI ports were found\n");
- return;
- }
-
- printf("MIDI input ports:\n");
- for (int i = 0; i < num_devs; i++)
- {
- pmInfo = Pm_GetDeviceInfo(i);
-
- if (pmInfo->input)
- {
- printf("%s %s\n", pmInfo->name, (i == Pm_GetDefaultInputDeviceID()) ? "(default)" : "");
- }
- }
-
- printf("\nMIDI output ports:\n");
- for (int i = 0; i < num_devs; i++)
- {
- pmInfo = Pm_GetDeviceInfo(i);
-
- if (pmInfo->output)
- {
- printf("%s %s\n", pmInfo->name, (i == Pm_GetDefaultOutputDeviceID()) ? "(default)" : "");
- }
- }
+ int num_devs = Pm_CountDevices();
+ const PmDeviceInfo *pmInfo;
+
+ printf("\n");
+
+ if (num_devs == 0)
+ {
+ printf("No MIDI ports were found\n");
+ return;
+ }
+
+ printf("MIDI input ports:\n");
+ for (int i = 0; i < num_devs; i++)
+ {
+ pmInfo = Pm_GetDeviceInfo(i);
+
+ if (pmInfo->input)
+ {
+ printf("%s %s\n", pmInfo->name, (i == Pm_GetDefaultInputDeviceID()) ? "(default)" : "");
+ }
+ }
+
+ printf("\nMIDI output ports:\n");
+ for (int i = 0; i < num_devs; i++)
+ {
+ pmInfo = Pm_GetDeviceInfo(i);
+
+ if (pmInfo->output)
+ {
+ printf("%s %s\n", pmInfo->name, (i == Pm_GetDefaultOutputDeviceID()) ? "(default)" : "");
+ }
+ }
}
osd_midi_device *osd_open_midi_input(const char *devname)
{
- int num_devs = Pm_CountDevices();
- int found_dev = -1;
- const PmDeviceInfo *pmInfo;
- PortMidiStream *stm;
- osd_midi_device *ret;
-
- if (!strcmp("default", devname))
- {
- found_dev = Pm_GetDefaultInputDeviceID();
- }
- else
- {
- for (int i = 0; i < num_devs; i++)
- {
- pmInfo = Pm_GetDeviceInfo(i);
-
- if (pmInfo->input)
- {
- if (!strcmp(devname, pmInfo->name))
- {
- found_dev = i;
- break;
- }
- }
- }
- }
-
- if (found_dev >= 0)
- {
- if (Pm_OpenInput(&stm, found_dev, NULL, RX_EVENT_BUF_SIZE, NULL, NULL) == pmNoError)
- {
- ret = (osd_midi_device *)osd_malloc(sizeof(osd_midi_device));
- memset(ret, 0, sizeof(osd_midi_device));
- ret->pmStream = stm;
- return ret;
- }
- else
- {
- printf("Couldn't open PM device\n");
- return NULL;
- }
- }
- else
- {
- return NULL;
- }
+ int num_devs = Pm_CountDevices();
+ int found_dev = -1;
+ const PmDeviceInfo *pmInfo;
+ PortMidiStream *stm;
+ osd_midi_device *ret;
+
+ if (!strcmp("default", devname))
+ {
+ found_dev = Pm_GetDefaultInputDeviceID();
+ }
+ else
+ {
+ for (int i = 0; i < num_devs; i++)
+ {
+ pmInfo = Pm_GetDeviceInfo(i);
+
+ if (pmInfo->input)
+ {
+ if (!strcmp(devname, pmInfo->name))
+ {
+ found_dev = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (found_dev >= 0)
+ {
+ if (Pm_OpenInput(&stm, found_dev, NULL, RX_EVENT_BUF_SIZE, NULL, NULL) == pmNoError)
+ {
+ ret = (osd_midi_device *)osd_malloc(sizeof(osd_midi_device));
+ memset(ret, 0, sizeof(osd_midi_device));
+ ret->pmStream = stm;
+ return ret;
+ }
+ else
+ {
+ printf("Couldn't open PM device\n");
+ return NULL;
+ }
+ }
+ else
+ {
+ return NULL;
+ }
}
osd_midi_device *osd_open_midi_output(const char *devname)
{
- int num_devs = Pm_CountDevices();
- int found_dev = -1;
- const PmDeviceInfo *pmInfo;
- PortMidiStream *stm;
- osd_midi_device *ret;
-
- if (!strcmp("default", devname))
- {
- found_dev = Pm_GetDefaultOutputDeviceID();
- }
- else
- {
- for (int i = 0; i < num_devs; i++)
- {
- pmInfo = Pm_GetDeviceInfo(i);
-
- if (pmInfo->output)
- {
- if (!strcmp(devname, pmInfo->name))
- {
- found_dev = i;
- break;
- }
- }
- }
- }
-
- if (found_dev >= 0)
- {
- if (Pm_OpenOutput(&stm, found_dev, NULL, 100, NULL, NULL, 0) == pmNoError)
- {
- ret = (osd_midi_device *)osd_malloc(sizeof(osd_midi_device));
- memset(ret, 0, sizeof(osd_midi_device));
- ret->pmStream = stm;
- return ret;
- }
- else
- {
- printf("Couldn't open PM device\n");
- return NULL;
- }
- }
- else
- {
- return NULL;
- }
- return NULL;
+ int num_devs = Pm_CountDevices();
+ int found_dev = -1;
+ const PmDeviceInfo *pmInfo;
+ PortMidiStream *stm;
+ osd_midi_device *ret;
+
+ if (!strcmp("default", devname))
+ {
+ found_dev = Pm_GetDefaultOutputDeviceID();
+ }
+ else
+ {
+ for (int i = 0; i < num_devs; i++)
+ {
+ pmInfo = Pm_GetDeviceInfo(i);
+
+ if (pmInfo->output)
+ {
+ if (!strcmp(devname, pmInfo->name))
+ {
+ found_dev = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (found_dev >= 0)
+ {
+ if (Pm_OpenOutput(&stm, found_dev, NULL, 100, NULL, NULL, 0) == pmNoError)
+ {
+ ret = (osd_midi_device *)osd_malloc(sizeof(osd_midi_device));
+ memset(ret, 0, sizeof(osd_midi_device));
+ ret->pmStream = stm;
+ return ret;
+ }
+ else
+ {
+ printf("Couldn't open PM device\n");
+ return NULL;
+ }
+ }
+ else
+ {
+ return NULL;
+ }
+ return NULL;
}
void osd_close_midi_channel(osd_midi_device *dev)
{
- Pm_Close(dev->pmStream);
- osd_free(dev);
+ Pm_Close(dev->pmStream);
+ osd_free(dev);
}
bool osd_poll_midi_channel(osd_midi_device *dev)
{
- PmError chk = Pm_Poll(dev->pmStream);
+ PmError chk = Pm_Poll(dev->pmStream);
- return (chk == pmGotData) ? true : false;
+ return (chk == pmGotData) ? true : false;
}
int osd_read_midi_channel(osd_midi_device *dev, UINT8 *pOut)
{
- int msgsRead = Pm_Read(dev->pmStream, dev->rx_evBuf, RX_EVENT_BUF_SIZE);
- int bytesOut = 0;
-
- if (msgsRead <= 0)
- {
- return 0;
- }
-
- for (int msg = 0; msg < msgsRead; msg++)
- {
- UINT8 status = Pm_MessageStatus(dev->rx_evBuf[msg].message);
-
- if (dev->rx_sysex)
- {
- if (status & 0x80) // sys real-time imposing on us?
- {
- if ((status == 0xf2) || (status == 0xf3))
- {
- *pOut++ = status;
- *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
- *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
- bytesOut += 3;
- }
- else
- {
- *pOut++ = status;
- bytesOut++;
- if (status == MIDI_EOX)
- {
- dev->rx_sysex = false;
- }
- }
- }
- else // shift out the sysex bytes
- {
- for (int i = 0; i < 4; i++)
- {
- UINT8 byte = dev->rx_evBuf[msg].message & 0xff;
- *pOut++ = byte;
- bytesOut++;
- if (byte == MIDI_EOX)
- {
- dev->rx_sysex = false;
- break;
- }
- dev->rx_evBuf[msg].message >>= 8;
- }
- }
- }
- else
- {
- switch ((status>>4) & 0xf)
- {
- case 0xc: // 2-byte messages
- case 0xd:
- *pOut++ = status;
- *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
- bytesOut += 2;
- break;
-
- case 0xf: // system common
- switch (status & 0xf)
- {
- case 0: // System Exclusive
- {
- *pOut++ = status; // this should be OK: the shortest legal sysex is F0 tt dd F7, I believe
- *pOut++ = (dev->rx_evBuf[msg].message>>8) & 0xff;
- *pOut++ = (dev->rx_evBuf[msg].message>>16) & 0xff;
- UINT8 last = *pOut++ = (dev->rx_evBuf[msg].message>>24) & 0xff;
- bytesOut += 4;
- dev->rx_sysex = (last != MIDI_EOX);
- break;
- }
-
- case 7: // End of System Exclusive
- *pOut++ = status;
- bytesOut += 1;
- dev->rx_sysex = false;
- break;
-
- case 2: // song pos
- case 3: // song select
- *pOut++ = status;
- *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
- *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
- bytesOut += 3;
- break;
-
- default: // all other defined Fx messages are 1 byte
- break;
- }
- break;
-
- default:
- *pOut++ = status;
- *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
- *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
- bytesOut += 3;
- break;
- }
- }
- }
-
- return bytesOut;
+ int msgsRead = Pm_Read(dev->pmStream, dev->rx_evBuf, RX_EVENT_BUF_SIZE);
+ int bytesOut = 0;
+
+ if (msgsRead <= 0)
+ {
+ return 0;
+ }
+
+ for (int msg = 0; msg < msgsRead; msg++)
+ {
+ UINT8 status = Pm_MessageStatus(dev->rx_evBuf[msg].message);
+
+ if (dev->rx_sysex)
+ {
+ if (status & 0x80) // sys real-time imposing on us?
+ {
+ if ((status == 0xf2) || (status == 0xf3))
+ {
+ *pOut++ = status;
+ *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
+ *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
+ bytesOut += 3;
+ }
+ else
+ {
+ *pOut++ = status;
+ bytesOut++;
+ if (status == MIDI_EOX)
+ {
+ dev->rx_sysex = false;
+ }
+ }
+ }
+ else // shift out the sysex bytes
+ {
+ for (int i = 0; i < 4; i++)
+ {
+ UINT8 byte = dev->rx_evBuf[msg].message & 0xff;
+ *pOut++ = byte;
+ bytesOut++;
+ if (byte == MIDI_EOX)
+ {
+ dev->rx_sysex = false;
+ break;
+ }
+ dev->rx_evBuf[msg].message >>= 8;
+ }
+ }
+ }
+ else
+ {
+ switch ((status>>4) & 0xf)
+ {
+ case 0xc: // 2-byte messages
+ case 0xd:
+ *pOut++ = status;
+ *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
+ bytesOut += 2;
+ break;
+
+ case 0xf: // system common
+ switch (status & 0xf)
+ {
+ case 0: // System Exclusive
+ {
+ *pOut++ = status; // this should be OK: the shortest legal sysex is F0 tt dd F7, I believe
+ *pOut++ = (dev->rx_evBuf[msg].message>>8) & 0xff;
+ *pOut++ = (dev->rx_evBuf[msg].message>>16) & 0xff;
+ UINT8 last = *pOut++ = (dev->rx_evBuf[msg].message>>24) & 0xff;
+ bytesOut += 4;
+ dev->rx_sysex = (last != MIDI_EOX);
+ break;
+ }
+
+ case 7: // End of System Exclusive
+ *pOut++ = status;
+ bytesOut += 1;
+ dev->rx_sysex = false;
+ break;
+
+ case 2: // song pos
+ case 3: // song select
+ *pOut++ = status;
+ *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
+ *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
+ bytesOut += 3;
+ break;
+
+ default: // all other defined Fx messages are 1 byte
+ break;
+ }
+ break;
+
+ default:
+ *pOut++ = status;
+ *pOut++ = Pm_MessageData1(dev->rx_evBuf[msg].message);
+ *pOut++ = Pm_MessageData2(dev->rx_evBuf[msg].message);
+ bytesOut += 3;
+ break;
+ }
+ }
+ }
+
+ return bytesOut;
}
void osd_write_midi_channel(osd_midi_device *dev, UINT8 data)
{
- int bytes_needed = 0;
- PmEvent ev;
- ev.timestamp = 0; // use the current time
+ int bytes_needed = 0;
+ PmEvent ev;
+ ev.timestamp = 0; // use the current time
// printf("write: %02x (%d)\n", data, dev->xmit_cnt);
- // reject data bytes when no valid status exists
- if ((dev->last_status == 0) && !(data & 0x80))
- {
- dev->xmit_cnt = 0;
- return;
- }
-
- if (dev->xmit_cnt >= 4)
- {
- printf("MIDI out: packet assembly overflow, contact MAMEdev!\n");
- return;
- }
-
- // handle sysex
- if (dev->last_status == MIDI_SYSEX)
- {
+ // reject data bytes when no valid status exists
+ if ((dev->last_status == 0) && !(data & 0x80))
+ {
+ dev->xmit_cnt = 0;
+ return;
+ }
+
+ if (dev->xmit_cnt >= 4)
+ {
+ printf("MIDI out: packet assembly overflow, contact MAMEdev!\n");
+ return;
+ }
+
+ // handle sysex
+ if (dev->last_status == MIDI_SYSEX)
+ {
// printf("sysex: %02x (%d)\n", data, dev->xmit_cnt);
- // if we get a status that isn't sysex, assume it's system common
- if ((data & 0x80) && (data != MIDI_EOX))
- {
+ // if we get a status that isn't sysex, assume it's system common
+ if ((data & 0x80) && (data != MIDI_EOX))
+ {
// printf("common during sysex!\n");
- ev.message = Pm_Message(data, 0, 0);
- Pm_Write(dev->pmStream, &ev, 1);
- return;
- }
+ ev.message = Pm_Message(data, 0, 0);
+ Pm_Write(dev->pmStream, &ev, 1);
+ return;
+ }
- dev->xmit_in[dev->xmit_cnt++] = data;
+ dev->xmit_in[dev->xmit_cnt++] = data;
- // if EOX or 4 bytes filled, transmit 4 bytes
- if ((dev->xmit_cnt == 4) || (data == MIDI_EOX))
- {
- ev.message = dev->xmit_in[0] | (dev->xmit_in[1]<<8) | (dev->xmit_in[2]<<16) | (dev->xmit_in[3]<<24);
- Pm_Write(dev->pmStream, &ev, 1);
- dev->xmit_in[0] = dev->xmit_in[1] = dev->xmit_in[2] = dev->xmit_in[3] = 0;
- dev->xmit_cnt = 0;
+ // if EOX or 4 bytes filled, transmit 4 bytes
+ if ((dev->xmit_cnt == 4) || (data == MIDI_EOX))
+ {
+ ev.message = dev->xmit_in[0] | (dev->xmit_in[1]<<8) | (dev->xmit_in[2]<<16) | (dev->xmit_in[3]<<24);
+ Pm_Write(dev->pmStream, &ev, 1);
+ dev->xmit_in[0] = dev->xmit_in[1] = dev->xmit_in[2] = dev->xmit_in[3] = 0;
+ dev->xmit_cnt = 0;
// printf("SysEx packet: %08x\n", ev.message);
- // if this is EOX, kill the running status
- if (data == MIDI_EOX)
- {
- dev->last_status = 0;
- }
- }
-
- return;
- }
-
- // handle running status. don't allow system real-time messages to be considered as running status.
- if ((dev->xmit_cnt == 0) && (data & 0x80) && (data < 0xf8))
- {
- dev->last_status = data;
- }
-
- if ((dev->xmit_cnt == 0) && !(data & 0x80))
- {
- dev->xmit_in[dev->xmit_cnt++] = dev->last_status;
- dev->xmit_in[dev->xmit_cnt++] = data;
+ // if this is EOX, kill the running status
+ if (data == MIDI_EOX)
+ {
+ dev->last_status = 0;
+ }
+ }
+
+ return;
+ }
+
+ // handle running status. don't allow system real-time messages to be considered as running status.
+ if ((dev->xmit_cnt == 0) && (data & 0x80) && (data < 0xf8))
+ {
+ dev->last_status = data;
+ }
+
+ if ((dev->xmit_cnt == 0) && !(data & 0x80))
+ {
+ dev->xmit_in[dev->xmit_cnt++] = dev->last_status;
+ dev->xmit_in[dev->xmit_cnt++] = data;
// printf("\trunning status: [%d] = %02x, [%d] = %02x, last_status = %02x\n", dev->xmit_cnt-2, dev->last_status, dev->xmit_cnt-1, data, dev->last_status);
- }
- else
- {
- dev->xmit_in[dev->xmit_cnt++] = data;
+ }
+ else
+ {
+ dev->xmit_in[dev->xmit_cnt++] = data;
// printf("\tNRS: [%d] = %02x\n", dev->xmit_cnt-1, data);
- }
+ }
- if ((dev->xmit_cnt == 1) && (dev->xmit_in[0] == MIDI_SYSEX))
- {
+ if ((dev->xmit_cnt == 1) && (dev->xmit_in[0] == MIDI_SYSEX))
+ {
// printf("Start SysEx!\n");
- dev->last_status = MIDI_SYSEX;
- return;
- }
+ dev->last_status = MIDI_SYSEX;
+ return;
+ }
- // are we there yet?
+ // are we there yet?
// printf("status check: %02x\n", dev->xmit_in[0]);
- switch ((dev->xmit_in[0]>>4) & 0xf)
- {
- case 0xc: // 2-byte messages
- case 0xd:
- bytes_needed = 2;
- break;
-
- case 0xf: // system common
- switch (dev->xmit_in[0] & 0xf)
- {
- case 0: // System Exclusive is handled above
- break;
-
- case 7: // End of System Exclusive
- bytes_needed = 1;
- break;
-
- case 2: // song pos
- case 3: // song select
- bytes_needed = 3;
- break;
-
- default: // all other defined Fx messages are 1 byte
- bytes_needed = 1;
- break;
- }
- break;
-
- default:
- bytes_needed = 3;
- break;
- }
-
- if (dev->xmit_cnt == bytes_needed)
- {
- ev.message = Pm_Message(dev->xmit_in[0], dev->xmit_in[1], dev->xmit_in[2]);
- Pm_Write(dev->pmStream, &ev, 1);
- dev->xmit_cnt = 0;
- }
+ switch ((dev->xmit_in[0]>>4) & 0xf)
+ {
+ case 0xc: // 2-byte messages
+ case 0xd:
+ bytes_needed = 2;
+ break;
+
+ case 0xf: // system common
+ switch (dev->xmit_in[0] & 0xf)
+ {
+ case 0: // System Exclusive is handled above
+ break;
+
+ case 7: // End of System Exclusive
+ bytes_needed = 1;
+ break;
+
+ case 2: // song pos
+ case 3: // song select
+ bytes_needed = 3;
+ break;
+
+ default: // all other defined Fx messages are 1 byte
+ bytes_needed = 1;
+ break;
+ }
+ break;
+
+ default:
+ bytes_needed = 3;
+ break;
+ }
+
+ if (dev->xmit_cnt == bytes_needed)
+ {
+ ev.message = Pm_Message(dev->xmit_in[0], dev->xmit_in[1], dev->xmit_in[2]);
+ Pm_Write(dev->pmStream, &ev, 1);
+ dev->xmit_cnt = 0;
+ }
}
diff --git a/src/osd/modules/osdmodule.c b/src/osd/modules/osdmodule.c
index e907d89249e..06c36b0e3d4 100644
--- a/src/osd/modules/osdmodule.c
+++ b/src/osd/modules/osdmodule.c
@@ -7,110 +7,108 @@
osd_module_manager::osd_module_manager()
{
- for (int i=0; i<MAX_MODULES; i++)
- {
- m_modules[i] = NULL;
- m_selected[i] = NULL;
- }
+ for (int i=0; i<MAX_MODULES; i++)
+ {
+ m_modules[i] = NULL;
+ m_selected[i] = NULL;
+ }
}
osd_module_manager::~osd_module_manager()
{
- for (int i = 0; m_modules[i] != NULL; i++)
- {
- m_modules[i]->~osd_module();
- osd_free(m_modules[i]);
- }
+ for (int i = 0; m_modules[i] != NULL; i++)
+ {
+ m_modules[i]->~osd_module();
+ osd_free(m_modules[i]);
+ }
}
void osd_module_manager::register_module(const module_type &mod_type)
{
- osd_module *module = mod_type();
- if (module->probe())
- {
- osd_printf_verbose("===> registered module %s %s\n", module->name(), module->type());
+ osd_module *module = mod_type();
+ if (module->probe())
+ {
+ osd_printf_verbose("===> registered module %s %s\n", module->name(), module->type());
- int i;
- for (i = 0; m_modules[i] != NULL; i++)
- ;
- m_modules[i] = module;
- }
- else
- {
- osd_printf_verbose("===> not supported %s %s\n", module->name(), module->type());
- module->~osd_module();
- osd_free(module);
- }
+ int i;
+ for (i = 0; m_modules[i] != NULL; i++)
+ ;
+ m_modules[i] = module;
+ }
+ else
+ {
+ osd_printf_verbose("===> not supported %s %s\n", module->name(), module->type());
+ module->~osd_module();
+ osd_free(module);
+ }
}
bool osd_module_manager::type_has_name(const char *type, const char *name)
{
- return (get_module_index(type, name) >= 0);
+ return (get_module_index(type, name) >= 0);
}
osd_module *osd_module_manager::get_module_generic(const char *type, const char *name)
{
- int i = get_module_index(type, name);
- if (i>=0)
- return m_modules[i];
- else
- return NULL;
+ int i = get_module_index(type, name);
+ if (i>=0)
+ return m_modules[i];
+ else
+ return NULL;
}
osd_module *osd_module_manager::select_module(const char *type, const char *name)
{
- osd_module *m = get_module_generic(type, name);
+ osd_module *m = get_module_generic(type, name);
- // FIXME: check if already exists!
- int i;
- for (i = 0; m_selected[i] != NULL; i++)
- ;
- m_selected[i] = m;
- return m;
+ // FIXME: check if already exists!
+ int i;
+ for (i = 0; m_selected[i] != NULL; i++)
+ ;
+ m_selected[i] = m;
+ return m;
}
void osd_module_manager::init()
{
- for (int i = 0; m_selected[i] != NULL; i++)
- {
- m_selected[i]->init();
- }
+ for (int i = 0; m_selected[i] != NULL; i++)
+ {
+ m_selected[i]->init();
+ }
}
void osd_module_manager::exit()
{
- // Find count
- int cnt;
- for (cnt = 0; m_selected[cnt] != NULL; cnt++)
- ;
- for (int i = cnt - 1; i >= 0; i--)
- {
- m_selected[i]->exit();
- m_selected[i] = NULL;
- }
+ // Find count
+ int cnt;
+ for (cnt = 0; m_selected[cnt] != NULL; cnt++)
+ ;
+ for (int i = cnt - 1; i >= 0; i--)
+ {
+ m_selected[i]->exit();
+ m_selected[i] = NULL;
+ }
}
int osd_module_manager::get_module_index(const char *type, const char *name)
{
- for (int i = 0; m_modules[i] != NULL; i++)
- {
- if (strcmp(m_modules[i]->type(), type) == 0 && ((name[0] == 0) || (strcmp(name, m_modules[i]->name())==0)))
- return i;
- }
- return -1;
+ for (int i = 0; m_modules[i] != NULL; i++)
+ {
+ if (strcmp(m_modules[i]->type(), type) == 0 && ((name[0] == 0) || (strcmp(name, m_modules[i]->name())==0)))
+ return i;
+ }
+ return -1;
}
void osd_module_manager::get_module_names(const char *type, const int max, int *num, const char *names[])
{
- *num = 0;
- for (int i = 0; m_modules[i] != NULL; i++)
- {
- if ((strcmp(m_modules[i]->type(), type) == 0) && (*num < max))
- {
- names[*num] = m_modules[i]->name();
- *num = *num + 1;
- }
+ *num = 0;
+ for (int i = 0; m_modules[i] != NULL; i++)
+ {
+ if ((strcmp(m_modules[i]->type(), type) == 0) && (*num < max))
+ {
+ names[*num] = m_modules[i]->name();
+ *num = *num + 1;
+ }
- }
+ }
}
-
-
diff --git a/src/osd/modules/osdmodule.h b/src/osd/modules/osdmodule.h
index 9d24f56a0ec..15748d39ca9 100644
--- a/src/osd/modules/osdmodule.h
+++ b/src/osd/modules/osdmodule.h
@@ -26,22 +26,22 @@ class osd_module
{
public:
- osd_module(const char *type, const char *name)
- : m_name(name), m_type(type)
- {}
- virtual ~osd_module() { }
+ osd_module(const char *type, const char *name)
+ : m_name(name), m_type(type)
+ {}
+ virtual ~osd_module() { }
- const char * name() const { return m_name; }
- const char * type() const { return m_type; }
+ const char * name() const { return m_name; }
+ const char * type() const { return m_type; }
- virtual bool probe() const { return true; }
+ virtual bool probe() const { return true; }
- virtual int init() { return 0; }
- virtual void exit() { }
+ virtual int init() { return 0; }
+ virtual void exit() { }
private:
- astring m_name;
- astring m_type;
+ astring m_name;
+ astring m_type;
};
// a module_type is simply a pointer to its alloc function
@@ -51,56 +51,56 @@ typedef osd_module *(*module_type)();
template<class _ModuleClass>
osd_module *module_creator()
{
- void *p = osd_malloc(sizeof(_ModuleClass));
- return new(p) _ModuleClass;
+ void *p = osd_malloc(sizeof(_ModuleClass));
+ return new(p) _ModuleClass;
}
class osd_module_manager
{
public:
- static const int MAX_MODULES = 32;
+ static const int MAX_MODULES = 32;
- osd_module_manager();
- ~osd_module_manager();
+ osd_module_manager();
+ ~osd_module_manager();
- void register_module(const module_type &mod_type);
- bool type_has_name(const char *type, const char *name);
+ void register_module(const module_type &mod_type);
+ bool type_has_name(const char *type, const char *name);
- osd_module *get_module_generic(const char *type, const char *name);
+ osd_module *get_module_generic(const char *type, const char *name);
- template<class C>
- C select_module(const char *type, const char *name = "")
- {
- return dynamic_cast<C>(select_module(type, name));
- }
+ template<class C>
+ C select_module(const char *type, const char *name = "")
+ {
+ return dynamic_cast<C>(select_module(type, name));
+ }
- osd_module *select_module(const char *type, const char *name = "");
+ osd_module *select_module(const char *type, const char *name = "");
- void get_module_names(const char *type, const int max, int *num, const char *names[]);
+ void get_module_names(const char *type, const int max, int *num, const char *names[]);
- void init();
+ void init();
- void exit();
+ void exit();
private:
- int get_module_index(const char *type, const char *name);
+ int get_module_index(const char *type, const char *name);
- osd_module *m_modules[MAX_MODULES];
- osd_module *m_selected[MAX_MODULES];
+ osd_module *m_modules[MAX_MODULES];
+ osd_module *m_selected[MAX_MODULES];
};
#define MODULE_DEFINITION(_id, _class) \
- extern const module_type _id ; \
- const module_type _id = &module_creator< _class >;
+ extern const module_type _id ; \
+ const module_type _id = &module_creator< _class >;
#define MODULE_NOT_SUPPORTED(_mod, _type, _name) \
- class _mod : public osd_module { \
- public: \
- _mod () \
- : osd_module(_type, _name) {} \
- bool probe() const { return false; } \
- };
+ class _mod : public osd_module { \
+ public: \
+ _mod () \
+ : osd_module(_type, _name) {} \
+ bool probe() const { return false; } \
+ };
#endif /* __OSDMODULE_H__ */
diff --git a/src/osd/modules/sound/direct_sound.c b/src/osd/modules/sound/direct_sound.c
index 95e033b3351..bd30d730ee7 100644
--- a/src/osd/modules/sound/direct_sound.c
+++ b/src/osd/modules/sound/direct_sound.c
@@ -51,26 +51,26 @@ class sound_direct_sound : public osd_module, public sound_module
{
public:
- sound_direct_sound()
- : osd_module(OSD_SOUND_PROVIDER, "dsound"), sound_module()
- {
- }
- virtual ~sound_direct_sound() { }
+ sound_direct_sound()
+ : osd_module(OSD_SOUND_PROVIDER, "dsound"), sound_module()
+ {
+ }
+ virtual ~sound_direct_sound() { }
- virtual int init();
- virtual void exit();
+ virtual int init();
+ virtual void exit();
- // sound_module
+ // sound_module
- virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame);
- virtual void set_mastervolume(int attenuation);
+ virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame);
+ virtual void set_mastervolume(int attenuation);
private:
- HRESULT dsound_init();
- void dsound_kill();
- HRESULT dsound_create_buffers();
- void dsound_destroy_buffers();
- void copy_sample_data(const INT16 *data, int bytes_to_copy);
+ HRESULT dsound_init();
+ void dsound_kill();
+ HRESULT dsound_create_buffers();
+ void dsound_destroy_buffers();
+ void copy_sample_data(const INT16 *data, int bytes_to_copy);
};
@@ -448,7 +448,7 @@ void sound_direct_sound::dsound_destroy_buffers(void)
}
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(sound_direct_sound, OSD_SOUND_PROVIDER, "dsound")
+ MODULE_NOT_SUPPORTED(sound_direct_sound, OSD_SOUND_PROVIDER, "dsound")
#endif
MODULE_DEFINITION(SOUND_DSOUND, sound_direct_sound)
diff --git a/src/osd/modules/sound/js_sound.c b/src/osd/modules/sound/js_sound.c
index f3e11785633..93d76a22c4f 100644
--- a/src/osd/modules/sound/js_sound.c
+++ b/src/osd/modules/sound/js_sound.c
@@ -19,36 +19,36 @@ class sound_js : public osd_module, public sound_module
{
public:
- sound_js()
- : osd_module(OSD_SOUND_PROVIDER, "js"), sound_module()
- {
- }
- virtual ~sound_js() { }
-
- virtual int init();
- virtual void exit();
-
- // sound_module
-
- virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame)
- {
- EM_ASM_ARGS({
- // Forward audio stream update on to JS backend implementation.
- jsmess_update_audio_stream($1, $2);
- }, (unsigned int)buffer, samples_this_frame);
- }
- virtual void set_mastervolume(int attenuation)
- {
- EM_ASM_ARGS({
- // Forward volume update on to JS backend implementation.
- jsmess_set_mastervolume($0);
- }, attenuation);
- }
+ sound_js()
+ : osd_module(OSD_SOUND_PROVIDER, "js"), sound_module()
+ {
+ }
+ virtual ~sound_js() { }
+
+ virtual int init();
+ virtual void exit();
+
+ // sound_module
+
+ virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame)
+ {
+ EM_ASM_ARGS({
+ // Forward audio stream update on to JS backend implementation.
+ jsmess_update_audio_stream($1, $2);
+ }, (unsigned int)buffer, samples_this_frame);
+ }
+ virtual void set_mastervolume(int attenuation)
+ {
+ EM_ASM_ARGS({
+ // Forward volume update on to JS backend implementation.
+ jsmess_set_mastervolume($0);
+ }, attenuation);
+ }
};
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(sound_js, OSD_SOUND_PROVIDER, "js")
+ MODULE_NOT_SUPPORTED(sound_js, OSD_SOUND_PROVIDER, "js")
#endif
MODULE_DEFINITION(SOUND_JS, sound_js)
diff --git a/src/osd/modules/sound/none.c b/src/osd/modules/sound/none.c
index e0173d39d59..501b064afab 100644
--- a/src/osd/modules/sound/none.c
+++ b/src/osd/modules/sound/none.c
@@ -14,19 +14,19 @@
class sound_none : public osd_module, public sound_module
{
public:
- sound_none()
- : osd_module(OSD_SOUND_PROVIDER, "none"), sound_module()
- {
- }
- virtual ~sound_none() { }
+ sound_none()
+ : osd_module(OSD_SOUND_PROVIDER, "none"), sound_module()
+ {
+ }
+ virtual ~sound_none() { }
- virtual int init() { return 0; }
- virtual void exit() { }
+ virtual int init() { return 0; }
+ virtual void exit() { }
- // sound_module
+ // sound_module
- virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame) { }
- virtual void set_mastervolume(int attenuation) { }
+ virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame) { }
+ virtual void set_mastervolume(int attenuation) { }
};
diff --git a/src/osd/modules/sound/sdl_sound.c b/src/osd/modules/sound/sdl_sound.c
index bb46e9f6b91..1c80ab85082 100644
--- a/src/osd/modules/sound/sdl_sound.c
+++ b/src/osd/modules/sound/sdl_sound.c
@@ -43,53 +43,53 @@ class sound_sdl : public osd_module, public sound_module
{
public:
- friend void sdl_callback(void *userdata, Uint8 *stream, int len);
+ friend void sdl_callback(void *userdata, Uint8 *stream, int len);
- // number of samples per SDL callback
- static const int SDL_XFER_SAMPLES = 512;
+ // number of samples per SDL callback
+ static const int SDL_XFER_SAMPLES = 512;
- sound_sdl()
- : osd_module(OSD_SOUND_PROVIDER, "sdl"), sound_module(),
- stream_in_initialized(0),
- stream_loop(0),
- attenuation(0)
- {
- sdl_xfer_samples = SDL_XFER_SAMPLES;
- }
- virtual ~sound_sdl() { }
+ sound_sdl()
+ : osd_module(OSD_SOUND_PROVIDER, "sdl"), sound_module(),
+ stream_in_initialized(0),
+ stream_loop(0),
+ attenuation(0)
+ {
+ sdl_xfer_samples = SDL_XFER_SAMPLES;
+ }
+ virtual ~sound_sdl() { }
- virtual int init();
- virtual void exit();
+ virtual int init();
+ virtual void exit();
- // sound_module
+ // sound_module
- virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame);
- virtual void set_mastervolume(int attenuation);
+ virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame);
+ virtual void set_mastervolume(int attenuation);
private:
- int lock_buffer(bool is_throttled, long offset, long size, void **buffer1, long *length1, void **buffer2, long *length2);
- void unlock_buffer(void);
- void att_memcpy(void *dest, const INT16 *data, int bytes_to_copy);
- void copy_sample_data(bool is_throttled, const INT16 *data, int bytes_to_copy);
- int sdl_create_buffers(void);
- void sdl_destroy_buffers(void);
+ int lock_buffer(bool is_throttled, long offset, long size, void **buffer1, long *length1, void **buffer2, long *length2);
+ void unlock_buffer(void);
+ void att_memcpy(void *dest, const INT16 *data, int bytes_to_copy);
+ void copy_sample_data(bool is_throttled, const INT16 *data, int bytes_to_copy);
+ int sdl_create_buffers(void);
+ void sdl_destroy_buffers(void);
- int sdl_xfer_samples;
- int stream_in_initialized;
- int stream_loop;
- int attenuation;
+ int sdl_xfer_samples;
+ int stream_in_initialized;
+ int stream_loop;
+ int attenuation;
- int buf_locked;
+ int buf_locked;
- INT8 *stream_buffer;
- volatile INT32 stream_playpos;
+ INT8 *stream_buffer;
+ volatile INT32 stream_playpos;
- UINT32 stream_buffer_size;
- UINT32 stream_buffer_in;
+ UINT32 stream_buffer_size;
+ UINT32 stream_buffer_in;
- // buffer over/underflow counts
- int buffer_underflows;
- int buffer_overflows;
+ // buffer over/underflow counts
+ int buffer_underflows;
+ int buffer_overflows;
};
@@ -354,7 +354,7 @@ void sound_sdl::set_mastervolume(int _attenuation)
//============================================================
static void sdl_callback(void *userdata, Uint8 *stream, int len)
{
- sound_sdl *thiz = (sound_sdl *) userdata;
+ sound_sdl *thiz = (sound_sdl *) userdata;
int len1, len2, sb_in;
sb_in = thiz->stream_buffer_in;
@@ -379,20 +379,20 @@ static void sdl_callback(void *userdata, Uint8 *stream, int len)
len2 = 0;
}
- memcpy(stream, thiz->stream_buffer + thiz->stream_playpos, len1);
- memset(thiz->stream_buffer + thiz->stream_playpos, 0, len1); // no longer needed
- if (len2)
- {
- memcpy(stream+len1, thiz->stream_buffer, len2);
- memset(thiz->stream_buffer, 0, len2); // no longer needed
- }
+ memcpy(stream, thiz->stream_buffer + thiz->stream_playpos, len1);
+ memset(thiz->stream_buffer + thiz->stream_playpos, 0, len1); // no longer needed
+ if (len2)
+ {
+ memcpy(stream+len1, thiz->stream_buffer, len2);
+ memset(thiz->stream_buffer, 0, len2); // no longer needed
+ }
// move the play cursor
- thiz->stream_playpos += len1 + len2;
+ thiz->stream_playpos += len1 + len2;
if (thiz->stream_playpos >= thiz->stream_buffer_size)
{
- thiz->stream_playpos -= thiz->stream_buffer_size;
+ thiz->stream_playpos -= thiz->stream_buffer_size;
thiz->stream_loop = 0;
if (LOG_SOUND)
@@ -416,81 +416,81 @@ int sound_sdl::init()
SDL_AudioSpec aspec, obtained;
char audio_driver[16] = "";
- if (LOG_SOUND)
- sound_log = fopen(SDLMAME_SOUND_LOG, "w");
-
- // skip if sound disabled
- if (sample_rate() != 0)
- {
- if (SDL_InitSubSystem(SDL_INIT_AUDIO)) {
- osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
- return -1;
- }
-
- osd_printf_verbose("Audio: Start initialization\n");
- #if (SDLMAME_SDL2)
- strncpy(audio_driver, SDL_GetCurrentAudioDriver(), sizeof(audio_driver));
- #else
- SDL_AudioDriverName(audio_driver, sizeof(audio_driver));
- #endif
- osd_printf_verbose("Audio: Driver is %s\n", audio_driver);
-
- sdl_xfer_samples = SDL_XFER_SAMPLES;
- stream_in_initialized = 0;
- stream_loop = 0;
-
- // set up the audio specs
- aspec.freq = sample_rate();
- aspec.format = AUDIO_S16SYS; // keep endian independent
- aspec.channels = n_channels;
- aspec.samples = sdl_xfer_samples;
- aspec.callback = sdl_callback;
- aspec.userdata = this;
-
- if (SDL_OpenAudio(&aspec, &obtained) < 0)
- goto cant_start_audio;
-
- osd_printf_verbose("Audio: frequency: %d, channels: %d, samples: %d\n",
- obtained.freq, obtained.channels, obtained.samples);
-
- sdl_xfer_samples = obtained.samples;
-
- audio_latency = m_audio_latency;
-
- // pin audio latency
- if (audio_latency > MAX_AUDIO_LATENCY)
- {
- audio_latency = MAX_AUDIO_LATENCY;
- }
- else if (audio_latency < 1)
- {
- audio_latency = 1;
- }
-
- // compute the buffer sizes
- stream_buffer_size = (sample_rate() * 2 * sizeof(INT16) * (2 + audio_latency)) / 30;
- stream_buffer_size = (stream_buffer_size / 1024) * 1024;
- if (stream_buffer_size < 1024)
- stream_buffer_size = 1024;
-
- // create the buffers
- if (sdl_create_buffers())
- goto cant_create_buffers;
-
- // set the startup volume
- set_mastervolume(attenuation);
- osd_printf_verbose("Audio: End initialization\n");
- return 0;
-
- // error handling
- cant_create_buffers:
- cant_start_audio:
- osd_printf_verbose("Audio: Initialization failed. SDL error: %s\n", SDL_GetError());
-
- return -1;
- }
-
- return 0;
+ if (LOG_SOUND)
+ sound_log = fopen(SDLMAME_SOUND_LOG, "w");
+
+ // skip if sound disabled
+ if (sample_rate() != 0)
+ {
+ if (SDL_InitSubSystem(SDL_INIT_AUDIO)) {
+ osd_printf_error("Could not initialize SDL %s\n", SDL_GetError());
+ return -1;
+ }
+
+ osd_printf_verbose("Audio: Start initialization\n");
+ #if (SDLMAME_SDL2)
+ strncpy(audio_driver, SDL_GetCurrentAudioDriver(), sizeof(audio_driver));
+ #else
+ SDL_AudioDriverName(audio_driver, sizeof(audio_driver));
+ #endif
+ osd_printf_verbose("Audio: Driver is %s\n", audio_driver);
+
+ sdl_xfer_samples = SDL_XFER_SAMPLES;
+ stream_in_initialized = 0;
+ stream_loop = 0;
+
+ // set up the audio specs
+ aspec.freq = sample_rate();
+ aspec.format = AUDIO_S16SYS; // keep endian independent
+ aspec.channels = n_channels;
+ aspec.samples = sdl_xfer_samples;
+ aspec.callback = sdl_callback;
+ aspec.userdata = this;
+
+ if (SDL_OpenAudio(&aspec, &obtained) < 0)
+ goto cant_start_audio;
+
+ osd_printf_verbose("Audio: frequency: %d, channels: %d, samples: %d\n",
+ obtained.freq, obtained.channels, obtained.samples);
+
+ sdl_xfer_samples = obtained.samples;
+
+ audio_latency = m_audio_latency;
+
+ // pin audio latency
+ if (audio_latency > MAX_AUDIO_LATENCY)
+ {
+ audio_latency = MAX_AUDIO_LATENCY;
+ }
+ else if (audio_latency < 1)
+ {
+ audio_latency = 1;
+ }
+
+ // compute the buffer sizes
+ stream_buffer_size = (sample_rate() * 2 * sizeof(INT16) * (2 + audio_latency)) / 30;
+ stream_buffer_size = (stream_buffer_size / 1024) * 1024;
+ if (stream_buffer_size < 1024)
+ stream_buffer_size = 1024;
+
+ // create the buffers
+ if (sdl_create_buffers())
+ goto cant_create_buffers;
+
+ // set the startup volume
+ set_mastervolume(attenuation);
+ osd_printf_verbose("Audio: End initialization\n");
+ return 0;
+
+ // error handling
+ cant_create_buffers:
+ cant_start_audio:
+ osd_printf_verbose("Audio: Initialization failed. SDL error: %s\n", SDL_GetError());
+
+ return -1;
+ }
+
+ return 0;
}
@@ -501,27 +501,27 @@ int sound_sdl::init()
void sound_sdl::exit()
{
- // if nothing to do, don't do it
- if (sample_rate() == 0)
- return;
+ // if nothing to do, don't do it
+ if (sample_rate() == 0)
+ return;
- osd_printf_verbose("sdl_kill: closing audio\n");
+ osd_printf_verbose("sdl_kill: closing audio\n");
SDL_CloseAudio();
SDL_QuitSubSystem(SDL_INIT_AUDIO);
- // kill the buffers
- sdl_destroy_buffers();
+ // kill the buffers
+ sdl_destroy_buffers();
- // print out over/underflow stats
- if (buffer_overflows || buffer_underflows)
- osd_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows);
+ // print out over/underflow stats
+ if (buffer_overflows || buffer_underflows)
+ osd_printf_verbose("Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows);
- if (LOG_SOUND)
- {
- fprintf(sound_log, "Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows);
- fclose(sound_log);
- }
+ if (LOG_SOUND)
+ {
+ fprintf(sound_log, "Sound buffer: overflows=%d underflows=%d\n", buffer_overflows, buffer_underflows);
+ fclose(sound_log);
+ }
}
@@ -555,7 +555,7 @@ void sound_sdl::sdl_destroy_buffers(void)
#else /* SDLMAME_UNIX */
- MODULE_NOT_SUPPORTED(sound_sdl, OSD_SOUND_PROVIDER, "sdl")
+ MODULE_NOT_SUPPORTED(sound_sdl, OSD_SOUND_PROVIDER, "sdl")
#endif
MODULE_DEFINITION(SOUND_SDL, sound_sdl)
diff --git a/src/osd/modules/sound/sound_module.h b/src/osd/modules/sound/sound_module.h
index d339af55973..087ace0a714 100644
--- a/src/osd/modules/sound/sound_module.h
+++ b/src/osd/modules/sound/sound_module.h
@@ -18,17 +18,17 @@
class sound_module
{
public:
- sound_module() : m_sample_rate(0), m_audio_latency(1) { }
+ sound_module() : m_sample_rate(0), m_audio_latency(1) { }
- virtual ~sound_module() { }
+ virtual ~sound_module() { }
- virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame) = 0;
- virtual void set_mastervolume(int attenuation) = 0;
+ virtual void update_audio_stream(bool is_throttled, const INT16 *buffer, int samples_this_frame) = 0;
+ virtual void set_mastervolume(int attenuation) = 0;
- int sample_rate() { return m_sample_rate; }
+ int sample_rate() { return m_sample_rate; }
- int m_sample_rate;
- int m_audio_latency;
+ int m_sample_rate;
+ int m_audio_latency;
};
#endif /* FONT_MODULE_H_ */
diff --git a/src/osd/modules/sync/sync_mini.c b/src/osd/modules/sync/sync_mini.c
index e710cc7f214..a09303aed80 100644
--- a/src/osd/modules/sync/sync_mini.c
+++ b/src/osd/modules/sync/sync_mini.c
@@ -160,4 +160,3 @@ int osd_thread_cpu_affinity(osd_thread *thread, UINT32 mask)
void osd_thread_wait_free(osd_thread *thread)
{
}
-
diff --git a/src/osd/modules/sync/sync_ntc.c b/src/osd/modules/sync/sync_ntc.c
index ecd5cd51eaf..9da576b5149 100644
--- a/src/osd/modules/sync/sync_ntc.c
+++ b/src/osd/modules/sync/sync_ntc.c
@@ -411,7 +411,7 @@ int osd_event_wait(osd_event *event, osd_ticks_t timeout)
{
if (timeout == OSD_EVENT_WAIT_INFINITE)
timeout = osd_ticks_per_second() * (osd_ticks_t)10000;
-
+
pthread_mutex_lock(&event->mutex);
if (!timeout)
{
@@ -531,4 +531,3 @@ void osd_thread_wait_free(osd_thread *thread)
pthread_join(thread->thread, NULL);
free(thread);
}
-
diff --git a/src/osd/modules/sync/sync_os2.c b/src/osd/modules/sync/sync_os2.c
index e6df73d083d..9c0612c1288 100644
--- a/src/osd/modules/sync/sync_os2.c
+++ b/src/osd/modules/sync/sync_os2.c
@@ -388,7 +388,7 @@ int osd_event_wait(osd_event *event, osd_ticks_t timeout)
{
ULONG rc;
ULONG timeout_param;
-
+
if (timeout == OSD_EVENT_WAIT_INFINITE)
timeout_param = SEM_INDEFINITE_WAIT;
else
diff --git a/src/osd/modules/sync/sync_sdl.c b/src/osd/modules/sync/sync_sdl.c
index edfc3d105d4..cea1337c7f8 100644
--- a/src/osd/modules/sync/sync_sdl.c
+++ b/src/osd/modules/sync/sync_sdl.c
@@ -326,9 +326,9 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
thread->callback = callback;
thread->param = cbparam;
#ifdef SDLMAME_SDL2
- thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread);
+ thread->thread = SDL_CreateThread(worker_thread_entry, "Thread", thread);
#else
- thread->thread = SDL_CreateThread(worker_thread_entry, thread);
+ thread->thread = SDL_CreateThread(worker_thread_entry, thread);
#endif
if ( thread->thread == NULL )
{
@@ -366,4 +366,3 @@ void osd_thread_wait_free(osd_thread *thread)
SDL_WaitThread(thread->thread, &status);
free(thread);
}
-
diff --git a/src/osd/modules/sync/sync_tc.c b/src/osd/modules/sync/sync_tc.c
index 6c05599baef..b3f63e7c05b 100644
--- a/src/osd/modules/sync/sync_tc.c
+++ b/src/osd/modules/sync/sync_tc.c
@@ -246,7 +246,7 @@ int osd_event_wait(osd_event *event, osd_ticks_t timeout)
{
if (timeout == OSD_EVENT_WAIT_INFINITE)
timeout = osd_ticks_per_second() * (osd_ticks_t)10000;
-
+
pthread_mutex_lock(&event->mutex);
if (!timeout)
{
@@ -389,4 +389,3 @@ void osd_thread_wait_free(osd_thread *thread)
pthread_join(thread->thread, NULL);
free(thread);
}
-
diff --git a/src/osd/modules/sync/sync_windows.c b/src/osd/modules/sync/sync_windows.c
index b7d266a52ad..85ee4f35fd7 100644
--- a/src/osd/modules/sync/sync_windows.c
+++ b/src/osd/modules/sync/sync_windows.c
@@ -244,7 +244,7 @@ int osd_event_wait(osd_event *event, osd_ticks_t timeout)
timeout_param = INFINITE;
else
timeout_param = timeout * 1000 / osd_ticks_per_second();
-
+
int ret = WaitForSingleObject((HANDLE) event, timeout_param);
return (ret == WAIT_OBJECT_0);
}
diff --git a/src/osd/modules/sync/work_osd.c b/src/osd/modules/sync/work_osd.c
index 6c080b5a2ed..89dec09b122 100644
--- a/src/osd/modules/sync/work_osd.c
+++ b/src/osd/modules/sync/work_osd.c
@@ -70,22 +70,22 @@ typedef void *PVOID;
template<typename _PtrType>
static void spin_while(const volatile _PtrType * volatile ptr, const _PtrType val, const osd_ticks_t timeout, const int invert = 0)
{
- osd_ticks_t stopspin = osd_ticks() + timeout;
-
- do {
- int spin = 10000;
- while (--spin)
- {
- if ((*ptr != val) ^ invert)
- return;
- }
- } while (((*ptr == val) ^ invert) && osd_ticks() < stopspin);
+ osd_ticks_t stopspin = osd_ticks() + timeout;
+
+ do {
+ int spin = 10000;
+ while (--spin)
+ {
+ if ((*ptr != val) ^ invert)
+ return;
+ }
+ } while (((*ptr == val) ^ invert) && osd_ticks() < stopspin);
}
template<typename _PtrType>
static void spin_while_not(const volatile _PtrType * volatile ptr, const _PtrType val, const osd_ticks_t timeout)
{
- spin_while(ptr, val, timeout, 1);
+ spin_while(ptr, val, timeout, 1);
}
@@ -553,7 +553,7 @@ int osd_work_item_wait(osd_work_item *item, osd_ticks_t timeout)
if (item->event == NULL)
{
// TODO: do we need to measure the spin time here as well? and how can we do it?
- spin_while(&item->done, 0, timeout);
+ spin_while(&item->done, 0, timeout);
}
// otherwise, block on the event until done
diff --git a/src/osd/osdcore.c b/src/osd/osdcore.c
index 5079f8be2d6..fff285c02da 100644
--- a/src/osd/osdcore.c
+++ b/src/osd/osdcore.c
@@ -54,9 +54,9 @@ static output_delegate output_cb[OSD_OUTPUT_CHANNEL_COUNT] =
output_delegate osd_set_output_channel(output_channel channel, output_delegate callback)
{
if (!(channel < OSD_OUTPUT_CHANNEL_COUNT) || callback.isnull())
- {
- throw std::exception();
- }
+ {
+ throw std::exception();
+ }
/* return the originals if requested */
output_delegate prevcb = output_cb[channel];
@@ -166,4 +166,3 @@ void CLIB_DECL osd_printf_log(const char *format, ...)
va_end(argptr);
}
#endif
-
diff --git a/src/osd/osdepend.h b/src/osd/osdepend.h
index 4e2afcae223..d42c2de88b4 100644
--- a/src/osd/osdepend.h
+++ b/src/osd/osdepend.h
@@ -32,11 +32,11 @@ class input_type_entry; // FIXME: including emu.h does not work because emu.
class osd_font
{
public:
- virtual ~osd_font() {}
+ virtual ~osd_font() {}
- virtual bool open(const char *font_path, const char *name, int &height) = 0;
- virtual void close() = 0;
- virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) = 0;
+ virtual bool open(const char *font_path, const char *name, int &height) = 0;
+ virtual void close() = 0;
+ virtual bool get_bitmap(unicode_char chnum, bitmap_argb32 &bitmap, INT32 &width, INT32 &xoffs, INT32 &yoffs) = 0;
};
// ======================> osd_interface
diff --git a/src/osd/osdmini/minimisc.c b/src/osd/osdmini/minimisc.c
index fa01a02fe10..0fd8162f179 100644
--- a/src/osd/osdmini/minimisc.c
+++ b/src/osd/osdmini/minimisc.c
@@ -81,4 +81,3 @@ char *osd_get_clipboard_text(void)
// can't support clipboards generically
return NULL;
}
-
diff --git a/src/osd/sdl/blit13.h b/src/osd/sdl/blit13.h
index 6b8de983dc2..07177d5e750 100644
--- a/src/osd/sdl/blit13.h
+++ b/src/osd/sdl/blit13.h
@@ -114,7 +114,7 @@ INLINE UINT32 pixel_ycc_to_rgb_pal(UINT16 *pixel, const rgb_t *palette)
#define TEXCOPY_M( _name, _src_type, _dest_type, _op, _len_div) \
INLINE void texcopy_##_name (const texture_info *texture, const render_texinfo *texsource) { \
- ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
+ ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
int x, y; \
/* loop over Y */ \
for (y = 0; y < texsource->height; y++) { \
@@ -134,7 +134,7 @@ INLINE void texcopy_##_name (const texture_info *texture, const render_texinfo *
#define TEXROT( _name, _src_type, _dest_type, _op) \
INLINE void texcopy_rot_##_name (const texture_info *texture, const render_texinfo *texsource) { \
- ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
+ ATTR_UNUSED const rgb_t *palbase = texsource->palette(); \
int x, y; \
const quad_setup_data *setup = &texture->m_setup; \
int dudx = setup->dudx; \
diff --git a/src/osd/sdl/draw13.c b/src/osd/sdl/draw13.c
index c6cc098592d..130080ae54b 100644
--- a/src/osd/sdl/draw13.c
+++ b/src/osd/sdl/draw13.c
@@ -48,12 +48,12 @@ enum
static inline bool is_opaque(const float &a)
{
- return (a >= 1.0f);
+ return (a >= 1.0f);
}
static inline bool is_transparent(const float &a)
{
- return (a < 0.0001f);
+ return (a < 0.0001f);
}
//============================================================
@@ -63,11 +63,11 @@ static inline bool is_transparent(const float &a)
struct quad_setup_data
{
- quad_setup_data()
- : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0),
- rotwidth(0), rotheight(0)
- {}
- void compute(const render_primitive &prim);
+ quad_setup_data()
+ : dudx(0), dvdx(0), dudy(0), dvdy(0), startu(0), startv(0),
+ rotwidth(0), rotheight(0)
+ {}
+ void compute(const render_primitive &prim);
INT32 dudx, dvdx, dudy, dvdy;
INT32 startu, startv;
@@ -105,16 +105,16 @@ struct sdl_info;
/* texture_info holds information about a texture */
class texture_info
{
- friend class simple_list<texture_info>;
+ friend class simple_list<texture_info>;
public:
- texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags);
- ~texture_info();
+ texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, const UINT32 flags);
+ ~texture_info();
- void set_data(const render_texinfo &texsource, const UINT32 flags);
- void render_quad(const render_primitive *prim, const int x, const int y);
- bool matches(const render_primitive &prim, const quad_setup_data &setup);
+ void set_data(const render_texinfo &texsource, const UINT32 flags);
+ void render_quad(const render_primitive *prim, const int x, const int y);
+ bool matches(const render_primitive &prim, const quad_setup_data &setup);
- copy_info_t *compute_size_type();
+ copy_info_t *compute_size_type();
void *m_pixels; // pixels for the texture
int m_pitch;
@@ -125,49 +125,49 @@ public:
osd_ticks_t m_last_access;
int raw_width() const { return m_texinfo.width; }
- int raw_height() const { return m_texinfo.height; }
+ int raw_height() const { return m_texinfo.height; }
- texture_info *next() { return m_next; }
- const render_texinfo &texinfo() const { return m_texinfo; }
- render_texinfo &texinfo() { return m_texinfo; }
+ texture_info *next() { return m_next; }
+ const render_texinfo &texinfo() const { return m_texinfo; }
+ render_texinfo &texinfo() { return m_texinfo; }
- const HashT hash() const { return m_hash; }
- const UINT32 flags() const { return m_flags; }
- const bool is_pixels_owned() const { // do we own / allocated it ?
- return false && ((m_sdl_access == SDL_TEXTUREACCESS_STATIC)
- && (m_copyinfo->func != NULL)) ;
- }
+ const HashT hash() const { return m_hash; }
+ const UINT32 flags() const { return m_flags; }
+ const bool is_pixels_owned() const { // do we own / allocated it ?
+ return false && ((m_sdl_access == SDL_TEXTUREACCESS_STATIC)
+ && (m_copyinfo->func != NULL)) ;
+ }
private:
- Uint32 m_sdl_access;
- SDL_Renderer * m_renderer;
- render_texinfo m_texinfo; // copy of the texture info
- HashT m_hash; // hash value for the texture (must be >= pointer size)
- UINT32 m_flags; // rendering flags
+ Uint32 m_sdl_access;
+ SDL_Renderer * m_renderer;
+ render_texinfo m_texinfo; // copy of the texture info
+ HashT m_hash; // hash value for the texture (must be >= pointer size)
+ UINT32 m_flags; // rendering flags
- SDL_Texture * m_texture_id;
- int m_is_rotated;
+ SDL_Texture * m_texture_id;
+ int m_is_rotated;
- int m_format; // texture format
- SDL_BlendMode m_sdl_blendmode;
+ int m_format; // texture format
+ SDL_BlendMode m_sdl_blendmode;
- texture_info * m_next; // next texture in the list
+ texture_info * m_next; // next texture in the list
};
/* sdl_info is the information about SDL for the current screen */
struct sdl_info
{
- sdl_info()
- : m_blittimer(0), m_renderer(NULL),
- m_hofs(0), m_vofs(0),
- m_resize_pending(0), m_resize_width(0), m_resize_height(0),
- m_last_blit_time(0), m_last_blit_pixels(0)
- {}
+ sdl_info()
+ : m_blittimer(0), m_renderer(NULL),
+ m_hofs(0), m_vofs(0),
+ m_resize_pending(0), m_resize_width(0), m_resize_height(0),
+ m_last_blit_time(0), m_last_blit_pixels(0)
+ {}
- void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
+ void render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y);
- texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
- texture_info *texture_update(const render_primitive &prim);
+ texture_info *texture_find(const render_primitive &prim, const quad_setup_data &setup);
+ texture_info *texture_update(const render_primitive &prim);
INT32 m_blittimer;
@@ -389,46 +389,46 @@ void texture_info::render_quad(const render_primitive *prim, const int x, const
target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
- SDL_SetTextureBlendMode(m_texture_id, m_sdl_blendmode);
- set_coloralphamode(m_texture_id, &prim->color);
- SDL_RenderCopy(m_renderer, m_texture_id, NULL, &target_rect);
+ SDL_SetTextureBlendMode(m_texture_id, m_sdl_blendmode);
+ set_coloralphamode(m_texture_id, &prim->color);
+ SDL_RenderCopy(m_renderer, m_texture_id, NULL, &target_rect);
}
void sdl_info::render_quad(texture_info *texture, const render_primitive *prim, const int x, const int y)
{
- SDL_Rect target_rect;
-
- target_rect.x = x;
- target_rect.y = y;
- target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
- target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
-
- if (texture)
- {
- copy_info_t *copyinfo = texture->m_copyinfo;
- copyinfo->time -= osd_ticks();
- texture->render_quad(prim, x, y);
- copyinfo->time += osd_ticks();
-
- copyinfo->pixel_count += MAX(STAT_PIXEL_THRESHOLD , (texture->raw_width() * texture->raw_height()));
- if (m_last_blit_pixels)
- {
- copyinfo->time += (m_last_blit_time * (INT64) (texture->raw_width() * texture->raw_height())) / (INT64) m_last_blit_pixels;
- }
- copyinfo->samples++;
- copyinfo->perf = ( texture->m_copyinfo->pixel_count * (osd_ticks_per_second()/1000)) / texture->m_copyinfo->time;
- }
- else
- {
- UINT32 sr = (UINT32)(255.0f * prim->color.r);
- UINT32 sg = (UINT32)(255.0f * prim->color.g);
- UINT32 sb = (UINT32)(255.0f * prim->color.b);
- UINT32 sa = (UINT32)(255.0f * prim->color.a);
-
- SDL_SetRenderDrawBlendMode(m_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
- SDL_SetRenderDrawColor(m_renderer, sr, sg, sb, sa);
- SDL_RenderFillRect(m_renderer, &target_rect);
- }
+ SDL_Rect target_rect;
+
+ target_rect.x = x;
+ target_rect.y = y;
+ target_rect.w = round_nearest(prim->bounds.x1 - prim->bounds.x0);
+ target_rect.h = round_nearest(prim->bounds.y1 - prim->bounds.y0);
+
+ if (texture)
+ {
+ copy_info_t *copyinfo = texture->m_copyinfo;
+ copyinfo->time -= osd_ticks();
+ texture->render_quad(prim, x, y);
+ copyinfo->time += osd_ticks();
+
+ copyinfo->pixel_count += MAX(STAT_PIXEL_THRESHOLD , (texture->raw_width() * texture->raw_height()));
+ if (m_last_blit_pixels)
+ {
+ copyinfo->time += (m_last_blit_time * (INT64) (texture->raw_width() * texture->raw_height())) / (INT64) m_last_blit_pixels;
+ }
+ copyinfo->samples++;
+ copyinfo->perf = ( texture->m_copyinfo->pixel_count * (osd_ticks_per_second()/1000)) / texture->m_copyinfo->time;
+ }
+ else
+ {
+ UINT32 sr = (UINT32)(255.0f * prim->color.r);
+ UINT32 sg = (UINT32)(255.0f * prim->color.g);
+ UINT32 sb = (UINT32)(255.0f * prim->color.b);
+ UINT32 sa = (UINT32)(255.0f * prim->color.a);
+
+ SDL_SetRenderDrawBlendMode(m_renderer, map_blendmode(PRIMFLAG_GET_BLENDMODE(prim->flags)));
+ SDL_SetRenderDrawColor(m_renderer, sr, sg, sb, sa);
+ SDL_RenderFillRect(m_renderer, &target_rect);
+ }
}
static int RendererSupportsFormat(SDL_Renderer *renderer, Uint32 format, Uint32 access, const char *sformat)
@@ -518,18 +518,18 @@ int drawsdl2_init(running_machine &machine, sdl_draw_info *callbacks)
else
osd_printf_verbose("Loaded opengl shared library: %s\n", stemp ? stemp : "<default>");
- /* Enable bilinear filtering in case it is supported.
- * This applies to all texture operations. However, artwort is pre-scaled
- * and thus shouldn't be affected.
- */
- if (video_config.filter)
- {
- SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
- }
- else
- {
- SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");
- }
+ /* Enable bilinear filtering in case it is supported.
+ * This applies to all texture operations. However, artwort is pre-scaled
+ * and thus shouldn't be affected.
+ */
+ if (video_config.filter)
+ {
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
+ }
+ else
+ {
+ SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0");
+ }
return 0;
}
@@ -604,7 +604,7 @@ static int drawsdl2_window_create(sdl_window_info *window, int width, int height
{
SDL_DisplayMode mode;
//SDL_GetCurrentDisplayMode(window->monitor()->handle, &mode);
- SDL_GetWindowDisplayMode(window->sdl_window, &mode);
+ SDL_GetWindowDisplayMode(window->sdl_window, &mode);
sdl->m_original_mode = mode;
mode.w = width;
mode.h = height;
@@ -630,13 +630,13 @@ static int drawsdl2_window_create(sdl_window_info *window, int width, int height
osd_printf_warning("Ignoring depth %d\n", window->depth);
}
}
- SDL_SetWindowDisplayMode(window->sdl_window, &mode); // Try to set mode
+ SDL_SetWindowDisplayMode(window->sdl_window, &mode); // Try to set mode
#ifndef SDLMAME_WIN32
- /* FIXME: Warp the mouse to 0,0 in case a virtual desktop resolution
- * is in place after the mode switch - which will most likely be the case
- * This is a hack to work around a deficiency in SDL2
- */
- SDL_WarpMouseInWindow(window->sdl_window, 1, 1);
+ /* FIXME: Warp the mouse to 0,0 in case a virtual desktop resolution
+ * is in place after the mode switch - which will most likely be the case
+ * This is a hack to work around a deficiency in SDL2
+ */
+ SDL_WarpMouseInWindow(window->sdl_window, 1, 1);
#endif
}
else
@@ -736,7 +736,7 @@ static int drawsdl2_window_draw(sdl_window_info *window, UINT32 dc, int update)
SDL_GetWindowSize(window->sdl_window, &window->width, &window->height);
sdl->m_resize_pending = 0;
SDL_RenderSetViewport(sdl->m_renderer, NULL);
- //sdlvideo_monitor_refresh(window->monitor());
+ //sdlvideo_monitor_refresh(window->monitor());
}
@@ -855,14 +855,14 @@ static void drawsdl2_window_destroy(sdl_window_info *window)
drawsdl2_destroy_all_textures(window);
- if (window->fullscreen() && video_config.switchres)
- {
- SDL_SetWindowFullscreen(window->sdl_window, 0); // Try to set mode
- SDL_SetWindowDisplayMode(window->sdl_window, &sdl->m_original_mode); // Try to set mode
- SDL_SetWindowFullscreen(window->sdl_window, SDL_WINDOW_FULLSCREEN); // Try to set mode
- }
+ if (window->fullscreen() && video_config.switchres)
+ {
+ SDL_SetWindowFullscreen(window->sdl_window, 0); // Try to set mode
+ SDL_SetWindowDisplayMode(window->sdl_window, &sdl->m_original_mode); // Try to set mode
+ SDL_SetWindowFullscreen(window->sdl_window, SDL_WINDOW_FULLSCREEN); // Try to set mode
+ }
- SDL_DestroyWindow(window->sdl_window);
+ SDL_DestroyWindow(window->sdl_window);
global_free(sdl);
window->dxdata = NULL;
@@ -889,7 +889,7 @@ copy_info_t *texture_info::compute_size_type()
{
if (RendererSupportsFormat(m_renderer, bi->dst_fmt, m_sdl_access, bi->dstname))
{
- int perf = bi->perf;
+ int perf = bi->perf;
if (perf == 0)
return bi;
else if (perf > (maxperf * 102) / 100)
@@ -920,15 +920,15 @@ copy_info_t *texture_info::compute_size_type()
bool texture_info::matches(const render_primitive &prim, const quad_setup_data &setup)
{
- return texinfo().base == prim.texture.base &&
- texinfo().width == prim.texture.width &&
- texinfo().height == prim.texture.height &&
- texinfo().rowpixels == prim.texture.rowpixels &&
- m_setup.dudx == setup.dudx &&
- m_setup.dvdx == setup.dvdx &&
- m_setup.dudy == setup.dudy &&
- m_setup.dvdy == setup.dvdy &&
- ((flags() ^ prim.flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0;
+ return texinfo().base == prim.texture.base &&
+ texinfo().width == prim.texture.width &&
+ texinfo().height == prim.texture.height &&
+ texinfo().rowpixels == prim.texture.rowpixels &&
+ m_setup.dudx == setup.dudx &&
+ m_setup.dvdx == setup.dvdx &&
+ m_setup.dudy == setup.dudy &&
+ m_setup.dvdy == setup.dvdy &&
+ ((flags() ^ prim.flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0;
}
//============================================================
@@ -937,9 +937,8 @@ bool texture_info::matches(const render_primitive &prim, const quad_setup_data &
texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsource, const quad_setup_data &setup, UINT32 flags)
{
-
// fill in the core data
- m_renderer = renderer;
+ m_renderer = renderer;
m_hash = texture_compute_hash(texsource, flags);
m_flags = flags;
m_texinfo = texsource;
@@ -997,10 +996,10 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour
if (m_sdl_access == SDL_TEXTUREACCESS_STATIC)
{
- if (m_copyinfo->func != NULL)
- m_pixels = malloc(m_setup.rotwidth * m_setup.rotheight * m_copyinfo->dst_bpp);
- else
- m_pixels = NULL;
+ if (m_copyinfo->func != NULL)
+ m_pixels = malloc(m_setup.rotwidth * m_setup.rotheight * m_copyinfo->dst_bpp);
+ else
+ m_pixels = NULL;
}
m_last_access = osd_ticks();
@@ -1008,9 +1007,9 @@ texture_info::texture_info(SDL_Renderer *renderer, const render_texinfo &texsour
texture_info::~texture_info()
{
- if ( is_pixels_owned() && (m_pixels != NULL) )
- free(m_pixels);
- SDL_DestroyTexture(m_texture_id);
+ if ( is_pixels_owned() && (m_pixels != NULL) )
+ free(m_pixels);
+ SDL_DestroyTexture(m_texture_id);
}
//============================================================
@@ -1082,9 +1081,9 @@ void quad_setup_data::compute(const render_primitive &prim)
#if 0
printf("tl.u %f tl.v %f\n", texcoords->tl.u, texcoords->tl.v);
- printf("tr.u %f tr.v %f\n", texcoords->tr.u, texcoords->tr.v);
- printf("bl.u %f bl.v %f\n", texcoords->bl.u, texcoords->bl.v);
- printf("br.u %f br.v %f\n", texcoords->br.u, texcoords->br.v);
+ printf("tr.u %f tr.v %f\n", texcoords->tr.u, texcoords->tr.v);
+ printf("bl.u %f bl.v %f\n", texcoords->bl.u, texcoords->bl.v);
+ printf("br.u %f br.v %f\n", texcoords->br.u, texcoords->br.v);
/* compute start and delta U,V coordinates now */
#endif
@@ -1162,7 +1161,7 @@ texture_info * sdl_info::texture_update(const render_primitive &prim)
if (texture == NULL && prim.texture.base != NULL)
{
texture = global_alloc(texture_info(m_renderer, prim.texture, setup, prim.flags));
- /* add us to the texture list */
+ /* add us to the texture list */
m_texlist.prepend(*texture);
}
@@ -1191,9 +1190,9 @@ static void drawsdl2_destroy_all_textures(sdl_window_info *window)
if(window->primlist)
{
window->primlist->acquire_lock();
- sdl->m_texlist.reset();
- window->primlist->release_lock();
+ sdl->m_texlist.reset();
+ window->primlist->release_lock();
}
else
- sdl->m_texlist.reset();
+ sdl->m_texlist.reset();
}
diff --git a/src/osd/sdl/drawogl.c b/src/osd/sdl/drawogl.c
index 4d9bd21a2e8..7fe795b43ed 100644
--- a/src/osd/sdl/drawogl.c
+++ b/src/osd/sdl/drawogl.c
@@ -161,24 +161,24 @@ struct texture_info;
/* texture_info holds information about a texture */
struct texture_info
{
- texture_info()
- : hash(0), flags(0), rawwidth(0), rawheight(0),
- rawwidth_create(0), rawheight_create(0),
- type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0),
- texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL),
- data_own(0), texCoordBufferName(0)
- {
- for (int i=0; i<2; i++)
- {
- mpass_textureunit[i] = 0;
- mpass_texture_mamebm[i] = 0;
- mpass_fbo_mamebm[i] = 0;
- mpass_texture_scrn[i] = 0;
- mpass_fbo_scrn[i] = 0;
- }
- for (int i=0; i<8; i++)
- texCoord[i] = 0.0f;
- }
+ texture_info()
+ : hash(0), flags(0), rawwidth(0), rawheight(0),
+ rawwidth_create(0), rawheight_create(0),
+ type(0), format(0), borderpix(0), xprescale(0), yprescale(0), nocopy(0),
+ texture(0), texTarget(0), texpow2(0), mpass_dest_idx(0), pbo(0), data(NULL),
+ data_own(0), texCoordBufferName(0)
+ {
+ for (int i=0; i<2; i++)
+ {
+ mpass_textureunit[i] = 0;
+ mpass_texture_mamebm[i] = 0;
+ mpass_fbo_mamebm[i] = 0;
+ mpass_texture_scrn[i] = 0;
+ mpass_fbo_scrn[i] = 0;
+ }
+ for (int i=0; i<8; i++)
+ texCoord[i] = 0.0f;
+ }
HashT hash; // hash value for the texture (must be >= pointer size)
UINT32 flags; // rendering flags
@@ -217,35 +217,35 @@ struct texture_info
/* sdl_info is the information about SDL for the current screen */
struct sdl_info
{
- sdl_info()
- : blittimer(0), extra_flags(0),
+ sdl_info()
+ : blittimer(0), extra_flags(0),
#if (SDLMAME_SDL2)
- gl_context_id(0),
+ gl_context_id(0),
#else
- sdlsurf(NULL),
+ sdlsurf(NULL),
#endif
- initialized(0),
- last_blendmode(0),
- texture_max_width(0),
- texture_max_height(0),
- texpoweroftwo(0),
- usevbo(0), usepbo(0), usefbo(0), useglsl(0), glsl(NULL),
- glsl_program_num(0),
- glsl_program_mb2sc(0),
- usetexturerect(0),
- init_context(0),
- last_hofs(0.0f),
- last_vofs(0.0f),
- surf_w(0),
- surf_h(0)
- {
- for (int i=0; i < HASH_SIZE + OVERFLOW_SIZE; i++)
- texhash[i] = NULL;
- for (int i=0; i < 2*GLSL_SHADER_MAX; i++)
- glsl_program[i] = 0;
- for (int i=0; i < 8; i++)
- texVerticex[i] = 0.0f;
- }
+ initialized(0),
+ last_blendmode(0),
+ texture_max_width(0),
+ texture_max_height(0),
+ texpoweroftwo(0),
+ usevbo(0), usepbo(0), usefbo(0), useglsl(0), glsl(NULL),
+ glsl_program_num(0),
+ glsl_program_mb2sc(0),
+ usetexturerect(0),
+ init_context(0),
+ last_hofs(0.0f),
+ last_vofs(0.0f),
+ surf_w(0),
+ surf_h(0)
+ {
+ for (int i=0; i < HASH_SIZE + OVERFLOW_SIZE; i++)
+ texhash[i] = NULL;
+ for (int i=0; i < 2*GLSL_SHADER_MAX; i++)
+ glsl_program[i] = 0;
+ for (int i=0; i < 8; i++)
+ texVerticex[i] = 0.0f;
+ }
INT32 blittimer;
UINT32 extra_flags;
@@ -3079,40 +3079,40 @@ static void drawogl_destroy_all_textures(sdl_window_info *window)
sdl->texhash[i] = NULL;
if (texture != NULL)
{
- if(sdl->usevbo)
- {
- pfn_glDeleteBuffers( 1, &(texture->texCoordBufferName) );
- texture->texCoordBufferName=0;
- }
-
- if(sdl->usepbo && texture->pbo)
- {
- pfn_glDeleteBuffers( 1, (GLuint *)&(texture->pbo) );
- texture->pbo=0;
- }
-
- if( sdl->glsl_program_num > 1 )
- {
- assert(sdl->usefbo);
- pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_mamebm[0]);
- glDeleteTextures(2, (GLuint *)&texture->mpass_texture_mamebm[0]);
- }
-
- if ( sdl->glsl_program_mb2sc < sdl->glsl_program_num - 1 )
- {
- assert(sdl->usefbo);
- pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_scrn[0]);
- glDeleteTextures(2, (GLuint *)&texture->mpass_texture_scrn[0]);
- }
-
- glDeleteTextures(1, (GLuint *)&texture->texture);
- if ( texture->data_own )
- {
- free(texture->data);
- texture->data=NULL;
- texture->data_own=FALSE;
- }
- global_free(texture);
+ if(sdl->usevbo)
+ {
+ pfn_glDeleteBuffers( 1, &(texture->texCoordBufferName) );
+ texture->texCoordBufferName=0;
+ }
+
+ if(sdl->usepbo && texture->pbo)
+ {
+ pfn_glDeleteBuffers( 1, (GLuint *)&(texture->pbo) );
+ texture->pbo=0;
+ }
+
+ if( sdl->glsl_program_num > 1 )
+ {
+ assert(sdl->usefbo);
+ pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_mamebm[0]);
+ glDeleteTextures(2, (GLuint *)&texture->mpass_texture_mamebm[0]);
+ }
+
+ if ( sdl->glsl_program_mb2sc < sdl->glsl_program_num - 1 )
+ {
+ assert(sdl->usefbo);
+ pfn_glDeleteFramebuffers(2, (GLuint *)&texture->mpass_fbo_scrn[0]);
+ glDeleteTextures(2, (GLuint *)&texture->mpass_texture_scrn[0]);
+ }
+
+ glDeleteTextures(1, (GLuint *)&texture->texture);
+ if ( texture->data_own )
+ {
+ free(texture->data);
+ texture->data=NULL;
+ texture->data_own=FALSE;
+ }
+ global_free(texture);
}
i++;
}
diff --git a/src/osd/sdl/input.c b/src/osd/sdl/input.c
index 4b2f1e57093..87c534a5e5d 100644
--- a/src/osd/sdl/input.c
+++ b/src/osd/sdl/input.c
@@ -1986,16 +1986,16 @@ void sdlinput_poll(running_machine &machine)
else
{
#ifndef SDLMAME_WIN32
- /* FIXME: SDL2 sends some spurious resize events on Ubuntu
- * while in fullscreen mode. Ignore them for now.
- */
- if (!window->fullscreen())
+ /* FIXME: SDL2 sends some spurious resize events on Ubuntu
+ * while in fullscreen mode. Ignore them for now.
+ */
+ if (!window->fullscreen())
#endif
- {
- //printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event));
- if (event.window.data1 != window->width || event.window.data2 != window->height)
- window->window_resize(event.window.data1, event.window.data2);
- }
+ {
+ //printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event));
+ if (event.window.data1 != window->width || event.window.data2 != window->height)
+ window->window_resize(event.window.data1, event.window.data2);
+ }
}
focus_window = window;
break;
diff --git a/src/osd/sdl/netdev_pcap.c b/src/osd/sdl/netdev_pcap.c
index 54d837cc9fe..ec72fe5ed8a 100644
--- a/src/osd/sdl/netdev_pcap.c
+++ b/src/osd/sdl/netdev_pcap.c
@@ -98,11 +98,11 @@ void init_pcap()
return;
}
- while(devs)
- {
- add_netdev(devs->name, devs->description, create_pcap);
- devs = devs->next;
- }
+ while(devs)
+ {
+ add_netdev(devs->name, devs->description, create_pcap);
+ devs = devs->next;
+ }
}
void deinit_pcap()
diff --git a/src/osd/sdl/netdev_pcap_osx.c b/src/osd/sdl/netdev_pcap_osx.c
index 9485f65775d..864732ff601 100644
--- a/src/osd/sdl/netdev_pcap_osx.c
+++ b/src/osd/sdl/netdev_pcap_osx.c
@@ -150,11 +150,11 @@ void init_pcap()
}
#if 1
- while(devs)
- {
- add_netdev(devs->name, devs->description, create_pcap);
- devs = devs->next;
- }
+ while(devs)
+ {
+ add_netdev(devs->name, devs->description, create_pcap);
+ devs = devs->next;
+ }
#else
if (devs)
{
diff --git a/src/osd/sdl/osdsdl.h b/src/osd/sdl/osdsdl.h
index 47bce66a8ee..3bbed8efd16 100644
--- a/src/osd/sdl/osdsdl.h
+++ b/src/osd/sdl/osdsdl.h
@@ -30,7 +30,7 @@
#define SDL13_COMBINE_RESIZE (0)
#endif
#else
- #define SDLMAME_INIT_IN_WORKER_THREAD (0)
+ #define SDLMAME_INIT_IN_WORKER_THREAD (0)
#define SDL13_COMBINE_RESIZE (0)
#endif
@@ -199,7 +199,7 @@ public:
#ifdef USE_NETWORK
virtual bool network_init();
#endif
- //virtual bool midi_init();
+ //virtual bool midi_init();
virtual void video_exit();
virtual void window_exit();
@@ -208,9 +208,9 @@ public:
#ifdef USE_NETWORK
virtual void network_exit();
#endif
- //virtual void midi_exit();
+ //virtual void midi_exit();
- sdl_options &options() { return m_options; }
+ sdl_options &options() { return m_options; }
private:
virtual void osd_exit();
@@ -220,7 +220,7 @@ private:
// FIXME: remove machine usage
void extract_video_config(running_machine &machine);
- sdl_options &m_options;
+ sdl_options &m_options;
watchdog *m_watchdog;
diff --git a/src/osd/sdl/sdl.mak b/src/osd/sdl/sdl.mak
index 2abe695be4e..ca4ae3329dc 100644
--- a/src/osd/sdl/sdl.mak
+++ b/src/osd/sdl/sdl.mak
@@ -738,7 +738,7 @@ DEBUGOBJS = \
$(OSDOBJ)/modules/debugger/qt/debugqtdeviceinformationwindow.moc.o
DEFS += -DUSE_QTDEBUG=1
-
+
else
DEFS += -DUSE_QTDEBUG=0
endif
diff --git a/src/osd/sdl/sdldir.c b/src/osd/sdl/sdldir.c
index 4c3b29dea34..ba1184adc20 100644
--- a/src/osd/sdl/sdldir.c
+++ b/src/osd/sdl/sdldir.c
@@ -152,7 +152,6 @@ osd_directory *osd_opendir(const char *dirname)
if (tmpstr[0] == '$')
{
-
envstr = (char *) osd_malloc_array(strlen(tmpstr)+1);
strcpy(envstr, tmpstr);
diff --git a/src/osd/sdl/sdlfile.c b/src/osd/sdl/sdlfile.c
index 6df7615f1ab..5dc2b309cc9 100644
--- a/src/osd/sdl/sdlfile.c
+++ b/src/osd/sdl/sdlfile.c
@@ -188,7 +188,7 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
envstr[i] = '\0';
- const char *envval = osd_getenv(&envstr[1]);
+ const char *envval = osd_getenv(&envstr[1]);
if (envval != NULL)
{
j = strlen(envval) + strlen(tmpstr) + 1;
@@ -505,31 +505,31 @@ int osd_is_absolute_path(const char *path)
osd_directory_entry *osd_stat(const char *path)
{
- int err;
- osd_directory_entry *result = NULL;
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
- struct stat st;
- #else
- struct stat64 st;
- #endif
-
- #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
- err = stat(path, &st);
- #else
- err = stat64(path, &st);
- #endif
-
- if( err == -1) return NULL;
-
- // create an osd_directory_entry; be sure to make sure that the caller can
- // free all resources by just freeing the resulting osd_directory_entry
- result = (osd_directory_entry *) osd_malloc_array(sizeof(*result) + strlen(path) + 1);
- strcpy(((char *) result) + sizeof(*result), path);
- result->name = ((char *) result) + sizeof(*result);
- result->type = S_ISDIR(st.st_mode) ? ENTTYPE_DIR : ENTTYPE_FILE;
- result->size = (UINT64)st.st_size;
-
- return result;
+ int err;
+ osd_directory_entry *result = NULL;
+ #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+ struct stat st;
+ #else
+ struct stat64 st;
+ #endif
+
+ #if defined(SDLMAME_NO64BITIO) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+ err = stat(path, &st);
+ #else
+ err = stat64(path, &st);
+ #endif
+
+ if( err == -1) return NULL;
+
+ // create an osd_directory_entry; be sure to make sure that the caller can
+ // free all resources by just freeing the resulting osd_directory_entry
+ result = (osd_directory_entry *) osd_malloc_array(sizeof(*result) + strlen(path) + 1);
+ strcpy(((char *) result) + sizeof(*result), path);
+ result->name = ((char *) result) + sizeof(*result);
+ result->type = S_ISDIR(st.st_mode) ? ENTTYPE_DIR : ENTTYPE_FILE;
+ result->size = (UINT64)st.st_size;
+
+ return result;
}
//============================================================
@@ -538,32 +538,32 @@ osd_directory_entry *osd_stat(const char *path)
file_error osd_get_full_path(char **dst, const char *path)
{
- file_error err;
- char path_buffer[512];
-
- err = FILERR_NONE;
-
- if (getcwd(path_buffer, 511) == NULL)
- {
- printf("osd_get_full_path: failed!\n");
- err = FILERR_FAILURE;
- }
- else
- {
- *dst = (char *)osd_malloc_array(strlen(path_buffer)+strlen(path)+3);
-
- // if it's already a full path, just pass it through
- if (path[0] == '/')
- {
- strcpy(*dst, path);
- }
- else
- {
- sprintf(*dst, "%s%s%s", path_buffer, PATH_SEPARATOR, path);
- }
- }
-
- return err;
+ file_error err;
+ char path_buffer[512];
+
+ err = FILERR_NONE;
+
+ if (getcwd(path_buffer, 511) == NULL)
+ {
+ printf("osd_get_full_path: failed!\n");
+ err = FILERR_FAILURE;
+ }
+ else
+ {
+ *dst = (char *)osd_malloc_array(strlen(path_buffer)+strlen(path)+3);
+
+ // if it's already a full path, just pass it through
+ if (path[0] == '/')
+ {
+ strcpy(*dst, path);
+ }
+ else
+ {
+ sprintf(*dst, "%s%s%s", path_buffer, PATH_SEPARATOR, path);
+ }
+ }
+
+ return err;
}
//============================================================
@@ -572,8 +572,8 @@ file_error osd_get_full_path(char **dst, const char *path)
const char *osd_get_volume_name(int idx)
{
- if (idx!=0) return NULL;
- return "/";
+ if (idx!=0) return NULL;
+ return "/";
}
#endif
diff --git a/src/osd/sdl/sdlmain.c b/src/osd/sdl/sdlmain.c
index e6c9e8ed5e1..6337717631b 100644
--- a/src/osd/sdl/sdlmain.c
+++ b/src/osd/sdl/sdlmain.c
@@ -319,7 +319,7 @@ int main(int argc, char *argv[])
#endif
{
- sdl_options options;
+ sdl_options options;
sdl_osd_interface osd(options);
osd.register_options();
cli_frontend frontend(options, osd);
@@ -688,5 +688,3 @@ char *utf8_from_wstring(const WCHAR *wstring)
}
#endif
-
-
diff --git a/src/osd/sdl/sdlos_macosx.c b/src/osd/sdl/sdlos_macosx.c
index 2c0f582c885..3585780f31e 100644
--- a/src/osd/sdl/sdlos_macosx.c
+++ b/src/osd/sdl/sdlos_macosx.c
@@ -121,4 +121,3 @@ char *osd_get_clipboard_text(void)
return result;
}
-
diff --git a/src/osd/sdl/sdlos_unix.c b/src/osd/sdl/sdlos_unix.c
index cee3f498724..c5180bc13b7 100644
--- a/src/osd/sdl/sdlos_unix.c
+++ b/src/osd/sdl/sdlos_unix.c
@@ -147,6 +147,3 @@ char *osd_get_clipboard_text(void)
return result;
}
#endif
-
-
-
diff --git a/src/osd/sdl/sdlos_win32.c b/src/osd/sdl/sdlos_win32.c
index a5ede43df00..ab488b0d70b 100644
--- a/src/osd/sdl/sdlos_win32.c
+++ b/src/osd/sdl/sdlos_win32.c
@@ -101,4 +101,3 @@ char *osd_get_clipboard_text(void)
return result;
}
-
diff --git a/src/osd/sdl/sdlptty_unix.c b/src/osd/sdl/sdlptty_unix.c
index bc9b3a8ff25..60eac1436dd 100644
--- a/src/osd/sdl/sdlptty_unix.c
+++ b/src/osd/sdl/sdlptty_unix.c
@@ -111,21 +111,21 @@ const char *sdlfile_ptty_identifier = "";
file_error sdl_open_ptty(const char *path, UINT32 openflags, osd_file **file, UINT64 *filesize)
{
- return FILERR_ACCESS_DENIED;
+ return FILERR_ACCESS_DENIED;
}
file_error sdl_read_ptty(osd_file *file, void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
{
- return FILERR_ACCESS_DENIED;
+ return FILERR_ACCESS_DENIED;
}
file_error sdl_write_ptty(osd_file *file, const void *buffer, UINT64 offset, UINT32 count, UINT32 *actual)
{
- return FILERR_ACCESS_DENIED;
+ return FILERR_ACCESS_DENIED;
}
file_error sdl_close_ptty(osd_file *file)
{
- return FILERR_ACCESS_DENIED;
+ return FILERR_ACCESS_DENIED;
}
#endif
diff --git a/src/osd/sdl/strconv.c b/src/osd/sdl/strconv.c
index 73d1f576c0a..3eedf040127 100644
--- a/src/osd/sdl/strconv.c
+++ b/src/osd/sdl/strconv.c
@@ -127,15 +127,15 @@ int osd_uchar_from_osdchar(UINT32 *uchar, const char *osdchar, size_t count)
int osd_uchar_from_osdchar(unicode_char *uchar, const char *osdchar, size_t count)
{
- wchar_t wch;
+ wchar_t wch;
- count = mbstowcs(&wch, (char *)osdchar, 1);
- if (count != -1)
- *uchar = wch;
- else
- *uchar = 0;
+ count = mbstowcs(&wch, (char *)osdchar, 1);
+ if (count != -1)
+ *uchar = wch;
+ else
+ *uchar = 0;
- return count;
+ return count;
}
#endif
diff --git a/src/osd/sdl/video.c b/src/osd/sdl/video.c
index bef84f9ba86..5a8da9eb031 100644
--- a/src/osd/sdl/video.c
+++ b/src/osd/sdl/video.c
@@ -154,9 +154,9 @@ void sdlvideo_monitor_refresh(sdl_monitor_info *monitor)
#if defined(SDLMAME_WIN32)
SDL_GetDesktopDisplayMode(monitor->handle, &dmode);
- #else
- SDL_GetCurrentDisplayMode(monitor->handle, &dmode);
- #endif
+ #else
+ SDL_GetCurrentDisplayMode(monitor->handle, &dmode);
+ #endif
monitor->monitor_width = dmode.w;
monitor->monitor_height = dmode.h;
monitor->center_width = dmode.w;
diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c
index 3edd6e87c87..88325d682ad 100644
--- a/src/osd/sdl/window.c
+++ b/src/osd/sdl/window.c
@@ -270,35 +270,35 @@ bool sdl_osd_interface::window_init()
* The code below will document which hints were set.
*/
const char * hints[] = { SDL_HINT_FRAMEBUFFER_ACCELERATION,
- SDL_HINT_RENDER_DRIVER, SDL_HINT_RENDER_OPENGL_SHADERS,
- SDL_HINT_RENDER_SCALE_QUALITY,
- SDL_HINT_RENDER_VSYNC,
- SDL_HINT_VIDEO_X11_XVIDMODE, SDL_HINT_VIDEO_X11_XINERAMA,
- SDL_HINT_VIDEO_X11_XRANDR, SDL_HINT_GRAB_KEYBOARD,
- SDL_HINT_MOUSE_RELATIVE_MODE_WARP,
- SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_HINT_IDLE_TIMER_DISABLED,
- SDL_HINT_ORIENTATIONS,
- SDL_HINT_XINPUT_ENABLED, SDL_HINT_GAMECONTROLLERCONFIG,
- SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, SDL_HINT_ALLOW_TOPMOST,
- SDL_HINT_TIMER_RESOLUTION,
+ SDL_HINT_RENDER_DRIVER, SDL_HINT_RENDER_OPENGL_SHADERS,
+ SDL_HINT_RENDER_SCALE_QUALITY,
+ SDL_HINT_RENDER_VSYNC,
+ SDL_HINT_VIDEO_X11_XVIDMODE, SDL_HINT_VIDEO_X11_XINERAMA,
+ SDL_HINT_VIDEO_X11_XRANDR, SDL_HINT_GRAB_KEYBOARD,
+ SDL_HINT_MOUSE_RELATIVE_MODE_WARP,
+ SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, SDL_HINT_IDLE_TIMER_DISABLED,
+ SDL_HINT_ORIENTATIONS,
+ SDL_HINT_XINPUT_ENABLED, SDL_HINT_GAMECONTROLLERCONFIG,
+ SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, SDL_HINT_ALLOW_TOPMOST,
+ SDL_HINT_TIMER_RESOLUTION,
#if SDL_VERSION_ATLEAST(2, 0, 2)
- SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_HINT_VIDEO_ALLOW_SCREENSAVER,
- SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK,
- SDL_HINT_VIDEO_WIN_D3DCOMPILER, SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT,
- SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES,
+ SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_HINT_VIDEO_ALLOW_SCREENSAVER,
+ SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK,
+ SDL_HINT_VIDEO_WIN_D3DCOMPILER, SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT,
+ SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES,
#endif
#if SDL_VERSION_ATLEAST(2, 0, 3)
- SDL_HINT_RENDER_DIRECT3D11_DEBUG, SDL_HINT_VIDEO_HIGHDPI_DISABLED,
- SDL_HINT_WINRT_PRIVACY_POLICY_URL, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL,
- SDL_HINT_WINRT_HANDLE_BACK_BUTTON,
+ SDL_HINT_RENDER_DIRECT3D11_DEBUG, SDL_HINT_VIDEO_HIGHDPI_DISABLED,
+ SDL_HINT_WINRT_PRIVACY_POLICY_URL, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL,
+ SDL_HINT_WINRT_HANDLE_BACK_BUTTON,
#endif
- NULL
- };
+ NULL
+ };
- osd_printf_verbose("\nHints:\n");
- for (int i = 0; hints[i] != NULL; i++)
- osd_printf_verbose("\t%-40s %s\n", hints[i], SDL_GetHint(hints[i]));
+ osd_printf_verbose("\nHints:\n");
+ for (int i = 0; hints[i] != NULL; i++)
+ osd_printf_verbose("\t%-40s %s\n", hints[i], SDL_GetHint(hints[i]));
#endif
// set up the window list
@@ -1018,17 +1018,17 @@ void sdl_window_info::video_window_update(running_machine &machine)
if (osd_event_wait(rendered_event, event_wait_ticks))
{
- if ((!fullscreen()) || (video_config.switchres))
- {
- blit_surface_size(width, height);
- }
- else
- {
- blit_surface_size(monitor()->center_width, monitor()->center_height);
- }
+ if ((!fullscreen()) || (video_config.switchres))
+ {
+ blit_surface_size(width, height);
+ }
+ else
+ {
+ blit_surface_size(monitor()->center_width, monitor()->center_height);
+ }
// ensure the target bounds are up-to-date, and then get the primitives
- set_target_bounds(this);
+ set_target_bounds(this);
render_primitive_list &primlist = target->get_primitives();
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index 3b47433a91d..ca7d8746c04 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -61,8 +61,8 @@ struct sdl_window_info
m_fullscreen = !video_config.windowed;
prescale = video_config.prescale;
- windowed_width = config->width;
- windowed_height = config->height;
+ windowed_width = config->width;
+ windowed_height = config->height;
}
void video_window_update(running_machine &machine);
diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c
index 05657ad5777..e8bc4626c41 100644
--- a/src/osd/windows/vconv.c
+++ b/src/osd/windows/vconv.c
@@ -91,7 +91,7 @@ static const translation_info gcc_translate[] =
// warning C4510: 'xxx' : default constructor could not be generated
// warning C4512: 'xxx' : assignment operator could not be generated
// warning C4514: 'xxx' : unreferenced inline function has been removed
- // warning C4619: #pragma warning : there is no warning number 'xxx'
+ // warning C4619: #pragma warning : there is no warning number 'xxx'
// warning C4571: Informational: catch(...) semantics changed since Visual C++ 7.1; structured exceptions (SEH) are no longer caught
// warning C4610: struct 'xxx' can never be instantiated - user defined constructor required
// warning C4625: 'xxx' : copy constructor could not be generated because a base class copy constructor is inaccessible or deleted
diff --git a/src/osd/windows/windows.mak b/src/osd/windows/windows.mak
index ef16e5a9aed..832e0dae8b6 100644
--- a/src/osd/windows/windows.mak
+++ b/src/osd/windows/windows.mak
@@ -313,7 +313,7 @@ LDFLAGS += -static-libgcc
ifeq ($(CROSS_BUILD),1)
LDFLAGS += -static
-endif
+endif
# TODO: needs to use $(CC)
TEST_GCC := $(shell gcc --version)
diff --git a/src/tools/chdman.c b/src/tools/chdman.c
index a824c701d74..c71f7d2b94d 100644
--- a/src/tools/chdman.c
+++ b/src/tools/chdman.c
@@ -1702,7 +1702,7 @@ static void do_create_hd(parameters_t &params)
report_error(1, "Invalid size string");
}
}
-
+
// process compression
chd_codec_type compression[4];
memcpy(compression, s_default_hd_compression, sizeof(compression));
@@ -1757,7 +1757,7 @@ static void do_create_hd(parameters_t &params)
if (sscanf(metadata, HARD_DISK_METADATA_FORMAT, &cylinders, &heads, &sectors, &sector_size) != 4)
report_error(1, "Error parsing hard disk metadata in parent CHD");
}
-
+
// validate the size
if (filesize % sector_size != 0)
report_error(1, "Data size is not divisible by sector size %d", sector_size);
diff --git a/src/tools/nltool.c b/src/tools/nltool.c
index 8228b2ba2c8..22d4cf6bd8d 100644
--- a/src/tools/nltool.c
+++ b/src/tools/nltool.c
@@ -88,10 +88,10 @@ struct options_entry oplist[] =
};
NETLIST_START(dummy)
- /* Standard stuff */
+ /* Standard stuff */
- CLOCK(clk, 1000) // 1000 Hz
- SOLVER(Solver, 48000)
+ CLOCK(clk, 1000) // 1000 Hz
+ SOLVER(Solver, 48000)
NETLIST_END()
@@ -172,7 +172,7 @@ public:
nl_util::pstring_list ll = nl_util::split(m_logs, ":");
for (int i=0; i < ll.count(); i++)
{
- pstring name = "log_" + ll[i];
+ pstring name = "log_" + ll[i];
/*netlist_device_t *nc = */ m_setup->register_dev("nld_log", name);
m_setup->register_link(name + ".I", ll[i]);
}
@@ -241,10 +241,10 @@ static void listdevices()
nt.init();
const netlist_factory_t::list_t &list = nt.setup().factory().list();
- netlist_sources_t sources;
+ netlist_sources_t sources;
- sources.add(netlist_source_t("dummy", &netlist_dummy));
- sources.parse(nt.setup(),"dummy");
+ sources.add(netlist_source_t("dummy", &netlist_dummy));
+ sources.parse(nt.setup(),"dummy");
nt.setup().start_devices();
nt.setup().resolve_inputs();
diff --git a/src/version.c b/src/version.c
index ed6293382da..ced7e922540 100644
--- a/src/version.c
+++ b/src/version.c
@@ -8,7 +8,7 @@
***************************************************************************/
-#define BARE_BUILD_VERSION "0.157"
+#define BARE_BUILD_VERSION "0.158"
extern const char bare_build_version[];
extern const char build_version[];