From 4c29419cab5f44db1d52e5f28cef42450406be2a Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 22 Oct 2017 12:34:30 +1100 Subject: srcclean (nw) --- hash/fmtowns_cd.xml | 8 +- hash/fmtowns_flop.xml | 4 +- hash/msx1_cart.xml | 2 +- hash/psx.xml | 260 +++++++++++++-------------- hash/rx78.xml | 2 +- plugins/cheat/init.lua | 2 +- scripts/src/cpu.lua | 2 +- src/devices/bus/abcbus/db411223.cpp | 2 +- src/devices/bus/abcbus/db411223.h | 2 +- src/devices/bus/abcbus/lux10828.cpp | 4 +- src/devices/bus/abcbus/unidisk.cpp | 2 +- src/devices/bus/bbc/tube/tube_80286.cpp | 2 +- src/devices/bus/coco/coco_t4426.cpp | 28 +-- src/devices/bus/gamate/gamate_protection.cpp | 2 +- src/devices/bus/gamate/gamate_protection.h | 4 +- src/devices/bus/gamate/slot.cpp | 2 +- src/devices/bus/vme/vme_hcpu30.cpp | 2 +- src/devices/cpu/sh/sh.cpp | 8 +- src/devices/cpu/sh/sh.h | 8 +- src/devices/cpu/sh/sh2.cpp | 4 +- src/devices/cpu/sh/sh2.h | 6 +- src/devices/cpu/sh/sh2fe.cpp | 2 +- src/devices/cpu/sh/sh4.cpp | 150 ++++++++-------- src/devices/cpu/sh/sh4.h | 8 +- src/devices/cpu/sh/sh4fe.cpp | 4 +- src/devices/cpu/sh/sh_dasm.cpp | 4 +- src/devices/imagedev/floppy.cpp | 2 +- src/devices/machine/mc14411.cpp | 2 +- src/devices/machine/sega_scu.cpp | 84 ++++----- src/devices/machine/sega_scu.h | 18 +- src/devices/machine/smpc.cpp | 118 ++++++------ src/devices/machine/smpc.h | 26 +-- src/devices/machine/stvcd.cpp | 8 +- src/devices/machine/z80scc.cpp | 2 +- src/devices/machine/z80sio.cpp | 2 +- src/devices/video/huc6270.cpp | 12 +- src/devices/video/stvvdp1.cpp | 6 +- src/devices/video/stvvdp2.cpp | 2 +- src/devices/video/vooddefs.h | 4 +- src/emu/debug/debugcon.cpp | 2 +- src/emu/video/rgbsse.h | 6 +- src/lib/formats/acorn_dsk.cpp | 2 +- src/lib/util/timeconv.h | 30 ++-- src/mame/drivers/4enraya.cpp | 6 +- src/mame/drivers/abc1600.cpp | 44 ++--- src/mame/drivers/anes.cpp | 12 +- src/mame/drivers/bottom9.cpp | 2 +- src/mame/drivers/cv1k.cpp | 4 +- src/mame/drivers/dec0.cpp | 74 ++++---- src/mame/drivers/europc.cpp | 10 +- src/mame/drivers/gamate.cpp | 4 +- src/mame/drivers/hikaru.cpp | 2 +- src/mame/drivers/isbc.cpp | 4 +- src/mame/drivers/jalmah.cpp | 2 +- src/mame/drivers/megasys1.cpp | 2 +- src/mame/drivers/mephisto_montec.cpp | 8 +- src/mame/drivers/naomi.cpp | 6 +- src/mame/drivers/pc.cpp | 4 +- src/mame/drivers/pgm2.cpp | 8 +- src/mame/drivers/rx78.cpp | 10 +- src/mame/drivers/saturn.cpp | 18 +- src/mame/drivers/segasp.cpp | 2 +- src/mame/drivers/seibucats.cpp | 50 +++--- src/mame/drivers/stv.cpp | 16 +- src/mame/drivers/targeth.cpp | 20 +-- src/mame/drivers/tmc600.cpp | 34 ++-- src/mame/includes/saturn.h | 20 +-- src/mame/includes/stv.h | 2 +- src/mame/layout/mephisto_mondial2.lay | 106 +++++------ src/mame/layout/notechan.lay | 20 +-- src/mame/machine/dec0.cpp | 2 +- src/mame/machine/kay_kbd.cpp | 2 + src/mame/machine/saturn.cpp | 4 +- src/mame/machine/seibucop/seibucop_dma.hxx | 4 +- src/mame/machine/taitoio.cpp | 2 +- src/mame/mame.lst | 12 +- src/mame/video/gamate.cpp | 62 +++---- src/mame/video/legionna.cpp | 8 +- src/mame/video/taito_b.cpp | 2 +- src/mame/video/ygv608.cpp | 94 +++++----- src/mame/video/ygv608.h | 82 ++++----- src/tools/imgtool/imgtool.cpp | 8 +- src/tools/imgtool/library.h | 6 +- src/tools/imgtool/modules/fat.cpp | 12 +- src/tools/imgtool/modules/prodos.cpp | 12 +- 85 files changed, 827 insertions(+), 825 deletions(-) diff --git a/hash/fmtowns_cd.xml b/hash/fmtowns_cd.xml index 501b02d7574..87c53813cf4 100644 --- a/hash/fmtowns_cd.xml +++ b/hash/fmtowns_cd.xml @@ -447,10 +447,10 @@ Moon Crystal Orange House Moonlight Energy Interheart 1992/12 CD Mori no Ninkimono Fujitsu Social Science Laboratory 1993/12 CD Ms. Detective File #1: Iwami Ginzan Satsujin Jiken Data West 1992/9 CD×02 -Ms. Detective File #1: Iwami Ginzan Satsujin Jiken (Marty compatible) Data West 1992/9 CD×02 +Ms. Detective File #1: Iwami Ginzan Satsujin Jiken (Marty compatible) Data West 1992/9 CD×02 * Ms. Detective File #2: Sugata-naki Irainin Data West 1993/10 SET(CD+FD) -Multimedia Nihon no Rekishi Dai-1-Shou: Kariya-ryou no Kurashi Tokyo Shoseki ? CD -Multimedia Nihon no Rekishi Dai-2-Shou: Kome-zukuri no Mura kara Kofun no Kuni e Tokyo Shoseki 1995/4 CD +Multimedia Nihon no Rekishi Dai-1-Shou: Kariya-ryou no Kurashi Tokyo Shoseki ? CD +Multimedia Nihon no Rekishi Dai-2-Shou: Kome-zukuri no Mura kara Kofun no Kuni e Tokyo Shoseki 1995/4 CD Multimedia Seikatsuka: Ikimono to Otomodachi Dai-2-shuu Tokyo Shoseki 1995/4 CD Muscle Bomber Tentou Demo Capcom 1993/11 CD Museum Etude Towns Victor Entertainment 1994/3 CD @@ -559,7 +559,7 @@ Princess Danger Janis Private Slave Raccoon 1993/8 SET(CD+FD) Pro Student G Renkaban Alice Soft 1995/4 CD Pro Yakyuu Family Stadium '90 Game Arts 1990/9 CD -Psychic Detective Series Vol. 1: Invitation: Kage kara no Shoutaijou (Remake) Data West 1993/11 SET(CD+FD) +Psychic Detective Series Vol. 1: Invitation: Kage kara no Shoutaijou (Remake) Data West 1993/11 SET(CD+FD) Psychic Detective Series Vol. 2: Memories (Remake) Data West 1994/4 SET(CD+FD) Psychic Detective Series Vol. 3: Aya (Remake) Data West 1994/7 SET(CD+FD) Psychic Detective Series Vol. 4: Orgel (Remake) Data West 1994/12 SET(CD+FD) diff --git a/hash/fmtowns_flop.xml b/hash/fmtowns_flop.xml index 07639c58292..6d390c470cf 100644 --- a/hash/fmtowns_flop.xml +++ b/hash/fmtowns_flop.xml @@ -220,11 +220,11 @@ Tops CAI Kyougaku Hakase Seifu no Kazu Tokyo Shuppan Tops CAI Kyougaku Hakase Seisuu Tokyo Shuppan 1993/9 FD Tops CAI Kyougaku Hakase Fudoushiki Tokyo Shuppan 1990/5 FD Tops CAI Kyougaku Hakase Ichiji Kansou Tokyo Shuppan 1990/5 FD -Tops CAI Kyougaku Hakase Renritsu Houteishiki Tokyo Shuppan 1990/5 FD +Tops CAI Kyougaku Hakase Renritsu Houteishiki Tokyo Shuppan 1990/5 FD Tops CAI Kyougaku Hakase 2-ji Houteishiki Tokyo Shuppan 1990/6 FD Tops CAI Kyougaku Hakase 2-ji Kansou Tokyo Shuppan 1990/6 FD Tops CAI Kyougaku Hakase Heihoukon Tokyo Shuppan 1992/9 FD -Tops CAI Kyougaku Hakase Kiso kara no Kakuritsu Tokyo Shuppan 1993/2 FD +Tops CAI Kyougaku Hakase Kiso kara no Kakuritsu Tokyo Shuppan 1993/2 FD Tops CAI Kyougaku Hakase Kuukan Zukei - 1 Tokyo Shuppan 1992/8 FD Tops CAI Kyougaku Hakase Kuukan Zukei - 2 Tokyo Shuppan 1992/8 FD Totsugeki! Bakkon Street JAST 1994/1 FD×02 diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml index 5447ef3800e..7d124b4a064 100644 --- a/hash/msx1_cart.xml +++ b/hash/msx1_cart.xml @@ -10325,7 +10325,7 @@ kept for now until finding out what those bytes affect... + --> diff --git a/hash/psx.xml b/hash/psx.xml index f869e46b490..05a84cbd878 100644 --- a/hash/psx.xml +++ b/hash/psx.xml @@ -8,13 +8,13 @@ These CHDs have been converted from redump.org disc images. The following dumps are currently missing from this set: - - 16 Tales 1 (USA) - - 16 Tales 3 (USA) - * (Madden NFL 96 (USA) (Beta)) - - Online Connection CD - For the PlayStation Game Console (USA) (Demo) - * (Twisted Metal 2 (USA) (Beta)) - - Unknown Variable 1 - Masque Manor (USA) - + - 16 Tales 1 (USA) + - 16 Tales 3 (USA) + * (Madden NFL 96 (USA) (Beta)) + - Online Connection CD - For the PlayStation Game Console (USA) (Demo) + * (Twisted Metal 2 (USA) (Beta)) + - Unknown Variable 1 - Masque Manor (USA) + *) These dumps are not included in the official redump.org datfiles as they are marked with "Possible bad dump" status For an overview of US PS1 discs that have not been dumped and added to redump's database yet, please see http://wiki.redump.org/index.php?title=Sony_Playstation_USA_Missing_Games . @@ -26975,7 +26975,7 @@ For an overview of US PS1 discs that have not been dumped and added to redump's - + @@ -32986,8 +32986,8 @@ For an overview of US PS1 discs that have not been dumped and added to redump's - - + + @@ -436,14 +436,14 @@ @@ -472,7 +472,7 @@ @@ -501,7 +501,7 @@ @@ -530,7 +530,7 @@ diff --git a/src/mame/machine/dec0.cpp b/src/mame/machine/dec0.cpp index a5f59d8b347..0dc090e32be 100644 --- a/src/mame/machine/dec0.cpp +++ b/src/mame/machine/dec0.cpp @@ -71,7 +71,7 @@ READ16_MEMBER(dec0_state::midres_controls_r) case 0xa: // clr.w return 0; - + case 0xc: return 0; /* ?? watchdog ?? */ } diff --git a/src/mame/machine/kay_kbd.cpp b/src/mame/machine/kay_kbd.cpp index 29054381891..473a77f8ac4 100644 --- a/src/mame/machine/kay_kbd.cpp +++ b/src/mame/machine/kay_kbd.cpp @@ -18,6 +18,8 @@ ******************************************************************************/ #include "emu.h" +#include "machine/kay_kbd.h" + #include "sound/beep.h" #include "includes/kaypro.h" diff --git a/src/mame/machine/saturn.cpp b/src/mame/machine/saturn.cpp index fcea8b20e19..b13fe92b4aa 100644 --- a/src/mame/machine/saturn.cpp +++ b/src/mame/machine/saturn.cpp @@ -340,7 +340,7 @@ WRITE_LINE_MEMBER(saturn_state::master_sh2_nmi_w) WRITE_LINE_MEMBER( saturn_state::slave_sh2_reset_w ) { m_slave->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE); -// m_smpc.slave_on = state; +// m_smpc.slave_on = state; } WRITE_LINE_MEMBER( saturn_state::sound_68k_reset_w ) @@ -378,7 +378,7 @@ WRITE_LINE_MEMBER(saturn_state::system_halt_w) WRITE_LINE_MEMBER(saturn_state::dot_select_w) { uint32_t xtal; - + xtal = state ? MASTER_CLOCK_320 : MASTER_CLOCK_352; machine().device("maincpu")->set_unscaled_clock(xtal/2); diff --git a/src/mame/machine/seibucop/seibucop_dma.hxx b/src/mame/machine/seibucop/seibucop_dma.hxx index 904caa64511..114d2c432c9 100644 --- a/src/mame/machine/seibucop/seibucop_dma.hxx +++ b/src/mame/machine/seibucop/seibucop_dma.hxx @@ -49,7 +49,7 @@ void raiden2cop_device::dma_palette_brightness() src = (cop_dma_src[cop_dma_mode] << 6); dst = (cop_dma_dst[cop_dma_mode] << 6); size = ((cop_dma_size[cop_dma_mode] << 5) - (cop_dma_dst[cop_dma_mode] << 6) + 0x20) / 2; - + for (i = 0; i < size; i++) { uint16_t pal_val; @@ -94,7 +94,7 @@ void raiden2cop_device::dma_palette_brightness() g = (paldata & 0x03e0) >> 5; rt = (targetpaldata & 0x001f) >> 0; r = (paldata & 0x001f) >> 0; - + // TODO: presumably any brightness value that isn't 0x0000-0x000f has no effect here if (pal_brightness_val == 0x10) pal_val = bt << 10 | gt << 5 | rt << 0; diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp index b4b94bdf69a..4dbf86e6620 100644 --- a/src/mame/machine/taitoio.cpp +++ b/src/mame/machine/taitoio.cpp @@ -257,7 +257,7 @@ void tc0220ioc_device::device_reset() MACHINE_CONFIG_MEMBER( tc0220ioc_device::device_add_mconfig ) MCFG_WATCHDOG_ADD("watchdog") -// MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(3200)) +// MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(3200)) MACHINE_CONFIG_END /***************************************************************************** diff --git a/src/mame/mame.lst b/src/mame/mame.lst index faa465f0c45..e54b6e9a650 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -8711,7 +8711,7 @@ bishi // GX575 (c) 1996 (Japan) sbishi // GX675 (c) 1998 (Japan) sbishik // GX675 (c) 1998 (Korea) sbishika // GX675 (c) 1998 (Korea) -dobouchn // +dobouchn // @source:bitgraph.cpp bitgrpha // @@ -17125,7 +17125,7 @@ kaypro4a // Kaypro 4 - 4/84 kaypro4p88 // Kaypro 4 - 4/83 w/plus88 board installed kayproii // Kaypro II - 2/83 omni2 // Omni II -omni4 // Omni 4 +omni4 // Omni 4 robie // Kaypro Robie @source:kc.cpp @@ -33451,7 +33451,7 @@ fpoint1 // (c) 1989 (Japan, FD1094) fpoint1d // fpointbj // (c) 1989 (Datsu bootleg, Japan) fpointbl // (c) 1989 (Datsu bootleg) -fpointbla // +fpointbla // fpointd // goldnaxe // (c) 1989 (8751) goldnaxe1 // (c) 1989 (FD1094) @@ -33745,9 +33745,9 @@ strkfgtr // 1991.06 Strike Fighter (World) strkfgtrj // 1991.06 Strike Fighter (Japan) @source:seibucats.cpp -emjjoshi // (c) 1999 Seibu Kaihatsu / CATS -emjscanb // (c) 2001 Seibu Kaihatsu / CATS -emjtrapz // (c) 2001 Seibu Kaihatsu / CATS +emjjoshi // (c) 1999 Seibu Kaihatsu / CATS +emjscanb // (c) 2001 Seibu Kaihatsu / CATS +emjtrapz // (c) 2001 Seibu Kaihatsu / CATS @source:seibuspi.cpp batlball // (c) 1995 Seibu Kaihatsu (Tuning License) diff --git a/src/mame/video/gamate.cpp b/src/mame/video/gamate.cpp index 90b224f4034..02d82ab6b98 100644 --- a/src/mame/video/gamate.cpp +++ b/src/mame/video/gamate.cpp @@ -2,26 +2,26 @@ // copyright-holders:David Haywood, Peter Wilhelmsen, Kevtris /* - Notes: + Notes: - Some games are glitchy, most of these glitches are verified to happen on hardware - for example + Some games are glitchy, most of these glitches are verified to happen on hardware + for example - Badly flipped sprites in Tornado and Insect War - Heavy flickering sprites in many games + Badly flipped sprites in Tornado and Insect War + Heavy flickering sprites in many games - Most of these issues are difficult to notice on real hardware due to the poor - quality display. + Most of these issues are difficult to notice on real hardware due to the poor + quality display. - Thanks to Kevtris for the documentation on which this implementation is based - (some comments taken directly from this) - http://blog.kevtris.org/blogfiles/Gamate%20Inside.txt + Thanks to Kevtris for the documentation on which this implementation is based + (some comments taken directly from this) + http://blog.kevtris.org/blogfiles/Gamate%20Inside.txt - ToDo: + ToDo: - Emulate vram pull / LCD refresh timings more accurately. - Interrupt should maybe be in here, not in drivers/gamate.cpp? - Verify both Window modes act the same as hardware. + Emulate vram pull / LCD refresh timings more accurately. + Interrupt should maybe be in here, not in drivers/gamate.cpp? + Verify both Window modes act the same as hardware. */ #include "emu.h" @@ -125,7 +125,7 @@ WRITE8_MEMBER(gamate_video_device::xpos_w) /* BxxX XXXX B: Bitplane. 0 = lower (bitplane 0), 1 = upper (bitplane 1) - X: 5 lower bits of the 13 bit VRAM address. + X: 5 lower bits of the 13 bit VRAM address. */ m_bitplaneselect = (data & 0x80) >> 7; set_vram_addr_lower_5bits(data & 0x1f); @@ -135,7 +135,7 @@ WRITE8_MEMBER(gamate_video_device::ypos_w) { /* YYYY YYYY - Y: 8 upper bits of 13 bit VRAM address. + Y: 8 upper bits of 13 bit VRAM address. */ set_vram_addr_upper_8bits(data); } @@ -170,13 +170,13 @@ void gamate_video_device::get_real_x_and_y(int &ret_x, int &ret_y, int scanline) { /* the Gamate video has 2 'Window' modes, Mode 1 is enabled with an actual register - Mode 2 is enabled automatically based on the yscroll value - + Mode 2 is enabled automatically based on the yscroll value + both modes seem designed to allow for a non-scrolling status bar at the top of the display. */ - if (m_scrolly < 0xc8) + if (m_scrolly < 0xc8) { ret_y = scanline + m_scrolly; @@ -199,8 +199,8 @@ void gamate_video_device::get_real_x_and_y(int &ret_x, int &ret_y, int scanline) ret_x = m_scrollx; /* - Using Yscroll values of C8-CF, D8-DF, E8-EF, and F8-FF will result in the same - effect as if a Yscroll value of 00h were used. + Using Yscroll values of C8-CF, D8-DF, E8-EF, and F8-FF will result in the same + effect as if a Yscroll value of 00h were used. */ if (m_scrolly & 0x08) // values of C8-CF, D8-DF, E8-EF, and F8-FF { @@ -210,13 +210,13 @@ void gamate_video_device::get_real_x_and_y(int &ret_x, int &ret_y, int scanline) else { /* - Values D0-D7, E0-E7, and F0-F7 all produce a bit more useful effect. The upper - 1-8 scanlines will be pulled from rows F8-FFh in VRAM (i.e. 1F00h = row F8h). + Values D0-D7, E0-E7, and F0-F7 all produce a bit more useful effect. The upper + 1-8 scanlines will be pulled from rows F8-FFh in VRAM (i.e. 1F00h = row F8h). - If F0 is selected, then the upper 8 rows will be the last 8 rows in VRAM- - 1F00-1FFFh area. If F1 is selected, the upper 8 rows will be the last 7 rows - in VRAM and so on. This special window area DOES NOT SCROLL with X making it - useful for status bars. I don't think any games actually used it, though. + If F0 is selected, then the upper 8 rows will be the last 8 rows in VRAM- + 1F00-1FFFh area. If F1 is selected, the upper 8 rows will be the last 7 rows + in VRAM and so on. This special window area DOES NOT SCROLL with X making it + useful for status bars. I don't think any games actually used it, though. */ int fixedscanlines = m_scrolly & 0x7; @@ -232,7 +232,7 @@ void gamate_video_device::get_real_x_and_y(int &ret_x, int &ret_y, int scanline) ret_y = scanline;// +m_scrolly; //if (ret_y >= 0xc8) - // ret_y -= 0xc8; + // ret_y -= 0xc8; } } @@ -299,9 +299,9 @@ PALETTE_INIT_MEMBER(gamate_video_device, gamate) } /* - Of the 150 scanlines emitted, all contain pixel data pulled from RAM. There are - exactly 72900 clocks per frame, so at the nominal 4.433MHz rate, this means the - frame rate is 60.8093Hz. + Of the 150 scanlines emitted, all contain pixel data pulled from RAM. There are + exactly 72900 clocks per frame, so at the nominal 4.433MHz rate, this means the + frame rate is 60.8093Hz. */ MACHINE_CONFIG_MEMBER( gamate_video_device::device_add_mconfig ) diff --git a/src/mame/video/legionna.cpp b/src/mame/video/legionna.cpp index ff22e34adba..76eec7f87eb 100644 --- a/src/mame/video/legionna.cpp +++ b/src/mame/video/legionna.cpp @@ -583,7 +583,7 @@ uint32_t legionna_state::screen_update_legionna(screen_device &screen, bitmap_in draw_sprites(screen,bitmap,cliprect); //if (machine().input().code_pressed_once(KEYCODE_Z)) - // if (m_raiden2cop) m_raiden2cop->dump_table(); + // if (m_raiden2cop) m_raiden2cop->dump_table(); return 0; } @@ -604,7 +604,7 @@ uint32_t legionna_state::screen_update_heatbrl(screen_device &screen, bitmap_ind draw_sprites(screen,bitmap,cliprect); //if (machine().input().code_pressed_once(KEYCODE_Z)) - // if (m_raiden2cop) m_raiden2cop->dump_table(); + // if (m_raiden2cop) m_raiden2cop->dump_table(); return 0; } @@ -625,7 +625,7 @@ uint32_t legionna_state::screen_update_godzilla(screen_device &screen, bitmap_in draw_sprites(screen,bitmap,cliprect); //if (machine().input().code_pressed_once(KEYCODE_Z)) - // if (m_raiden2cop) m_raiden2cop->dump_table(); + // if (m_raiden2cop) m_raiden2cop->dump_table(); return 0; @@ -652,7 +652,7 @@ uint32_t legionna_state::screen_update_grainbow(screen_device &screen, bitmap_in draw_sprites(screen,bitmap,cliprect); //if (machine().input().code_pressed_once(KEYCODE_Z)) - // if (m_raiden2cop) m_raiden2cop->dump_table(); + // if (m_raiden2cop) m_raiden2cop->dump_table(); return 0; } diff --git a/src/mame/video/taito_b.cpp b/src/mame/video/taito_b.cpp index b4ce3fd91a6..caf0590af34 100644 --- a/src/mame/video/taito_b.cpp +++ b/src/mame/video/taito_b.cpp @@ -377,7 +377,7 @@ uint32_t taitob_state::screen_update_taitob(screen_device &screen, bitmap_ind16 m_tc0180vcu->tilemap_draw(screen, bitmap, cliprect, 1, 0); - // TODO: only hiticej properly enables this up during attract mode, + // TODO: only hiticej properly enables this up during attract mode, // hitice / hiticerb keeps this disabled, maybe a btanb fixed in later revision? if (m_pixel_bitmap && (m_pixel_scroll[0] & 0x5800) == 0x5000) /* hitice only */ { diff --git a/src/mame/video/ygv608.cpp b/src/mame/video/ygv608.cpp index d8fe6a80395..1dda727ad85 100644 --- a/src/mame/video/ygv608.cpp +++ b/src/mame/video/ygv608.cpp @@ -47,8 +47,8 @@ * * */ - - + + #include "emu.h" #include "video/ygv608.h" #include "screen.h" @@ -255,12 +255,12 @@ static ADDRESS_MAP_START( regs_map, AS_IO, 8, ygv608_device ) AM_RANGE( 1, 1) AM_READWRITE(pattern_name_table_x_r,pattern_name_table_x_w) AM_RANGE( 2, 2) AM_READWRITE(ram_access_ctrl_r,ram_access_ctrl_w) - + AM_RANGE( 3, 3) AM_READWRITE(sprite_address_r,sprite_address_w) AM_RANGE( 4, 4) AM_READWRITE(scroll_address_r,scroll_address_w) AM_RANGE( 5, 5) AM_READWRITE(palette_address_r,palette_address_w) AM_RANGE( 6, 6) AM_READWRITE(sprite_bank_r,sprite_bank_w) - + // screen control AM_RANGE( 7, 7) AM_READWRITE(screen_ctrl_7_r, screen_ctrl_7_w) AM_RANGE( 8, 8) AM_READWRITE(screen_ctrl_8_r, screen_ctrl_8_w) @@ -327,8 +327,8 @@ ygv608_device::ygv608_device( const machine_config &mconfig, const char *tag, de //------------------------------------------------- void ygv608_device::device_start() { -// memset(&m_ports, 0, sizeof(m_ports)); -// memset(&m_regs, 0, sizeof(m_regs)); +// memset(&m_ports, 0, sizeof(m_ports)); +// memset(&m_regs, 0, sizeof(m_regs)); memset(&m_pattern_name_table, 0, sizeof(m_pattern_name_table)); memset(&m_sprite_attribute_table, 0, sizeof(m_sprite_attribute_table)); @@ -444,7 +444,7 @@ inline int ygv608_device::get_col_division(int raw_col) { if((m_v_div_size & 4) == 0) return 0; - + return ((raw_col >> m_col_shift) * 2) & 0x7f; } @@ -467,7 +467,7 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_8 ) int col = tile_index >> 6; int row = tile_index & 0x3f; int translated_column = get_col_division(col); - + uint8_t attr = 0; int pattern_name_base = 0; int set = (m_md == MD_1PLANE_256COLOUR @@ -527,7 +527,7 @@ TILE_GET_INFO_MEMBER( ygv608_device::get_tile_info_A_8 ) } page &= 0x1f; - + /* add page, base address to pattern name */ j += ( (int)m_scroll_data_table[0][0xc0+page] << 10 ); j += ( m_base_addr[0][base] << 8 ); @@ -850,8 +850,8 @@ void ygv608_device::postload() void ygv608_device::register_state_save() { -// save_item(NAME(m_ports.b)); -// save_item(NAME(m_regs.b)); +// save_item(NAME(m_ports.b)); +// save_item(NAME(m_regs.b)); save_item(NAME(m_pattern_name_table)); save_item(NAME(m_sprite_attribute_table.b)); save_item(NAME(m_scroll_data_table)); @@ -860,7 +860,7 @@ void ygv608_device::register_state_save() save_item(NAME(m_color_state_r)); save_item(NAME(m_color_state_w)); // TODO: register save for the newly added variables - + machine().save().register_postload(save_prepost_delegate(FUNC(ygv608_device::postload), this)); } @@ -912,13 +912,13 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect flipy = (g_attr & SZ_VERTREVERSE) != 0; } - // calculate code and apply sprite base address + // calculate code and apply sprite base address code = ( (int)(m_sprite_bank & sprite_mask[size]) << sprite_shift[size] ) | (int)sa->sn; // apply spf to color (invalidates individual attribute bits for color) if (spf != 0) color = ( code >> ( (spf + spf_shift[size]) * 2 ) ) & 0x0f; // check code boundary (TODO: do we really need this?) - if( code >= layout_total(size) ) + if( code >= layout_total(size) ) { logerror( "SZ_%d: sprite=%d\n", size, code ); code = 0; @@ -948,7 +948,7 @@ void ygv608_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect flipx,flipy, sx-512,sy-512,0x00); } - + } #endif @@ -1064,7 +1064,7 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma for( col=0; colset_scrolly(col, ( (int)m_scroll_data_table[1][translated_column] + ( (int)m_scroll_data_table[1][translated_column+1] << 8 ) ) ); @@ -1130,7 +1130,7 @@ uint32_t ygv608_device::update_screen(screen_device &screen, bitmap_ind16 &bitma draw_sprites(bitmap, finalclip); draw_layer_roz(screen, m_work_bitmap, finalclip, m_tilemap_A); - + if(m_planeA_trans_enable == true) copybitmap_trans( bitmap, m_work_bitmap, 0, 0, 0, 0, finalclip, 0); else @@ -1408,7 +1408,7 @@ WRITE8_MEMBER( ygv608_device::sprite_data_w ) WRITE8_MEMBER( ygv608_device::scroll_data_w ) { m_scroll_data_table[m_ba_plane_scroll_select][m_scroll_address] = data; - + if (m_scaw == true) { m_scroll_address++; @@ -1505,15 +1505,15 @@ void ygv608_device::HandleReset() m_register_address = 0; m_register_autoinc_r = false; m_register_autoinc_w = false; - + /* Clear registers #0-38, #47-49 */ for(i=0;i<39;i++) m_iospace->write_byte(i, 0x00); for(i=47;i<50;i++) m_iospace->write_byte(i, 0x00); -// memset( &m_regs.b[0], 0, 39 ); -// memset( &m_regs.b[47], 0, 3 ); +// memset( &m_regs.b[0], 0, 39 ); +// memset( &m_regs.b[47], 0, 3 ); /* Clear internal ram */ memset( m_pattern_name_table, 0, 4096 ); @@ -1639,12 +1639,12 @@ WRITE8_MEMBER( ygv608_device::pattern_name_table_x_w ) * ---- x--- SCAW Address autoincrements after scroll data write * ---- -x-- SCAR Address autoincrements after scroll data read * ---- --x- SAAW Address autoincrements after sprite attribute table write - * ---- ---x SAAR Address autoincrements after sprite attribute table read + * ---- ---x SAAR Address autoincrements after sprite attribute table read ***/ READ8_MEMBER( ygv608_device::ram_access_ctrl_r ) { return (m_cpaw<<7) | (m_cpar<<6) | - (m_ba_plane_scroll_select<<4) | + (m_ba_plane_scroll_select<<4) | (m_scaw<<3) | (m_scar<<2) | (m_saaw<<1) | (m_saar<<0); } @@ -1725,7 +1725,7 @@ WRITE8_MEMBER( ygv608_device::sprite_bank_w ) READ8_MEMBER( ygv608_device::screen_ctrl_7_r ) { return (m_dckm<<7)|(m_flip<<6)| - (m_zron<<3)|((m_md & 3)<<1)|(m_dspe<<0); + (m_zron<<3)|((m_md & 3)<<1)|(m_dspe<<0); } // R#7W - screen control 7 @@ -1740,31 +1740,31 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_7_w ) m_zron = BIT(data,3); m_md = new_md; m_dspe = BIT(data,0); - + m_na8_mask = ((m_flip == true) ? 0x03 : 0x0f ); - + // changing mode resets the pattern name table states (Mappy Arrange) p0_state_w = 0; p0_state_r = 0; pattern_mode_setup(); // TODO: add dot clock into CRTC -// screen_configure(); +// screen_configure(); } inline void ygv608_device::pattern_mode_setup() -{ +{ m_bits16 = (m_md == MD_2PLANE_8BIT ? 0 : 1 ); - + if(m_md == MD_2PLANE_16BIT ) m_page_x = m_page_y = 32; - else + else { - if (m_page_size == false ) + if (m_page_size == false ) { m_page_x = 64; m_page_y = 32; } - else + else { m_page_x = 32; m_page_y = 64; @@ -1787,7 +1787,7 @@ inline void ygv608_device::pattern_mode_setup() READ8_MEMBER( ygv608_device::screen_ctrl_8_r ) { return (m_h_display_size<<6)|(m_v_display_size<<4)| - (m_roz_wrap_disable<<3)|(m_scroll_wrap_disable<<2)| + (m_roz_wrap_disable<<3)|(m_scroll_wrap_disable<<2)| (m_page_size<<0); } @@ -1796,13 +1796,13 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_8_w ) { if( (data & 1) != m_page_size) m_tilemap_resize = 1; - -/**/m_h_display_size = (data >> 6) & 3; -/**/m_v_display_size = (data >> 4) & 3; + +/**/m_h_display_size = (data >> 6) & 3; +/**/m_v_display_size = (data >> 4) & 3; m_roz_wrap_disable = BIT(data,3); /**/m_scroll_wrap_disable = BIT(data,2); m_page_size = BIT(data,0); - + pattern_mode_setup(); } @@ -1820,22 +1820,22 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_8_w ) READ8_MEMBER( ygv608_device::screen_ctrl_9_r ) { return (m_pattern_size<<6)| - (m_h_div_size<<3)|(m_v_div_size<<0); + (m_h_div_size<<3)|(m_v_div_size<<0); } WRITE8_MEMBER( ygv608_device::screen_ctrl_9_w ) { uint8_t new_pts = (data >> 6) & 3; - + if(new_pts != m_pattern_size) m_tilemap_resize = 1; - + m_pattern_size = new_pts; /**/m_h_div_size = (data >> 3) & 7; m_v_div_size = (data >> 0) & 7; //popmessage("%02x %02x",m_h_div_size,m_v_div_size); - + // TODO: this code is garbage ... if(m_v_div_size == 0) m_col_shift = 8; @@ -1854,7 +1854,7 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_9_w ) } } } - + // R#10R - screen control 10: mosaic & sprite /*** * xx-- ---- SPAx: Auxiliary bits of sprite attribute table (0=8x8 or no flip, 1=16x16 or flipy, 2=32x32 or flipx, 3=64x64 or flipx & y ) @@ -1887,7 +1887,7 @@ WRITE8_MEMBER( ygv608_device::screen_ctrl_10_w ) READ8_MEMBER( ygv608_device::screen_ctrl_11_r ) { return (m_scm<<6)|(m_yse<<5)|(m_cbdr<<4)| - (m_priority_mode<<2)|(m_planeB_trans_enable<<1)|(m_planeA_trans_enable<<0); + (m_priority_mode<<2)|(m_planeB_trans_enable<<1)|(m_planeA_trans_enable<<0); } // R#11W - screen control 11 @@ -2089,13 +2089,13 @@ WRITE8_MEMBER( ygv608_device::crtc_w ) case 40: { int new_display_width = (data & 0x3f) * 16; - + m_crtc.htotal &= ~0x600; m_crtc.htotal |= ((data & 0xc0) << 3); if(new_display_width != m_crtc.display_width) m_screen_resize = 1; - + m_crtc.display_width = new_display_width; break; } @@ -2130,7 +2130,7 @@ WRITE8_MEMBER( ygv608_device::crtc_w ) // TODO: VSLS, bit 6 if(new_display_height != m_crtc.display_height) m_screen_resize = 1; - + m_crtc.display_height = new_display_height; break; } @@ -2150,7 +2150,7 @@ WRITE8_MEMBER( ygv608_device::crtc_w ) { m_crtc.vtotal &= ~0xff; m_crtc.vtotal |= data & 0xff; - + // TODO: call it for all mods in the CRTC, add sanity checks screen_configure(); diff --git a/src/mame/video/ygv608.h b/src/mame/video/ygv608.h index 25043a604e9..575e5463028 100644 --- a/src/mame/video/ygv608.h +++ b/src/mame/video/ygv608.h @@ -166,7 +166,7 @@ private: uint8_t m_na8_mask; // mask on/off na11/9:8 int m_col_shift; // shift in scroll table column index - + // base address shortcuts uint32_t m_base_addr[2][8]; uint32_t m_base_y_shift; // for extracting pattern y coord 'base' @@ -181,8 +181,8 @@ private: // === new variable handling starts here === uint8_t m_screen_status; /**< port #6: status port r/w */ - uint8_t m_dma_status; /**< port #7: system control port r/w */ - + uint8_t m_dma_status; /**< port #7: system control port r/w */ + uint8_t m_register_address; /**< RN: Register address select */ bool m_register_autoinc_r; /**< RRAI: Register address auto-increment on read */ bool m_register_autoinc_w; /**< RWAI: Register address auto-increment on write */ @@ -210,41 +210,41 @@ private: uint8_t m_sprite_aux_reg; /**< SPA: auxiliary bits of sprite attribute table */ uint8_t m_border_color; /**< BDC: border color */ - bool m_saar; /**< SAAR: Address autoinc after reading sprite attribute table */ - bool m_saaw; /**< SAAW: Address autoinc after writing sprite attribute table */ - bool m_scar; /**< SCAR: Address autoinc after reading scroll data table */ - bool m_scaw; /**< SCAW: Address autoinc after writing scroll data table */ - bool m_cpar; /**< CPAR: Address autoinc after reading color palette */ - bool m_cpaw; /**< CPAW: Address autoinc after writing color palette */ - bool m_ba_plane_scroll_select; /**< B/(A) P#2 gains access to scroll data table in A/B plane */ - - bool m_dspe; /**< DSPE: display permission of pattern plane(s) (screen blanked if 0) */ - uint8_t m_md; /**< MDx: mode for pattern planes */ - bool m_zron; /**< ZRON: enable ROZ features */ - bool m_flip; /**< FLIP: enable flip for attribute bits 11 & 10 */ - bool m_dckm; /**< DCKM: dot clock frequency select */ - - bool m_page_size; /**< PGS: page size setter */ - uint8_t m_h_display_size; /**< HDS: horizontal display domain */ - uint8_t m_v_display_size; /**< VDS: vertical display domain */ - bool m_roz_wrap_disable; /**< RLRT: ROZ wraparound disable */ - bool m_scroll_wrap_disable; /**< RLSC: ROZ wraparound disable */ - - uint8_t m_pattern_size; /**< PTS: pattern size of pattern plane */ - uint8_t m_h_div_size; /**< SLH: size of horizontal division in screen division scrolling */ - uint8_t m_v_div_size; /**< SLV: size of vertical division in screen division scrolling */ - - bool m_planeA_trans_enable; /**< CTPA: enable transparency for plane A */ - bool m_planeB_trans_enable; /**< CTPA: enable transparency for plane B */ - uint8_t m_priority_mode; /**< PRM: priority mode select */ - bool m_cbdr; /**< CBDR: color bus terminals CB7 to 0 and SPRT */ - bool m_yse; /**< YSE: permission control of trasparency timing output of YS terminal */ - uint8_t m_scm; /**< SCM: output frequency of clock signal output from terminal FSC */ - - uint8_t m_planeA_color_fetch; /**< APF: A plane color fetch mode */ - uint8_t m_planeB_color_fetch; /**< BPF: B plane color fetch mode */ - uint8_t m_sprite_color_fetch; /**< SPF: sprite color fetch mode */ - + bool m_saar; /**< SAAR: Address autoinc after reading sprite attribute table */ + bool m_saaw; /**< SAAW: Address autoinc after writing sprite attribute table */ + bool m_scar; /**< SCAR: Address autoinc after reading scroll data table */ + bool m_scaw; /**< SCAW: Address autoinc after writing scroll data table */ + bool m_cpar; /**< CPAR: Address autoinc after reading color palette */ + bool m_cpaw; /**< CPAW: Address autoinc after writing color palette */ + bool m_ba_plane_scroll_select; /**< B/(A) P#2 gains access to scroll data table in A/B plane */ + + bool m_dspe; /**< DSPE: display permission of pattern plane(s) (screen blanked if 0) */ + uint8_t m_md; /**< MDx: mode for pattern planes */ + bool m_zron; /**< ZRON: enable ROZ features */ + bool m_flip; /**< FLIP: enable flip for attribute bits 11 & 10 */ + bool m_dckm; /**< DCKM: dot clock frequency select */ + + bool m_page_size; /**< PGS: page size setter */ + uint8_t m_h_display_size; /**< HDS: horizontal display domain */ + uint8_t m_v_display_size; /**< VDS: vertical display domain */ + bool m_roz_wrap_disable; /**< RLRT: ROZ wraparound disable */ + bool m_scroll_wrap_disable; /**< RLSC: ROZ wraparound disable */ + + uint8_t m_pattern_size; /**< PTS: pattern size of pattern plane */ + uint8_t m_h_div_size; /**< SLH: size of horizontal division in screen division scrolling */ + uint8_t m_v_div_size; /**< SLV: size of vertical division in screen division scrolling */ + + bool m_planeA_trans_enable; /**< CTPA: enable transparency for plane A */ + bool m_planeB_trans_enable; /**< CTPA: enable transparency for plane B */ + uint8_t m_priority_mode; /**< PRM: priority mode select */ + bool m_cbdr; /**< CBDR: color bus terminals CB7 to 0 and SPRT */ + bool m_yse; /**< YSE: permission control of trasparency timing output of YS terminal */ + uint8_t m_scm; /**< SCM: output frequency of clock signal output from terminal FSC */ + + uint8_t m_planeA_color_fetch; /**< APF: A plane color fetch mode */ + uint8_t m_planeB_color_fetch; /**< BPF: B plane color fetch mode */ + uint8_t m_sprite_color_fetch; /**< SPF: sprite color fetch mode */ + // screen section devcb_write_line m_vblank_handler; devcb_write_line m_raster_handler; @@ -257,9 +257,9 @@ private: void vblank_irq_check(); /**< mask + pend check for vblank irq */ void raster_irq_check(); /**< mask + pend check for raster irq */ void pattern_name_autoinc_check(); /**< check autoinc for tile pointers */ - void pattern_mode_setup(); /**< refresh pattern mode at register 7/8 change*/ - int get_col_division(int raw_col); /**< calculate column scroll */ - + void pattern_mode_setup(); /**< refresh pattern mode at register 7/8 change*/ + int get_col_division(int raw_col); /**< calculate column scroll */ + enum { VBLANK_TIMER, diff --git a/src/tools/imgtool/imgtool.cpp b/src/tools/imgtool/imgtool.cpp index 75aafe0d25d..67283ce8fa3 100644 --- a/src/tools/imgtool/imgtool.cpp +++ b/src/tools/imgtool/imgtool.cpp @@ -753,7 +753,7 @@ void imgtool::partition::get_attribute_name(uint32_t attribute, const imgtool_at //------------------------------------------------- -// test_imgtool_datetime - unit test for imgtool::datetime +// test_imgtool_datetime - unit test for imgtool::datetime //------------------------------------------------- static bool test_imgtool_datetime(int second, int minute, int hour, int day_of_month, int month, int year) @@ -806,7 +806,7 @@ static bool test_imgtool_datetime(int second, int minute, int hour, int day_of_m //------------------------------------------------- -// test_imgtool_datetime - unit tests for imgtool::datetime +// test_imgtool_datetime - unit tests for imgtool::datetime //------------------------------------------------- static bool test_imgtool_datetime() @@ -814,9 +814,9 @@ static bool test_imgtool_datetime() bool error = false; // various test cases for imgtool::datetime - if (test_imgtool_datetime(34, 23, 12, 18, 3, 1993)) // March 18th, 1993 12:23:34 + if (test_imgtool_datetime(34, 23, 12, 18, 3, 1993)) // March 18th, 1993 12:23:34 error = true; - if (test_imgtool_datetime(0, 20, 16, 25, 12, 1976)) // December 25th, 1976 16:20:00 + if (test_imgtool_datetime(0, 20, 16, 25, 12, 1976)) // December 25th, 1976 16:20:00 error = true; return error; diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h index cf1e16a111b..c709a70201b 100644 --- a/src/tools/imgtool/library.h +++ b/src/tools/imgtool/library.h @@ -112,9 +112,9 @@ namespace imgtool time_t to_time_t() const; private: - static imgtool_clock::duration s_gmt_offset; - datetime_type m_type; - std::chrono::time_point m_time_point; + static imgtool_clock::duration s_gmt_offset; + datetime_type m_type; + std::chrono::time_point m_time_point; static imgtool_clock::duration calculate_gmt_offset(); }; diff --git a/src/tools/imgtool/modules/fat.cpp b/src/tools/imgtool/modules/fat.cpp index 3dcdd1e5301..e1b3a914c2b 100644 --- a/src/tools/imgtool/modules/fat.cpp +++ b/src/tools/imgtool/modules/fat.cpp @@ -1244,12 +1244,12 @@ static void fat_cannonicalize_sfn(char *sfn, const uint8_t *sfn_bytes) static imgtool::datetime fat_crack_time(uint32_t fat_time) { util::arbitrary_datetime dt; - dt.second = ((fat_time >> 0) & 0x001F) * 2; - dt.minute = ((fat_time >> 5) & 0x003F); - dt.hour = ((fat_time >> 11) & 0x001F); - dt.day_of_month = ((fat_time >> 16) & 0x001F); - dt.month = ((fat_time >> 21) & 0x000F); - dt.year = ((fat_time >> 25) & 0x007F) + 1980; + dt.second = ((fat_time >> 0) & 0x001F) * 2; + dt.minute = ((fat_time >> 5) & 0x003F); + dt.hour = ((fat_time >> 11) & 0x001F); + dt.day_of_month = ((fat_time >> 16) & 0x001F); + dt.month = ((fat_time >> 21) & 0x000F); + dt.year = ((fat_time >> 25) & 0x007F) + 1980; return imgtool::datetime(imgtool::datetime::LOCAL, dt); } diff --git a/src/tools/imgtool/modules/prodos.cpp b/src/tools/imgtool/modules/prodos.cpp index f5b27537671..6db41ae529b 100644 --- a/src/tools/imgtool/modules/prodos.cpp +++ b/src/tools/imgtool/modules/prodos.cpp @@ -189,12 +189,12 @@ enum creation_policy_t static imgtool::datetime prodos_crack_time(uint32_t prodos_time) { util::arbitrary_datetime dt; - dt.second = 0; - dt.minute = ((prodos_time >> 16) & 0x3F); - dt.hour = ((prodos_time >> 24) & 0x1F); - dt.day_of_month = ((prodos_time >> 0) & 0x1F); - dt.month = ((prodos_time >> 5) & 0x0F) + 1; - dt.year = ((prodos_time >> 9) & 0x7F) + 1900; + dt.second = 0; + dt.minute = ((prodos_time >> 16) & 0x3F); + dt.hour = ((prodos_time >> 24) & 0x1F); + dt.day_of_month = ((prodos_time >> 0) & 0x1F); + dt.month = ((prodos_time >> 5) & 0x0F) + 1; + dt.year = ((prodos_time >> 9) & 0x7F) + 1900; if (dt.year <= 1949) dt.year += 100; -- cgit v1.2.3