From c34c2144e136f3bd2ed4fe6a8011e64d7d3264c8 Mon Sep 17 00:00:00 2001 From: angelosa Date: Wed, 8 May 2024 00:25:00 +0200 Subject: [PATCH] sharp/x1: fix AY routing to mono --- hash/x1_flop.xml | 59 ++++++++++++++++++++++++++------------- src/mame/sharp/x1.cpp | 28 +++++++++++-------- src/mame/sharp/x1.h | 2 +- src/mame/sharp/x1twin.cpp | 6 ++-- 4 files changed, 59 insertions(+), 36 deletions(-) diff --git a/hash/x1_flop.xml b/hash/x1_flop.xml index f67366e2ad9..2e5b7ba8ad6 100644 --- a/hash/x1_flop.xml +++ b/hash/x1_flop.xml @@ -19,20 +19,17 @@ Games I haven't managed to start (possibly due to my mistakes): * gatlabyr: how to start a game? * gambler2: how to pass the first menu? * crimson, crimsona: which disk combination is expected? -* blassty: stuck at no animation menu Games with possible issues (either in emulation or in dump): * wizardry->4: can't add character name. also how to create a duplicate disk (in pc8801 they were in the disk set)? * profmj: true 400 lines mode not implemented? * hydlide2b has no saved data, while hydlide2 & hydlide2a have characters in them * hydlide3b: fails to see the user disk + the set contains at least 1 hydlide disk (check crc16) -* gruppe: starts loading then errors out as if the disk is not recognized * frontlin: input issue? * dione: does not display text correctly * blckonyx: is it missing a data disk? * bastard: does not start. input issue? * aokiooka: glitches (chars cut in half) -* advfant: glitches * ys: character sprite is glitched until you enter a new area Games which start loading but never reach the program: @@ -101,29 +98,30 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks) - + Advanced Fantasian - Quest for Lost Sanctuary 1989 クリスタルソフト (Xtal Soft) + + + + - - - - Advanced Fantasian - Quest for Lost Sanctuary (Demo) - 1989 - クリスタルソフト (Xtal Soft) - + + @@ -445,10 +443,14 @@ Black screen after WolfTeam logo - + Cruise Chaser - Blassty 1986 スクウェア (Square) + + @@ -938,10 +940,14 @@ IPL loading resolves to a red and corrupt screen, baddump? - + Gruppe 1985 SPS + + @@ -2842,10 +2848,14 @@ Broken [kanji] - + Super Laydock - Mission Striker 1988 T&E Soft + + @@ -2860,10 +2870,14 @@ Broken [kanji] - + Super Laydock - Mission Striker (alt) 1988 T&E Soft + + @@ -2878,8 +2892,9 @@ Broken [kanji] - - Super Laydock Muteki + + + Super Laydock - Mission Striker (Muteki hack) 19?? T&E Soft @@ -6445,10 +6460,16 @@ HP Osho - + Dezalis 19?? - <unknown> + <homebrew> + + + + diff --git a/src/mame/sharp/x1.cpp b/src/mame/sharp/x1.cpp index d2195d8d702..b182f1dfce1 100644 --- a/src/mame/sharp/x1.cpp +++ b/src/mame/sharp/x1.cpp @@ -5,7 +5,18 @@ Sharp X1 (c) 1983 Sharp Corporation +References: +- http://www.x1center.org/ +- http://ematei.s602.xrea.com/kenkyu/x1syasin.htm +- http://www2s.biglobe.ne.jp/~ITTO/x1/x1menu.html +- https://eaw.app/sharpx1-manuals/ +- https://www.leadedsolder.com/tag/sharp-x1-turbo +- http://takeda-toshiya.my.coocan.jp/x1twin/index.html +- https://monochromeeffect.org/JVCC/2019/05/01/sharp-x1-turbo-z/ +- https://monochromeeffect.org/JVCC/2019/06/24/sharp-x1-d/ + TODO: +- clean-up QA, is ugly and outdated; - clean-ups, split components into devices if necessary and maybe separate turbo/turboz features into specific file(s); - refactor base video into a true scanline renderer, expect it to break 6845 drawing delegation support badly; - support extended x1turboz video features (need more test cases?); @@ -56,7 +67,6 @@ Notes: [0x14 - 0x15] destination address start address [0x16 to 0x17] start boot jump vector [0x1d to 0x1f] start boot data vector -- Gruppe: shows a random bitmap graphic then returns "program load error" ... it wants that the floppy has write protection enabled (!) (btanb) - Maidum: you need to load BOTH disk with write protection disabled, otherwise it refuses to run. (btanb) - Marvelous: needs write protection disabled (btanb) - Chack'n Pop: to load this game, do a files command on the "Jodan Dos" prompt then move the cursor up at the "Chack'n Pop" file. @@ -159,9 +169,6 @@ Notes: X1turboZIII (CZ-888C) - December, 1988 * same as turboZII, but no more built-in cassette drive - Please refer to http://www2s.biglobe.ne.jp/~ITTO/x1/x1menu.html for - more info - BASIC has to be loaded from external media (tape or disk), the computer only has an Initial Program Loader (IPL) @@ -1465,8 +1472,8 @@ uint8_t x1_state::x1_portb_r() { //logerror("PPI Port B read\n"); uint8_t res = 0; - // TODO: ys3 is unhappy about V-DISP - // NOTE: all PCG games actively reads from here, touching this uncarefully *will* break stuff + // TODO: ys3 is unhappy about V-DISP + // NOTE: all PCG games actively reads from here, touching this uncarefully *will* break stuff int vblank_line = m_crtc_vreg[6] * (m_crtc_vreg[9]+1); int vsync_line = m_crtc_vreg[7] * (m_crtc_vreg[9]+1); m_vdisp = (m_screen->vpos() < vblank_line) ? 0x80 : 0x00; @@ -2178,7 +2185,7 @@ static void x1_floppies(device_slot_interface &device) { // TODO: 3" (!?) and 8" options, verify if vanilla X1 has them all device.option_add("525dd", FLOPPY_525_DD); -// device.option_add("525hd", FLOPPY_525_HD); +// device.option_add("525hd", FLOPPY_525_HD); } void x1_state::x1(machine_config &config) @@ -2245,10 +2252,8 @@ void x1_state::x1(machine_config &config) ay8910_device &ay(AY8910(config, "ay", MAIN_CLOCK/8)); ay.port_a_read_callback().set_ioport("P1"); ay.port_b_read_callback().set_ioport("P2"); - ay.add_route(0, "lspeaker", 0.25); - ay.add_route(0, "rspeaker", 0.25); - ay.add_route(1, "lspeaker", 0.5); - ay.add_route(2, "rspeaker", 0.5); + ay.add_route(ALL_OUTPUTS, "lspeaker", 0.25); + ay.add_route(ALL_OUTPUTS, "rspeaker", 0.25); CASSETTE(config, m_cassette); m_cassette->set_formats(x1_cassette_formats); @@ -2391,7 +2396,6 @@ void x1_state::init_x1_kanji() } -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1982, x1, 0, 0, x1, x1, x1_state, empty_init, "Sharp", "X1 (CZ-800C)", 0 ) // x1twin in x1twin.cpp COMP( 1984, x1turbo, x1, 0, x1turbo, x1turbo, x1turbo_state, init_x1_kanji, "Sharp", "X1 Turbo (CZ-850C)", MACHINE_NOT_WORKING ) //model 10 diff --git a/src/mame/sharp/x1.h b/src/mame/sharp/x1.h index 4116f977c9a..d7ed50c3ed3 100644 --- a/src/mame/sharp/x1.h +++ b/src/mame/sharp/x1.h @@ -140,7 +140,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(ipl_reset); DECLARE_INPUT_CHANGED_MEMBER(nmi_reset); TIMER_CALLBACK_MEMBER(rtc_tick_cb); - TIMER_CALLBACK_MEMBER(fdc_motor_off_cb); + TIMER_CALLBACK_MEMBER(fdc_motor_off_cb); TIMER_DEVICE_CALLBACK_MEMBER(cmt_seek_cb); TIMER_DEVICE_CALLBACK_MEMBER(sub_keyboard_cb); diff --git a/src/mame/sharp/x1twin.cpp b/src/mame/sharp/x1twin.cpp index c1e6e44e7a6..68d9173e18f 100644 --- a/src/mame/sharp/x1twin.cpp +++ b/src/mame/sharp/x1twin.cpp @@ -505,10 +505,8 @@ void x1twin_state::x1twin(machine_config &config) ay8910_device &ay(AY8910(config, "ay", MAIN_CLOCK/8)); ay.port_a_read_callback().set_ioport("P1"); ay.port_b_read_callback().set_ioport("P2"); - ay.add_route(0, "x1_l", 0.25); - ay.add_route(0, "x1_r", 0.25); - ay.add_route(1, "x1_l", 0.5); - ay.add_route(2, "x1_r", 0.5); + ay.add_route(ALL_OUTPUTS, "x1_l", 0.25); + ay.add_route(ALL_OUTPUTS, "x1_r", 0.25); CASSETTE(config, m_cassette); m_cassette->set_formats(x1_cassette_formats);