sharp/x1: WIP modernization

This commit is contained in:
angelosa 2024-05-07 12:36:34 +02:00
parent 1b9da5fc4e
commit ae2ed97a7c
6 changed files with 563 additions and 472 deletions

View file

@ -58787,4 +58787,20 @@ ExtractDisk [03]"backup " -> "z's staff kid88_03.d88"
</part>
</software>
<software name="srdemo" supported="partial">
<description>PC-8801mkIISR Demonstration</description>
<year>19??</year>
<publisher>NEC</publisher>
<notes><![CDATA[
Carigraph item don't draw (verify, used pc8801ma as base)
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="sr_demo.d88" size="348848" crc="de25efe7" sha1="6ee78c3c231ef33bd7dd259c7edb1b10f2b56fdf"/>
</dataarea>
</part>
</software>
</softwarelist>

View file

@ -3,19 +3,18 @@
<!--
license:CC0-1.0
TODO:
- Move x1turbo only games as sharedfeat;
- Add feature disk labels;
Titles, publishers and release dates taken from:
- X1 Soft Database ( http://www2s.biglobe.ne.jp/~ITTO/x1/softdb.html )
but the website only covers post 1985 titles...
Games I haven't managed to start (possibly due to my mistakes):
* zeliard: at the end of the intro it prints "read EMM address [00]" while waiting for something
* suikoden, sangoku2, sangoku2a, nobuseng: sits to a jpn message waiting for who knows what
* revolty2: waits for something to happen
* reviver: waits for something to happen
* mule, mulea: waits for something to happen
* mugen2: waits for something to happen
* lastarma: sits forever at the first intro screen
* lagrange, dside: incomplete dump, needs system disc?
* hajafuin: waits for something to happen
* gatlabyr: how to start a game?
* gambler2: how to pass the first menu?
@ -25,44 +24,21 @@ Games I haven't managed to start (possibly due to my mistakes):
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?
* mightmag: corrupted chars
* lizard: waits for something to happen
* hydlide2b has no saved data, while hydlide2 &amp; 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
* gradiusk: is this supposed to do something?
* frontlin: input issue?
* dione: does not display text correctly
* blckonyx: is it missing a data disk?
* bastard: does not start. input issue?
* arcus: black screen after wolfteam logo
* aokiooka: glitches (chars cut in half)
* alpha: is the title screen correct or is it glitched (I'd bet the latter)?
* advfant: glitches
* ys: character sprite is glitched until you enter a new area
Games which start loading but never reach the program:
* vipc
* vipd
* turbobas (but not the clone turbobasa)
* turbzbas
* scruiser
* psyoblad
* powermj
* kingkngt
* jesus
* jesusd
* hydlide3, hydlide3a (invalid disks 2?)
* aztec
* ys3
Games which are completely not recognized (maybe not for x1?)
* unk_fl1
* srdemo
* robowres
* punchbal
* manilove
* fmdata
Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
@ -115,7 +91,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>A-Ressha de Ikou</description>
<year>1986</year>
<publisher>アートディンク (Artdink)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198608xx"/>
<info name="alt_title" value="A列車で行こう"/>
<part name="flop1" interface="floppy_5_25">
@ -154,11 +130,15 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="alpha">
<software name="alpha" supported="partial">
<description>Alpha</description>
<year>1986</year>
<publisher>スクウェア (Square)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Corrupt space ship GFX on first gameplay screen, [z80dma] or [FDC]
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198605xx"/>
<info name="alt_title" value="アルファ"/>
<part name="flop1" interface="floppy_5_25">
@ -185,7 +165,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Aoki Ookami to Shiroki Mejika</description>
<year>1986</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198606xx"/>
<info name="alt_title" value="蒼き狼と白き牝鹿"/>
<part name="flop1" interface="floppy_5_25">
@ -195,10 +175,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="arcus">
<software name="arcus" supported="no">
<description>Arcus</description>
<year>1988</year>
<publisher>ウルフチーム (WolfTeam)</publisher>
<notes><![CDATA[
Black screen after WolfTeam logo
]]></notes>
<info name="release" value="198808xx"/>
<info name="alt_title" value="アークス"/>
<part name="flop1" interface="floppy_5_25">
@ -277,7 +261,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="aztec" supported="no">
<software name="aztec">
<description>Aztec</description>
<year>1985</year>
<publisher>コンプティーク (Comptiq)</publisher>
@ -479,10 +463,13 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="dside">
<software name="dside" supported="no">
<description>D-Side - Lagrange L-2 Part II</description>
<year>1986</year>
<publisher>コムパック (Compaq)</publisher>
<notes><![CDATA[
Prompts user for a System Disk, Data Disk for Lagrange L-2?
]]></notes>
<info name="release" value="198610xx"/>
<info name="alt_title" value="ラグランジュL-2 パートⅡ- D-SIDE"/>
<part name="flop1" interface="floppy_5_25">
@ -869,7 +856,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Gandhara</description>
<year>1987</year>
<publisher>エニックス (Enix)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198712xx"/>
<info name="alt_title" value="ガンダーラ"/>
<part name="flop1" interface="floppy_5_25">
@ -940,6 +927,10 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Gradius Kai</description>
<year>19??</year>
<publisher>コナミ (Konami)</publisher>
<notes><![CDATA[
IPL loading resolves to a red and corrupt screen, baddump?
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="gra_kai.d88" size="348848" crc="008bada3" sha1="b19eee31909e555e8f96900bcf49469e1891cd37"/>
@ -1209,11 +1200,16 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="jesus">
<software name="jesus" supported="partial">
<description>Jesus</description>
<year>1987</year>
<publisher>エニックス (Enix)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Expects [KBD] number presses with shift held
Not extensively tested
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198711xx"/>
<info name="alt_title" value="ジーザス"/>
<part name="flop1" interface="floppy_5_25">
@ -1226,18 +1222,25 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<rom name="jesus_2.d88" size="348848" crc="87eab1e7" sha1="b82f423f66188db1498f1c904d6b335ba6ddff15"/>
</dataarea>
</part>
<!-- baddump: non-factory default save -->
<part name="flop3" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="jesus_3.d88" size="348848" crc="ba4a6d72" sha1="f098d2ef3097057f937b7e60bbb983e6290e6ab1"/>
<rom name="jesus_3.d88" size="348848" crc="ba4a6d72" sha1="f098d2ef3097057f937b7e60bbb983e6290e6ab1" status="baddump"/>
</dataarea>
</part>
</software>
<software name="jesusd" cloneof="jesus">
<description>Jesus (Demo)</description>
<software name="jesusd" cloneof="jesus" supported="partial">
<description>Jesus (Demo?)</description>
<year>1987</year>
<publisher>エニックス (Enix)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Expects [KBD] number presses with shift held
Not extensively tested
Doesn't really seem an auto demo?
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="ジーザス =店頭DEMO="/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="367888">
@ -1277,10 +1280,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="kingkngt" supported="no">
<software name="kingkngt" supported="partial">
<description>King's Knight Special</description>
<year>1987</year>
<publisher>スクウェア (Square)</publisher>
<notes><![CDATA[
Not extensively tested
]]></notes>
<info name="usage" value="x1turbo: Needs OPM Sound Setting to be ON" />
<info name="release" value="198702xx"/>
<info name="alt_title" value="キングスナイトスペシャル"/>
<part name="flop1" interface="floppy_5_25">
@ -1295,11 +1302,15 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="powermj" supported="no">
<software name="powermj" supported="partial">
<description>Kon'yamo Asamade Powerful Mahjong</description>
<year>1988</year>
<publisher>デービーソフト (dB-Soft)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Not extensively tested
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198804xx"/>
<info name="alt_title" value="今夜も朝までパワフルまぁじゃん"/>
<part name="flop1" interface="floppy_5_25">
@ -1354,6 +1365,9 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Lagrange L-2 - Escape from the Space Colony</description>
<year>1985</year>
<publisher>コムパック (Compaq)</publisher>
<notes><![CDATA[
Prompts user for a System Disk, Data Disk for Lagrange L-2?
]]></notes>
<info name="release" value="198506xx"/>
<info name="alt_title" value="ラグランジュL-2"/>
<part name="flop1" interface="floppy_5_25">
@ -1500,7 +1514,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Lupin the Third - Cagliostro no Shiro</description>
<year>1986</year>
<publisher>東宝 (Toho)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198612xx"/>
<info name="alt_title" value="ルパン三世 カリオストロの城"/>
<part name="flop1" interface="floppy_5_25">
@ -1703,51 +1717,6 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="manilove" supported="no">
<description>The Man I Love</description>
<year>1987</year>
<publisher>シンキングラビット (Thinking Rabbit)</publisher>
<info name="release" value="198709xx"/>
<info name="alt_title" value="マスターオブモンスターズ"/>
<!--combined image-->
<!--rom name="the man i love.d88" size="2025568" crc="c2df00bb" sha1="a52355adfcd1ef200c18a8e2ab7d776fdc85a9f9"/-->
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="System" />
<dataarea name="flop" size="359520">
<rom name="the man i love (disk 1).d88" size="359520" crc="76f54932" sha1="41e4d82da2b482b496a6d56a7f715322d4591bc0"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="Map" />
<dataarea name="flop" size="359248">
<rom name="the man i love (disk 2).d88" size="359248" crc="79b9c679" sha1="278383e57bfd268474e597f758cf0ea455f9435b"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="Campaign" />
<dataarea name="flop" size="359248">
<rom name="the man i love (disk 3).d88" size="359248" crc="2daa8353" sha1="5eb5b011315f6ea01944afe29ab80ed712e5f9eb"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<feature name="part_id" value="User" />
<dataarea name="flop" size="473776">
<rom name="the man i love (disk 4).d88" size="473776" crc="2232089a" sha1="db3310cdbf3a7f56e96cc81b47c26ae43a6ffb2f"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<feature name="part_id" value="User Campaign" />
<dataarea name="flop" size="473776">
<rom name="the man i love (disk 5).d88" size="473776" crc="211c2f0e" sha1="f5a30bfe9b0f6ba830a86e740ffa0d23493b9453"/>
</dataarea>
</part>
</software>
<software name="manhatrq">
<description>J.B. Harold Series #2 - Manhattan Requiem - Angels Flying in the Dark</description>
<year>1987</year>
@ -1783,10 +1752,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="mightmag" supported="partial">
<software name="mightmag" supported="no">
<description>Might and Magic</description>
<year>1988</year>
<publisher>スタークラフト (Starcraft)</publisher>
<notes><![CDATA[
Broken [kanji]
]]></notes>
<info name="release" value="198801xx"/>
<info name="alt_title" value="マイト&amp;マジック"/>
<part name="flop1" interface="floppy_5_25">
@ -1881,7 +1854,12 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Nobunaga no Yabou - Sengoku Gunyuuden</description>
<year>1989</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Broken [kanji]
Fails [FDC] disk swap after title screen
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198903xx"/>
<info name="alt_title" value="信長の野望・戦国群雄伝"/>
<part name="flop1" interface="floppy_5_25">
@ -2017,7 +1995,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Phantasie - Jerunoa no Shu</description>
<year>1987</year>
<publisher>スタークラフト (Starcraft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198702xx"/>
<info name="alt_title" value="ファンタジー ジェルノアの章"/>
<part name="flop1" interface="floppy_5_25">
@ -2049,37 +2027,49 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Psy-O-Blade</description>
<year>1989</year>
<publisher>T&amp;E Soft</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Broken [kanji] in places
Optionally supports [mouse] device
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198902xx"/>
<info name="alt_title" value="サイオブレード"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="392368">
<rom name="psy-a.d88" size="392368" crc="bd0cd71f" sha1="dd5aef2daf1d79e6409ff7e1fbb14fddacd699ce"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<dataarea name="flop" size="392368">
<rom name="psy-b.d88" size="392368" crc="67322f16" sha1="e64c1bea2c2d894dfa243a1895e94d0e73f3bf07"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<dataarea name="flop" size="392368">
<rom name="psy-c.d88" size="392368" crc="9e088573" sha1="9a8e8014bec3a02433352b01b58863386c1a9e09"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<dataarea name="flop" size="392368">
<rom name="psy-d.d88" size="392368" crc="73d2c58a" sha1="87e4925ffac0c151a8a237ea4f5bb133f863ac8b"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<feature name="part_id" value="Program Disk" />
<dataarea name="flop" size="392368">
<rom name="psy-p.d88" size="392368" crc="3ef3fe30" sha1="e839e3949f7a4cd23705f50ab32d39e4809976c1"/>
</dataarea>
</part>
<part name="flop6" interface="floppy_5_25">
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="Disk A" />
<dataarea name="flop" size="392368">
<rom name="psy-u.d88" size="392368" crc="e923271d" sha1="edffcae5b90c8eb2ed951065a71de527341f6fda"/>
<rom name="psy-a.d88" size="392368" crc="bd0cd71f" sha1="dd5aef2daf1d79e6409ff7e1fbb14fddacd699ce"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="Disk B" />
<dataarea name="flop" size="392368">
<rom name="psy-b.d88" size="392368" crc="67322f16" sha1="e64c1bea2c2d894dfa243a1895e94d0e73f3bf07"/>
</dataarea>
</part>
<part name="flop4" interface="floppy_5_25">
<feature name="part_id" value="Disk C" />
<dataarea name="flop" size="392368">
<rom name="psy-c.d88" size="392368" crc="9e088573" sha1="9a8e8014bec3a02433352b01b58863386c1a9e09"/>
</dataarea>
</part>
<part name="flop5" interface="floppy_5_25">
<feature name="part_id" value="Disk D" />
<dataarea name="flop" size="392368">
<rom name="psy-d.d88" size="392368" crc="73d2c58a" sha1="87e4925ffac0c151a8a237ea4f5bb133f863ac8b"/>
</dataarea>
</part>
<!-- baddump: non-factory save, shouldn't exist -->
<part name="flop6" interface="floppy_5_25">
<feature name="part_id" value="User Disk" />
<dataarea name="flop" size="392368">
<rom name="psy-u.d88" size="392368" crc="e923271d" sha1="edffcae5b90c8eb2ed951065a71de527341f6fda" status="baddump"/>
</dataarea>
</part>
</software>
@ -2102,10 +2092,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="reviver">
<software name="reviver" supported="partial">
<description>Reviver</description>
<year>1987</year>
<publisher>アルシスソフト (Arsys Soft)</publisher>
<notes><![CDATA[
Garbage GFXs on [6845] rightmost column
]]></notes>
<info name="release" value="198701xx"/>
<info name="alt_title" value="リバイバー"/>
<part name="flop1" interface="floppy_5_25">
@ -2125,10 +2119,16 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="revolty2">
<software name="revolty2" supported="partial">
<description>Revolty 2</description>
<year>1989</year>
<publisher>風雅システム (Fuga System)</publisher>
<notes><![CDATA[
Not extensively tested
]]></notes>
<!-- TODO: disk labels, prompts for "Game Disk 2 in Drive 1" -->
<info name="usage" value="Insert flop3 after intro in secondary drive" />
<info name="release" value="198901xx"/>
<info name="alt_title" value="リボルティーII"/>
<part name="flop1" interface="floppy_5_25">
@ -2166,10 +2166,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="robowres">
<software name="robowres" supported="no">
<description>RoboWres 2001</description>
<year>1986</year>
<publisher>マイクロネット (Micronet)</publisher>
<notes><![CDATA[
Fatal errors in [D88] loader: expects offset 0x1c to contain the file size but in that image it's file size/2.
]]></notes>
<info name="release" value="198608xx"/>
<info name="alt_title" value="ロボレス2001"/>
<part name="flop1" interface="floppy_5_25">
@ -2205,11 +2209,14 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="sangoku2">
<software name="sangoku2" supported="no">
<description>Sangokushi II</description>
<year>1990</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Broken [kanji] on gameplay
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="199006xx"/>
<info name="alt_title" value="三国志2"/>
<part name="flop1" interface="floppy_5_25">
@ -2229,11 +2236,15 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="sangoku2a" cloneof="sangoku2">
<software name="sangoku2a" supported="no">
<description>Sangokushi II Turbo</description>
<year>1990</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Broken [kanji] during gameplay (half height)
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="199006xx"/>
<info name="alt_title" value="三国志2"/>
<part name="flop1" interface="floppy_5_25">
@ -2359,7 +2370,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Shin Kugyokuden</description>
<year>1988</year>
<publisher>テクノソフト (Techno Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198812xx"/>
<info name="alt_title" value="新九玉伝"/>
@ -2401,7 +2412,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Silver Ghost</description>
<year>1988</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198812xx"/>
<info name="alt_title" value="シルバーゴースト"/>
<part name="flop1" interface="floppy_5_25">
@ -2425,7 +2436,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19880520"/>
<info name="alt_title" value="ソーサリアン"/>
<part name="flop1" interface="floppy_5_25">
@ -2459,7 +2470,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian (alt?)</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19880520"/>
<info name="alt_title" value="ソーサリアン"/>
<part name="flop1" interface="floppy_5_25">
@ -2493,7 +2504,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Gilgamesh Sorcerian</description>
<year>1990</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19901016"/>
<info name="alt_title" value="ギルガメッシュソーサリアン"/>
<part name="flop1" interface="floppy_5_25">
@ -2512,7 +2523,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian New Scenario Vol.1 - Uchuu kara no Houmonsha</description>
<year>1989</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19890825"/>
<info name="alt_title" value="ソーサリアン NEWシナリオ Vol.1 宇宙からの訪問者"/>
<part name="flop1" interface="floppy_5_25">
@ -2531,7 +2542,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian Tsuika Scenario</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19880729"/>
<info name="alt_title" value="ソーサリアン追加シナリオ"/>
<part name="flop1" interface="floppy_5_25">
@ -2545,7 +2556,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian Tsuika Scenario 2 - Sengoku Sorcerian</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19881021"/>
<info name="alt_title" value="ソーサリアン追加シナリオ2 戦国ソーサリアン"/>
<part name="flop1" interface="floppy_5_25">
@ -2565,7 +2576,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian Tsuika Scenario 3 - Pyramid Sorcerian</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19891223"/>
<info name="alt_title" value="ソーサリアン追加シナリオ3 ピラミッドソーサリアン"/>
<part name="flop1" interface="floppy_5_25">
@ -2584,7 +2595,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Selected Sorcerian 1</description>
<year>1989</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19891208"/>
<info name="alt_title" value="セレクテッドソーサリアン1"/>
<part name="flop1" interface="floppy_5_25">
@ -2603,7 +2614,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Selected Sorcerian 2</description>
<year>1990</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19900210"/>
<info name="alt_title" value="セレクテッドソーサリアン2"/>
<part name="flop1" interface="floppy_5_25">
@ -2622,7 +2633,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Selected Sorcerian 3</description>
<year>1990</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19900511"/>
<info name="alt_title" value="セレクテッドソーサリアン3"/>
<part name="flop1" interface="floppy_5_25">
@ -2641,7 +2652,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Selected Sorcerian 4</description>
<year>1990</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19900613"/>
<info name="alt_title" value="セレクテッドソーサリアン4"/>
<part name="flop1" interface="floppy_5_25">
@ -2660,7 +2671,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Selected Sorcerian 5</description>
<year>1990</year>
<publisher>ブラザー工業 (Brother Kougyou)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19900731"/>
<info name="alt_title" value="セレクテッドソーサリアン5"/>
<part name="flop1" interface="floppy_5_25">
@ -2679,7 +2690,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian Utility Disk Vol.1</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19880729"/>
<info name="alt_title" value="ソーサリアン ユーティリティディスク"/>
<part name="flop1" interface="floppy_5_25">
@ -2693,7 +2704,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Sorcerian Utility Disk Vol.1 (alt)</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="19880729"/>
<info name="alt_title" value="ソーサリアン ユーティリティディスク"/>
<part name="flop1" interface="floppy_5_25">
@ -2780,7 +2791,10 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Star Cruiser</description>
<year>1988</year>
<publisher>アルシスソフト (Arsys Soft)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Hangs on [EMM] upload
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198806xx"/>
<info name="alt_title" value="スタークルーザー"/>
<part name="flop1" interface="floppy_5_25">
@ -2795,24 +2809,31 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="suikoden">
<software name="suikoden" supported="no">
<description>Suikoden - Tenmei no Chikai</description>
<year>1989</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Broken [kanji]
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198904xx"/>
<info name="alt_title" value="水滸伝・天命の誓い"/>
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="Disk A" />
<dataarea name="flop" size="380880">
<rom name="suikoden (turbo)_a.d88" size="380880" crc="9cfee564" sha1="4577565f450c8c842ebf6b55f39bdb65dbe18e7d"/>
</dataarea>
</part>
<part name="flop2" interface="floppy_5_25">
<feature name="part_id" value="Disk B" />
<dataarea name="flop" size="380864">
<rom name="suikoden (turbo)_b.d88" size="380864" crc="1211d3f9" sha1="908418cd67d9950b33c9c2dbe4dd962a84c56021"/>
</dataarea>
</part>
<part name="flop3" interface="floppy_5_25">
<feature name="part_id" value="Disk C" />
<dataarea name="flop" size="380864">
<rom name="suikoden (turbo)_c.d88" size="380864" crc="286becd8" sha1="63559c99ee26ba389e133bfa4bfec53c7b0288ee"/>
</dataarea>
@ -2875,7 +2896,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Super Mario Bros. Special</description>
<year>1986</year>
<publisher>ハドソン (Hudson Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198608xx"/>
<info name="alt_title" value="スーパーマリオブラザーズスペシャル"/>
<part name="flop1" interface="floppy_5_25">
@ -2889,7 +2910,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Super Mario Bros. Special (alt)</description>
<year>1986</year>
<publisher>ハドソン (Hudson Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198608xx"/>
<info name="alt_title" value="スーパーマリオブラザーズスペシャル"/>
<part name="flop1" interface="floppy_5_25">
@ -2926,7 +2947,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Tankentai 2 - Makyou Amazon no Okuchi ni Ougon Densetsu o Mita!</description>
<year>1985</year>
<publisher>データウエスト (Data West)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198508xx"/>
<info name="alt_title" value="探検隊 第2弾 魔境アマゾンの奥地に黄金伝説を見た!"/>
<part name="flop1" interface="floppy_5_25">
@ -3224,7 +3245,11 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Will - The Death Trap II</description>
<year>1985</year>
<publisher>スクウェア (Square)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Hangs on [FDC] check on initial boot PC=1e18 bit 7
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198510xx"/>
<info name="alt_title" value="ウィル -デス・トラップ2-"/>
<part name="flop1" interface="floppy_5_25">
@ -3362,7 +3387,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>World Golf II</description>
<year>1988</year>
<publisher>エニックス (Enix)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198803xx"/>
<info name="alt_title" value="ワールドゴルフ2"/>
<part name="flop1" interface="floppy_5_25">
@ -3460,7 +3485,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Ys II - Ancient Ys Vanished The Final Chapter</description>
<year>1988</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="release" value="198807xx"/>
<info name="alt_title" value="イース2"/>
<part name="flop1" interface="floppy_5_25">
@ -3485,11 +3510,15 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="zeliard">
<software name="zeliard" supported="partial">
<description>Zeliard X1</description>
<year>1988</year>
<publisher>ゲームアーツ (Game Arts)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Desyncs during Game Arts logo [YM] speech synth, proceeds booting.
]]></notes>
<info name="usage" value="x1turbo only" />
<info name="release" value="198806xx"/>
<info name="alt_title" value="ゼリアード"/>
<part name="flop1" interface="floppy_5_25">
@ -3838,10 +3867,16 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="lizard">
<software name="lizard" supported="partial">
<description>Lizard</description>
<year>1984?</year>
<publisher>クリスタルソフト (Xtal Soft)</publisher>
<notes><![CDATA[
Requires katakana domain language, not extensively tested
Save to disk untested
]]></notes>
<info name="usage" value="For a new game press 1, press enter, 1 (yes), select a class, 1 (yes)" />
<info name="alt_title" value="リザード"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="346032">
@ -3958,6 +3993,10 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Punch Ball Mario Bros.</description>
<year>1984?</year>
<publisher>ハドソン (Hudson Soft)</publisher>
<notes><![CDATA[
"File mode error"
]]></notes>
<info name="alt_title" value="パンチボールマリオ"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -4133,6 +4172,10 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>V.I.P. - Visual Instrument Player (alt 3?)</description>
<year>19??</year>
<publisher>Kamiya</publisher>
<notes><![CDATA[
Throws segmentation fault when mounted [D88]
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="1089776">
<rom name="system_z.d88" size="1089776" crc="f3e03a73" sha1="321c6631ba11ca04cd2dfdbd95d2b941b6cc6fd4"/>
@ -4144,6 +4187,10 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Music Tool V.I.P.</description>
<year>19??</year>
<publisher>シャープ (Sharp)</publisher>
<notes><![CDATA[
Throws segmentation fault when mounted [D88]
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="1089776">
<rom name="fm ongen.d88" size="1089776" crc="3676fbc2" sha1="483023bae28c20c9de8cdba005ceeebd063fa5ae"/>
@ -4190,7 +4237,13 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Wanderers from Ys</description>
<year>1989?</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<notes><![CDATA[
Unhappy about [6845] de readback in $1a01 (black screen)
Black screens after intro anyway, [FDC] or [z80dma]
Is this actually a x1turboz only game?
]]></notes>
<info name="usage" value="x1turbo only" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="415840">
<rom name="ys3_prg.d88" size="415840" crc="6698bb78" sha1="cbdd1c7c2df31b7b7e0ca86a647ed499e347d4fc"/>
@ -4464,7 +4517,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Arctic</description>
<year>1988</year>
<publisher>アートディンク (Artdink)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="アークティック"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -4477,7 +4530,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Asteka</description>
<year>1985</year>
<publisher>日本ファルコム (Nihon Falcom)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="アステカ"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="436912">
@ -4515,7 +4568,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Battle Gorilla</description>
<year>1988</year>
<publisher>クリスタルソフト (Xtal Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="バトルゴリラ"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -4559,7 +4612,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Casablanca</description>
<year>1986</year>
<publisher>シンキングラビット (Thinking Rabbit)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="カサブランカに愛を"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="413296">
@ -4579,7 +4632,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<year>1985</year>
<publisher>工画堂スタジオ (Kogado Studio)</publisher>
<info name="alt_title" value="コズミックソルジャー"/>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="376928">
<rom name="cosmics.d88" size="376928" crc="afa30003" sha1="a75324488debe364017d3414cdb2f06b1422b6c0"/>
@ -4592,7 +4645,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<year>1988</year>
<publisher>システムサコム (System Sacom)</publisher>
<info name="alt_title" value="ドーム"/>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="415840">
<rom name="dome-1.d88" size="415840" crc="a73bb6b0" sha1="a060a4995729a15fff4d5c49462fffcce13e5114"/>
@ -4682,7 +4735,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Harajuku After Dark</description>
<year>1988</year>
<publisher>工画堂スタジオ (Kogado Studio)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="原宿アフターダーク"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -4714,7 +4767,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Hayato</description>
<year>1987</year>
<publisher>タケル (Takeru)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="hayatoa.d88" size="348848" crc="33935c73" sha1="17d59dd9b05996e7f7cef84789b136e383a96b72"/>
@ -4745,7 +4798,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Ishin no Arashi</description>
<year>1989</year>
<publisher>光栄 (Koei)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="維新の嵐"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="380864">
@ -4896,7 +4949,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Melon Soda</description>
<year>1987</year>
<publisher>パスカル2 (Pascal2)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="メロンソーダ"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -4915,7 +4968,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Nukenin Densetsu</description>
<year>1987</year>
<publisher>ブレイングレイ (Brain Gray)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="抜忍伝説"/>
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="Opening" />
@ -4969,7 +5022,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Produce</description>
<year>1987</year>
<publisher>デービーソフト (dB-Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="プロデュース"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
@ -5061,7 +5114,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Satsujin wa Tegami ni Notte</description>
<year>1988</year>
<publisher>ツインソフト (Twin Soft)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="殺人は手紙にのって"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="344496">
@ -5127,7 +5180,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Urusei Yatsura</description>
<year>1987</year>
<publisher>マイクロキャビン (Micro Cabin)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<info name="alt_title" value="うる星やつら"/>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="380064">
@ -5174,7 +5227,7 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
<description>Yaksa Demo?</description>
<year>1987</year>
<publisher>ウルフチーム (WolfTeam)</publisher>
<!-- Turbo only -->
<info name="usage" value="x1turbo only" />
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="416416">
<rom name="yaksa_demo.d88" size="416416" crc="d6cf37e4" sha1="4e325055da184724b6f1a6638bfb8dddb2b7601b"/>
@ -5279,19 +5332,6 @@ Plus, some games crash MAME at exit (e.g. some sorcer disks or some arcus disks)
</part>
</software>
<software name="srdemo" supported="no">
<description>SR Demo</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="sr_demo.d88" size="348848" crc="de25efe7" sha1="6ee78c3c231ef33bd7dd259c7edb1b10f2b56fdf"/>
</dataarea>
</part>
</software>
<software name="hubasic1">
<description>HuBASIC CZ-8FB01 (v1.0, Disk vers.)</description>
<year>19??</year>
@ -5586,8 +5626,12 @@ CDOSというMS-DOSと同様なコマンドライン作動させることが出
<software name="fmdata" supported="no">
<description>FM data</description>
<year>19??</year>
<year>1986?</year>
<publisher>&lt;unknown&gt;</publisher>
<notes><![CDATA[
Contains .VMD/.VTD BASIC files
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="348848">
<rom name="zzz-unk-fm_data.d88" size="348848" crc="3c3e7e3a" sha1="9b113bf140e80a105c69422d780822970a32764d"/>
@ -5597,7 +5641,7 @@ CDOSというMS-DOSと同様なコマンドライン作動させることが出
<!-- is this part of a multi-disk game? -->
<software name="unk_fl1">
<software name="unk_fl1" supported="no">
<description>Unknown Disk</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
@ -5609,10 +5653,14 @@ CDOSというMS-DOSと同様なコマンドライン作動させることが出
</software>
<software name="blank">
<software name="blank" supported="no">
<description>Blank Disk?</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<notes><![CDATA[
Not actually "blank", user disk for something?
]]></notes>
<part name="flop1" interface="floppy_5_25">
<dataarea name="flop" size="327680">
<rom name="brank.2d" size="327680" crc="166f974a" sha1="27c77f2d2eb6898e0c388b1f5a6b5c6a76575385"/>

View file

@ -1,76 +1,69 @@
// license:LGPL-2.1+
// copyright-holders:Angelo Salese, Barry Rodewald
// copyright-holders: Angelo Salese, Barry Rodewald
// thanks-to: Dirk Best
/************************************************************************************************
Sharp X1 (c) 1983 Sharp Corporation
Sharp X1 (c) 1983 Sharp Corporation
driver by Angelo Salese & Barry Rodewald,
special thanks to Dirk Best for various wd17xx fixes
TODO:
- 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?);
- Rewrite keyboard input hook-up and decap/dump the keyboard MCU if possible;
- Fix the 0xe80/0xe83 kanji ROM readback;
- x1turbo keyboard inputs are currently broken, use x1turbo40 for now;
- Hook-up remaining .tap image formats;
- Implement APSS tape commands;
- Sort out / redump the BIOS gfx roms, and understand if TurboZ really have same BIOS as
vanilla Turbo like Jp emulators seems to suggest;
- X1Turbo: Implement SIO.
- Implement true 400 lines mode (i.e. Chatnoir no Mahjong v2.1, Casablanca)
- Implement SASI HDD interface;
- Driver Configuration switches:
- OPN for X1
- EMM, and hook-up for X1 too
- RAM size for EMM
- specific x1turboz features?
TODO:
- 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?);
- Rewrite keyboard input hook-up and decap/dump the keyboard MCU if possible;
- Fix the 0xe80/0xe83 kanji ROM readback;
- x1turbo keyboard inputs are currently broken, use x1turbo40 for now;
- Hook-up remaining .tap image formats;
- Implement APSS tape commands;
- Sort out / redump the BIOS gfx roms, and understand if TurboZ really have same BIOS as
vanilla Turbo like Jp emulators seems to suggest;
- X1Turbo: Implement SIO.
- Implement true 400 lines mode (i.e. Chatnoir no Mahjong v2.1, Casablanca)
- Implement SASI HDD interface;
- Driver Configuration switches:
- OPN for X1
- EMM, and hook-up for X1 too
- RAM size for EMM
- specific x1turboz features?
per-game/program specific TODO (to be moved to hash file):
- CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently;
- Chack'n Pop: game is too fast, presumably missing wait states;
- Dragon Buster: it crashed to me once with a obj flag hang;
- The Goonies (x1 only): goes offsync with the PCG beam positions;
- Graphtol: sets up x1turboz paletteram, graphic garbage due of it;
- Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug?
- Hydlide 3: can't get the user disk to work properly, could be a bad dump;
- Lupin the 3rd: don't know neither how to "data load" nor how to "create a character" ... does the game hangs?
- Might & Magic: uses 0xe80-3 kanji ports, should be a good test case for that;
- "newtype": trips a z80dma assert, worked around for now;
- Saziri: doesn't re-initialize the tilemap attribute vram when you start a play, making it to have missing colors if you don't start a play in time;
- Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly;
- Trivia-Q: dunno what to do on the selection screen, missing inputs?
- X1F Demo ("New X1 Demo"): needs partial updates, but they doesn't cope well with current video system;
- Ys 2: crashes after the disclaimer screen;
- Ys 3: missing user disk, to hack it (and play with x1turboz features): bp 81ca,pc += 2
- Ys 3: never uploads a valid 4096 palette, probably related to the fact that we don't have an user disk
per-game/program specific TODO (to be moved to hash file):
- CZ8FB02 / CZ8FB03: doesn't load at all, they are 2hd floppies apparently;
- Chack'n Pop: game is too fast, presumably missing wait states;
- Dragon Buster: it crashed to me once with a obj flag hang;
- The Goonies (x1 only): goes offsync with the PCG beam positions;
- Graphtol: sets up x1turboz paletteram, graphic garbage due of it;
- Gyajiko2: hangs when it's supposed to load the character selection screen, FDC bug?
- Hydlide 3: can't get the user disk to work properly, could be a bad dump;
- Lupin the 3rd: don't know neither how to "data load" nor how to "create a character" ... does the game hangs?
- Might & Magic: uses 0xe80-3 kanji ports, should be a good test case for that;
- "newtype": trips a z80dma assert, worked around for now;
- Saziri: doesn't re-initialize the tilemap attribute vram when you start a play, making it to have missing colors if you don't start a play in time;
- Suikoden: shows a JP message error (DFJustin: "Problem with the disk device !! Please set a floppy disk properly and press the return key. Retrying.")
- Super Billiards (X1 Pack 14): has a slight PCG timing bug, that happens randomly;
- Trivia-Q: dunno what to do on the selection screen, missing inputs?
- Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs;
- Will 2: doesn't load, fdc issue presumably (note: it's a x1turbo game ONLY);
- X1F Demo ("New X1 Demo"): needs partial updates, but they doesn't cope well with current video system;
- Ys 2: crashes after the disclaimer screen;
- Ys 3: missing user disk, to hack it (and play with x1turboz features): bp 81ca,pc += 2
- Ys 3: never uploads a valid 4096 palette, probably related to the fact that we don't have an user disk
Notes:
- An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5
does a 1->0 transition, any write to the i/o space accesses 2 or 3 banks gradients of the bitmap RAM
with a single write (generally used for layer clearances and bitmap-style sprites).
Any i/o read disables this extended bitmap ram.
- I/O port $700 bit 7 of X1 Turbo is a sound (dip-)switch / jumper setting. I don't know yet what is for,
but King's Knight needs it to be active otherwise it refuses to boot.
- ROM format header:
[0x00] ROM identifier, must be 0x01 / SOH
[0x01 to 0x0d] ROM header, i.e. title for the loader
[0x12 - 0x13] initial copy size
[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.
Substitute bin with load and press enter. Finally, do a run once that it loaded correctly.
- Faeries Residence: to load this game, put a basic v2.0 in drive 0, then execute a NEWON command. Load game disks into drive 0 and 1 then
type run"START" (case sensitive)
- POPLEMON: same as above, but you need to type run"POP"
Notes:
- An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5
does a 1->0 transition, any write to the i/o space accesses 2 or 3 banks gradients of the bitmap RAM
with a single write (generally used for layer clearances and bitmap-style sprites).
Any i/o read disables this extended bitmap ram.
- ROM format header (TODO: document, it's a full on expansion slot *inside* the machine, BASIC variant known to exist):
[0x00] ROM identifier, must be 0x01 / SOH
[0x01 to 0x0d] ROM header, i.e. title for the loader
[0x12 - 0x13] initial copy size
[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.
Substitute bin with load and press enter. Finally, do a run once that it loaded correctly.
- Faeries Residence: to load this game, put a basic v2.0 in drive 0, then execute a NEWON command. Load game disks into drive 0 and 1 then
type run"START" (case sensitive)
- POPLEMON: same as above, but you need to type run"POP"
=================================================================================================
@ -433,7 +426,7 @@ uint8_t x1_state::get_game_key(uint8_t port)
return ret;
}
uint8_t x1_state::x1_sub_io_r()
uint8_t x1_state::sub_io_r()
{
uint8_t ret,bus_res;
@ -533,7 +526,7 @@ void x1_state::cmt_command( uint8_t cmd )
logerror("CMT: Command 0xe9-0x%02x received.\n",cmd);
}
TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_cmt_wind_timer)
TIMER_DEVICE_CALLBACK_MEMBER(x1_state::cmt_seek_cb)
{
if(m_cassette->get_image() == nullptr) //avoid a crash if a disk game tries to access this
return;
@ -555,7 +548,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_cmt_wind_timer)
}
}
void x1_state::x1_sub_io_w(uint8_t data)
void x1_state::sub_io_w(uint8_t data)
{
/* sub-routine at $10e sends to these sub-routines when a keyboard input is triggered:
$17a -> floppy
@ -685,7 +678,7 @@ void x1_state::x1_sub_io_w(uint8_t data)
*************************************/
uint8_t x1_state::x1_rom_r()
uint8_t x1_state::rom_r()
{
// logerror("%06x\n",m_rom_index[0]<<16|m_rom_index[1]<<8|m_rom_index[2]<<0);
if (m_cart->exists())
@ -694,17 +687,17 @@ uint8_t x1_state::x1_rom_r()
return 0;
}
void x1_state::x1_rom_w(offs_t offset, uint8_t data)
void x1_state::rom_w(offs_t offset, uint8_t data)
{
m_rom_index[offset] = data;
}
void x1_state::x1_rom_bank_0_w(uint8_t data)
void x1_state::rom_bank_0_w(uint8_t data)
{
m_ram_bank = 0x10;
}
void x1_state::x1_rom_bank_1_w(uint8_t data)
void x1_state::rom_bank_1_w(uint8_t data)
{
m_ram_bank = 0x00;
}
@ -715,7 +708,7 @@ void x1_state::x1_rom_bank_1_w(uint8_t data)
*
*************************************/
uint8_t x1_state::x1_fdc_r(offs_t offset)
uint8_t x1_state::fdc_r(offs_t offset)
{
//uint8_t ret = 0;
@ -756,7 +749,7 @@ uint8_t x1_state::x1_fdc_r(offs_t offset)
return 0x00;
}
void x1_state::x1_fdc_w(offs_t offset, uint8_t data)
void x1_state::fdc_w(offs_t offset, uint8_t data)
{
floppy_image_device *floppy = nullptr;
@ -799,12 +792,7 @@ void x1_state::x1_fdc_w(offs_t offset, uint8_t data)
}
}
void x1_state::fdc_drq_w(int state)
{
m_dma->rdy_w(state ^ 1);
}
TIMER_CALLBACK_MEMBER(x1_state::motor_off_callback)
TIMER_CALLBACK_MEMBER(x1_state::fdc_motor_off_cb)
{
if(!BIT(m_fdc_ctrl, 7))
{
@ -814,6 +802,11 @@ TIMER_CALLBACK_MEMBER(x1_state::motor_off_callback)
}
}
void x1turbo_state::fdc_drq_w(int state)
{
m_dma->rdy_w(state ^ 1);
}
/*************************************
*
* Programmable Character Generator
@ -851,7 +844,7 @@ uint16_t x1_state::get_pcg_addr( uint16_t width, uint8_t y_char_size )
return pcg_offset;
}
uint8_t x1_state::x1_pcg_r(offs_t offset)
uint8_t x1_state::pcg_r(offs_t offset)
{
int addr;
int pcg_offset;
@ -887,7 +880,7 @@ uint8_t x1_state::x1_pcg_r(offs_t offset)
return res;
}
void x1_state::x1_pcg_w(offs_t offset, uint8_t data)
void x1_state::pcg_w(offs_t offset, uint8_t data)
{
int addr,pcg_offset;
@ -958,19 +951,19 @@ void x1_state::set_current_palette()
/* Note: docs claims that reading the palette ports makes the value to change somehow in X1 mode ...
In 4096 color mode, it's used for reading the value back. */
void x1_state::x1_pal_r_w(uint8_t data)
void x1_state::pal_r_w(uint8_t data)
{
m_x_r = data;
set_current_palette();
}
void x1_state::x1_pal_g_w(uint8_t data)
void x1_state::pal_g_w(uint8_t data)
{
m_x_g = data;
set_current_palette();
}
void x1_state::x1_pal_b_w(uint8_t data)
void x1_state::pal_b_w(uint8_t data)
{
m_x_b = data;
set_current_palette();
@ -1012,19 +1005,19 @@ void x1_state::x1turboz_4096_palette_w(offs_t offset, uint8_t data)
switch (offset & 0x0300)
{
case 0x0000:
x1_pal_b_w(data);
pal_b_w(data);
break;
case 0x0100:
x1_pal_r_w(data);
pal_r_w(data);
break;
case 0x0200:
x1_pal_g_w(data);
pal_g_w(data);
break;
}
}
}
uint8_t x1_state::x1_ex_gfxram_r(offs_t offset)
uint8_t x1_state::ex_gfxram_r(offs_t offset)
{
if (!machine().side_effects_disabled())
{
@ -1037,7 +1030,7 @@ uint8_t x1_state::x1_ex_gfxram_r(offs_t offset)
}
}
void x1_state::x1_ex_gfxram_w(offs_t offset, uint8_t data)
void x1_state::ex_gfxram_w(offs_t offset, uint8_t data)
{
uint8_t ex_mask;
@ -1064,7 +1057,7 @@ void x1_state::x1_ex_gfxram_w(offs_t offset, uint8_t data)
d6(40) = 0:8-raster graphics 1:16-raster graphics
d7(80) = 0:don't display 1:display <- underline (when 1, graphics are not displayed)
*/
void x1_state::x1_scrn_w(uint8_t data)
void x1_state::scrn_w(uint8_t data)
{
m_scrn_reg.pcg_mode = BIT(data, 5);
m_bitmapbank->set_entry(BIT(data, 4));
@ -1078,26 +1071,12 @@ void x1_state::x1_scrn_w(uint8_t data)
logerror("SCRN sets true 400 lines mode\n");
}
void x1_state::x1_pri_w(uint8_t data)
void x1_state::pri_w(uint8_t data)
{
m_scrn_reg.pri = data;
// logerror("PRI = %02x\n",data);
}
void x1_state::x1_6845_w(offs_t offset, uint8_t data)
{
if(offset == 0)
{
m_crtc_index = data & 31;
m_crtc->address_w(data);
}
else
{
m_crtc_vreg[m_crtc_index] = data;
m_crtc->register_w(data);
}
}
uint8_t x1_state::x1turboz_blackclip_r()
{
/* TODO: this returns only on x1turboz */
@ -1193,7 +1172,7 @@ uint16_t x1_state::jis_convert(int kanji_addr)
return 0x0000;
}
uint8_t x1_state::x1_kanji_r(offs_t offset)
uint8_t x1_state::kanji_r(offs_t offset)
{
uint8_t res;
@ -1205,7 +1184,7 @@ uint8_t x1_state::x1_kanji_r(offs_t offset)
return res;
}
void x1_state::x1_kanji_w(offs_t offset, uint8_t data)
void x1_state::kanji_w(offs_t offset, uint8_t data)
{
// if(offset < 2)
@ -1235,7 +1214,7 @@ void x1_state::x1_kanji_w(offs_t offset, uint8_t data)
}
}
uint8_t x1_state::x1_emm_r(offs_t offset)
uint8_t x1_state::emm_r(offs_t offset)
{
uint8_t res;
@ -1259,7 +1238,7 @@ uint8_t x1_state::x1_emm_r(offs_t offset)
return res;
}
void x1_state::x1_emm_w(offs_t offset, uint8_t data)
void x1_state::emm_w(offs_t offset, uint8_t data)
{
if(offset & ~3)
{
@ -1302,7 +1281,7 @@ void x1_state::x1turbo_bank_w(uint8_t data)
}
/* TODO: waitstate penalties */
uint8_t x1_state::x1_mem_r(offs_t offset)
uint8_t x1_state::mem_r(offs_t offset)
{
if((offset & 0x8000) == 0 && (m_ram_bank == 0))
{
@ -1312,25 +1291,25 @@ uint8_t x1_state::x1_mem_r(offs_t offset)
return m_work_ram[offset]; //RAM
}
void x1_state::x1_mem_w(offs_t offset, uint8_t data)
void x1_state::mem_w(offs_t offset, uint8_t data)
{
m_work_ram[offset] = data; //RAM
}
uint8_t x1_state::x1turbo_mem_r(offs_t offset)
uint8_t x1turbo_state::x1turbo_mem_r(offs_t offset)
{
if((m_ex_bank & 0x10) == 0)
return m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)];
return x1_mem_r(offset);
return mem_r(offset);
}
void x1_state::x1turbo_mem_w(offs_t offset, uint8_t data)
void x1turbo_state::x1turbo_mem_w(offs_t offset, uint8_t data)
{
if((m_ex_bank & 0x10) == 0)
m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)] = data; //RAM
else
x1_mem_w(offset,data);
mem_w(offset,data);
}
/*************************************
@ -1343,22 +1322,34 @@ void x1_state::x1_io_banks_common(address_map &map)
{
map.unmap_value_high();
map(0x0e00, 0x0e02).w(FUNC(x1_state::x1_rom_w));
map(0x0e03, 0x0e03).r(FUNC(x1_state::x1_rom_r));
map(0x0e00, 0x0e02).w(FUNC(x1_state::rom_w));
map(0x0e03, 0x0e03).r(FUNC(x1_state::rom_r));
map(0x0ff8, 0x0fff).rw(FUNC(x1_state::x1_fdc_r), FUNC(x1_state::x1_fdc_w));
map(0x0ff8, 0x0fff).rw(FUNC(x1_state::fdc_r), FUNC(x1_state::fdc_w));
map(0x1300, 0x1300).mirror(0x00ff).w(FUNC(x1_state::x1_pri_w));
map(0x1400, 0x17ff).rw(FUNC(x1_state::x1_pcg_r), FUNC(x1_state::x1_pcg_w));
map(0x1300, 0x1300).mirror(0x00ff).w(FUNC(x1_state::pri_w));
map(0x1400, 0x17ff).rw(FUNC(x1_state::pcg_r), FUNC(x1_state::pcg_w));
map(0x1800, 0x1801).w(FUNC(x1_state::x1_6845_w));
// TODO: verify if also readable
map(0x1800, 0x1800).lw8(
NAME([this](offs_t offset, u8 data) {
m_crtc_index = data & 31;
m_crtc->address_w(data);
})
);
map(0x1801, 0x1801).lw8(
NAME([this](offs_t offset, u8 data) {
m_crtc_vreg[m_crtc_index] = data;
m_crtc->register_w(data);
})
);
map(0x1900, 0x1900).mirror(0x00ff).rw(FUNC(x1_state::x1_sub_io_r), FUNC(x1_state::x1_sub_io_w));
map(0x1900, 0x1900).mirror(0x00ff).rw(FUNC(x1_state::sub_io_r), FUNC(x1_state::sub_io_w));
map(0x1a00, 0x1a03).mirror(0x00fc).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write));
map(0x1b00, 0x1b00).mirror(0x00ff).rw("ay", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
map(0x1c00, 0x1c00).mirror(0x00ff).w("ay", FUNC(ay8910_device::address_w));
map(0x1d00, 0x1d00).mirror(0x00ff).w(FUNC(x1_state::x1_rom_bank_1_w));
map(0x1e00, 0x1e00).mirror(0x00ff).w(FUNC(x1_state::x1_rom_bank_0_w));
map(0x1d00, 0x1d00).mirror(0x00ff).w(FUNC(x1_state::rom_bank_1_w));
map(0x1e00, 0x1e00).mirror(0x00ff).w(FUNC(x1_state::rom_bank_0_w));
map(0x1fa0, 0x1fa3).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
map(0x1fa8, 0x1fab).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
@ -1367,7 +1358,7 @@ void x1_state::x1_io_banks_common(address_map &map)
map(0x4000, 0xffff).bankrw("bitmapbank");
map(0x10000, 0x1ffff).rw(FUNC(x1_state::x1_ex_gfxram_r), FUNC(x1_state::x1_ex_gfxram_w));
map(0x10000, 0x1ffff).rw(FUNC(x1_state::ex_gfxram_r), FUNC(x1_state::ex_gfxram_w));
}
@ -1377,42 +1368,44 @@ void x1_state::x1_io_banks(address_map &map)
// map(0x0700, 0x0701) TODO: user could install ym2151 on plain X1 too
map(0x1000, 0x1000).mirror(0x00ff).w(FUNC(x1_state::x1_pal_b_w));
map(0x1100, 0x1100).mirror(0x00ff).w(FUNC(x1_state::x1_pal_r_w));
map(0x1200, 0x1200).mirror(0x00ff).w(FUNC(x1_state::x1_pal_g_w));
map(0x1000, 0x1000).mirror(0x00ff).w(FUNC(x1_state::pal_b_w));
map(0x1100, 0x1100).mirror(0x00ff).w(FUNC(x1_state::pal_r_w));
map(0x1200, 0x1200).mirror(0x00ff).w(FUNC(x1_state::pal_g_w));
map(0x3000, 0x37ff).mirror(0x0800).ram().share("tvram"); // Ys checks if it's a x1/x1turbo machine by checking if this area is a mirror
// Ys checks if it's a x1/x1turbo machine by checking if this area is a mirror
map(0x3000, 0x37ff).mirror(0x0800).ram().share("tvram");
}
void x1_state::x1turbo_io_banks(address_map &map)
void x1turbo_state::x1turbo_io_banks(address_map &map)
{
x1_io_banks_common(map);
// a * at the end states devices used on plain X1 too
// TODO: a ** at head states devices used on plain X1 too, as option board
map(0x0700, 0x0701).r(FUNC(x1_state::ym_r)).w("ym", FUNC(ym2151_device::write));
/**/map(0x0700, 0x0701).r(FUNC(x1_state::ym_r)).w("ym", FUNC(ym2151_device::write));
// 0x704 is FM sound detection port on X1 turboZ
map(0x0704, 0x0707).rw("ctc", FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
map(0x0704, 0x0707).rw(m_ctc_ym, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write));
map(0x0800, 0x0800).w(FUNC(x1_state::color_board_w)); // *
map(0x0801, 0x0801).r(FUNC(x1_state::color_board_r)); // *
map(0x0802, 0x0802).w(FUNC(x1_state::color_board_2_w)); // *
map(0x0803, 0x0803).r(FUNC(x1_state::color_board_2_r)); // *
map(0x0a00, 0x0a07).rw(FUNC(x1_state::stereo_board_r), FUNC(x1_state::stereo_board_w)); // *
/**/map(0x0800, 0x0800).w(FUNC(x1_state::color_board_w));
/**/map(0x0801, 0x0801).r(FUNC(x1_state::color_board_r));
/**/map(0x0802, 0x0802).w(FUNC(x1_state::color_board_2_w));
/**/map(0x0803, 0x0803).r(FUNC(x1_state::color_board_2_r));
/**/map(0x0a00, 0x0a07).rw(FUNC(x1_state::stereo_board_r), FUNC(x1_state::stereo_board_w));
map(0x0b00, 0x0b00).rw(FUNC(x1_state::x1turbo_bank_r), FUNC(x1_state::x1turbo_bank_w));
map(0x0c00, 0x0cff).rw(FUNC(x1_state::rs232_r), FUNC(x1_state::rs232_w)); // *
map(0x0d00, 0x0dff).rw(FUNC(x1_state::x1_emm_r), FUNC(x1_state::x1_emm_w)); // *
map(0x0e80, 0x0e81).r(FUNC(x1_state::x1_kanji_r));
map(0x0e80, 0x0e83).w(FUNC(x1_state::x1_kanji_w));
map(0x0fd0, 0x0fd3).rw(FUNC(x1_state::sasi_r), FUNC(x1_state::sasi_w)); // *
map(0x0fe8, 0x0fef).rw(FUNC(x1_state::fdd8_r), FUNC(x1_state::fdd8_w)); // *
/**/map(0x0c00, 0x0cff).rw(FUNC(x1_state::rs232_r), FUNC(x1_state::rs232_w));
/**/map(0x0d00, 0x0dff).rw(FUNC(x1_state::emm_r), FUNC(x1_state::emm_w));
map(0x0e80, 0x0e81).r(FUNC(x1_state::kanji_r));
map(0x0e80, 0x0e83).w(FUNC(x1_state::kanji_w));
/**/map(0x0fd0, 0x0fd3).rw(FUNC(x1_state::sasi_r), FUNC(x1_state::sasi_w));
/**/map(0x0fe8, 0x0fef).rw(FUNC(x1_state::fdd8_r), FUNC(x1_state::fdd8_w));
map(0x1000, 0x12ff).w(FUNC(x1_state::x1turboz_4096_palette_w));
map(0x1f80, 0x1f80).mirror(0x000f).rw(m_dma, FUNC(z80dma_device::read), FUNC(z80dma_device::write));
map(0x1f90, 0x1f93).rw("sio", FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w));
map(0x1f98, 0x1f9f).rw(FUNC(x1_state::ext_sio_ctc_r), FUNC(x1_state::ext_sio_ctc_w));
// FIXME: identify disks with Turbo Z capabilities, potentially move to subclass
map(0x1fb0, 0x1fb0).rw(FUNC(x1_state::x1turbo_pal_r), FUNC(x1_state::x1turbo_pal_w)); // Z only!
map(0x1fb8, 0x1fbf).rw(FUNC(x1_state::x1turbo_txpal_r), FUNC(x1_state::x1turbo_txpal_w)); // Z only!
map(0x1fc0, 0x1fc0).rw(FUNC(x1_state::x1turbo_txdisp_r), FUNC(x1_state::x1turbo_txdisp_w)); // Z only!
@ -1422,7 +1415,7 @@ void x1_state::x1turbo_io_banks(address_map &map)
map(0x1fc4, 0x1fc4).w(FUNC(x1_state::z_extra_scroll_w)); // Z only!
map(0x1fc5, 0x1fc5).rw(FUNC(x1_state::x1turbo_gfxpal_r), FUNC(x1_state::x1turbo_gfxpal_w)); // Z only!
// map(0x1fd0, 0x1fdf).r(FUNC(x1_state::x1_scrn_r)); // Z only!
map(0x1fd0, 0x1fd0).mirror(0x000f).w(FUNC(x1_state::x1_scrn_w));
map(0x1fd0, 0x1fd0).mirror(0x000f).w(FUNC(x1_state::scrn_w));
map(0x1fe0, 0x1fe0).rw(FUNC(x1_state::x1turboz_blackclip_r), FUNC(x1_state::x1turbo_blackclip_w));
map(0x1ff0, 0x1ff0).portr("X1TURBO_DSW");
@ -1433,12 +1426,12 @@ void x1_state::x1turbo_io_banks(address_map &map)
void x1_state::x1_mem(address_map &map)
{
map(0x0000, 0xffff).rw(FUNC(x1_state::x1_mem_r), FUNC(x1_state::x1_mem_w));
map(0x0000, 0xffff).rw(FUNC(x1_state::mem_r), FUNC(x1_state::mem_w));
}
void x1_state::x1turbo_mem(address_map &map)
void x1turbo_state::x1turbo_mem(address_map &map)
{
map(0x0000, 0xffff).rw(FUNC(x1_state::x1turbo_mem_r), FUNC(x1_state::x1turbo_mem_w));
map(0x0000, 0xffff).rw(FUNC(x1turbo_state::x1turbo_mem_r), FUNC(x1turbo_state::x1turbo_mem_w));
}
void x1_state::x1_io(address_map &map)
@ -1458,21 +1451,22 @@ uint8_t x1_state::x1_porta_r()
return 0xff;
}
/* this port is system related */
/*
x--- ---- V-DISP
-x-- ---- "sub cpu ibf"
--x- ---- "sub cpu obf"
---x ---- IPL RESET (0=ROM, 1=RAM)
---- x--- "busy" <- allow printer data output
---- -x-- CV-SYNC "v sync"
---- --x- READ DATA "cmt read"
---- ---x -BREAK "cmt test" (active low) <- actually this is "Sub CPU detected BREAK"
*/
uint8_t x1_state::x1_portb_r()
{
//logerror("PPI Port B read\n");
/*
x--- ---- "v disp"
-x-- ---- "sub cpu ibf"
--x- ---- "sub cpu obf"
---x ---- ROM/RAM flag (0=ROM, 1=RAM)
---- x--- "busy" <- allow printer data output
---- -x-- "v sync"
---- --x- "cmt read"
---- ---x "cmt test" (active low) <- actually this is "Sub CPU detected BREAK"
*/
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
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;
@ -1541,25 +1535,25 @@ void x1_state::x1_portc_w(uint8_t data)
m_cassette->output(BIT(data, 0) ? +1.0 : -1.0);
}
uint8_t x1_state::memory_read_byte(offs_t offset)
uint8_t x1turbo_state::memory_read_byte(offs_t offset)
{
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
return prog_space.read_byte(offset);
}
void x1_state::memory_write_byte(offs_t offset, uint8_t data)
void x1turbo_state::memory_write_byte(offs_t offset, uint8_t data)
{
address_space& prog_space = m_maincpu->space(AS_PROGRAM);
return prog_space.write_byte(offset, data);
}
uint8_t x1_state::io_read_byte(offs_t offset)
uint8_t x1turbo_state::io_read_byte(offs_t offset)
{
address_space& prog_space = m_maincpu->space(AS_IO);
return prog_space.read_byte(offset);
}
void x1_state::io_write_byte(offs_t offset, uint8_t data)
void x1turbo_state::io_write_byte(offs_t offset, uint8_t data)
{
address_space& prog_space = m_maincpu->space(AS_IO);
return prog_space.write_byte(offset, data);
@ -1568,6 +1562,8 @@ void x1_state::io_write_byte(offs_t offset, uint8_t data)
uint8_t x1_state::ym_r(offs_t offset)
{
uint8_t result = m_ym->read(offset);
// TODO: kingkngt x1turbo expects this to be high when in OPM mode
// is it just covering some tight OPM busy flag?
if (!BIT(offset, 0))
result = (result & 0x7f) | (m_sound_sw->read() & 0x80);
return result;
@ -1704,10 +1700,7 @@ INPUT_PORTS_START( x1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CHANGED_MEMBER(DEVICE_SELF, x1_state, nmi_reset,0) PORT_NAME("NMI reset")
PORT_START("SOUND_SW")
// TODO: this is X1Turbo specific and likely OPN busy flag instead
PORT_DIPNAME( 0x80, 0x80, "OPM Sound Setting?" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IOSYS")
// TODO: route front-panel DIP-SW here
@ -1756,6 +1749,7 @@ INPUT_PORTS_START( x1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
// TODO: move me to x1_keyboard_device
PORT_START("key1") //0x00-0x1f
PORT_BIT(0x00000001,IP_ACTIVE_HIGH,IPT_UNUSED) //0x00 null
PORT_BIT(0x00000002,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("0-2") PORT_CHAR(1)
@ -1892,7 +1886,12 @@ INPUT_PORTS_END
INPUT_PORTS_START( x1turbo )
PORT_INCLUDE( x1 )
// X1TURBO TODO: add other keys (ROLL UP, ROLL DOWN, HELP, COPY, XFER)
// TODO: add other keys (ROLL UP, ROLL DOWN, HELP, COPY, XFER)
PORT_MODIFY("SOUND_SW")
PORT_DIPNAME( 0x80, 0x80, "OPM Sound Setting?" )
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("X1TURBO_DSW")
PORT_DIPNAME( 0x01, 0x01, "Interlace mode" )
@ -1975,9 +1974,11 @@ static const z80_daisy_config x1_daisy[] =
{ nullptr }
};
// TODO: verify order, suppose ctc_ym really goes as generic ext pin instead.
static const z80_daisy_config x1turbo_daisy[] =
{
{ "x1kb" },
{ "ctc_ym" },
{ "ctc" },
{ "dma" },
{ "sio" },
@ -2011,7 +2012,7 @@ IRQ_CALLBACK_MEMBER(x1_state::x1_irq_callback)
}
#endif
TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback)
TIMER_DEVICE_CALLBACK_MEMBER(x1_state::sub_keyboard_cb)
{
uint32_t key1 = ioport("key1")->read();
uint32_t key2 = ioport("key2")->read();
@ -2027,7 +2028,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback)
if((key1 != m_old_key1) || (key2 != m_old_key2) || (key3 != m_old_key3) || (key4 != m_old_key4) || (f_key != m_old_fkey))
{
// generate keyboard IRQ
x1_sub_io_w(0xe6);
sub_io_w(0xe6);
m_irq_vector = m_key_irq_vector;
m_key_irq_flag = 1;
m_maincpu->set_input_line(0,ASSERT_LINE);
@ -2040,7 +2041,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback)
}
}
TIMER_CALLBACK_MEMBER(x1_state::x1_rtc_increment)
TIMER_CALLBACK_MEMBER(x1_state::rtc_tick_cb)
{
static const uint8_t dpm[12] = { 0x31, 0x28, 0x31, 0x30, 0x31, 0x30, 0x31, 0x31, 0x30, 0x31, 0x30, 0x31 };
@ -2152,10 +2153,10 @@ void x1_state::machine_start()
m_rtc.min = ((systime.local_time.minute / 10)<<4) | ((systime.local_time.minute % 10) & 0xf);
m_rtc.sec = ((systime.local_time.second / 10)<<4) | ((systime.local_time.second % 10) & 0xf);
m_rtc_timer = timer_alloc(FUNC(x1_state::x1_rtc_increment), this);
m_rtc_timer = timer_alloc(FUNC(x1_state::rtc_tick_cb), this);
}
m_motor_timer = timer_alloc(FUNC(x1_state::motor_off_callback), this);
m_motor_timer = timer_alloc(FUNC(x1_state::fdc_motor_off_cb), this);
m_work_ram = make_unique_clear<uint8_t[]>(0x10000*0x10);
m_emm_ram = make_unique_clear<uint8_t[]>(0x1000000);
m_pcg_ram = make_unique_clear<uint8_t[]>(0x1800);
@ -2175,7 +2176,9 @@ void x1_state::floppy_formats(format_registration &fr)
static void x1_floppies(device_slot_interface &device)
{
device.option_add("dd", FLOPPY_525_DD);
// 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);
}
void x1_state::x1(machine_config &config)
@ -2191,6 +2194,7 @@ void x1_state::x1(machine_config &config)
z80ctc_device& ctc(Z80CTC(config, "ctc", MAIN_CLOCK/4));
ctc.intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
ctc.zc_callback<0>().set("ctc", FUNC(z80ctc_device::trg3));
// TODO: clocks for SIO
ctc.zc_callback<1>().set("ctc", FUNC(z80ctc_device::trg1));
ctc.zc_callback<2>().set("ctc", FUNC(z80ctc_device::trg2));
@ -2225,10 +2229,10 @@ void x1_state::x1(machine_config &config)
MB8877(config, m_fdc, 16_MHz_XTAL / 16); // clocked by SED9421C0B
FLOPPY_CONNECTOR(config, "fdc:0", x1_floppies, "dd", x1_state::floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:1", x1_floppies, "dd", x1_state::floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:2", x1_floppies, "dd", x1_state::floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:3", x1_floppies, "dd", x1_state::floppy_formats);
FLOPPY_CONNECTOR(config, "fdc:0", x1_floppies, "525dd", x1_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:1", x1_floppies, "525dd", x1_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:2", x1_floppies, "525dd", x1_state::floppy_formats).enable_sound(true);
FLOPPY_CONNECTOR(config, "fdc:3", x1_floppies, "525dd", x1_state::floppy_formats).enable_sound(true);
SOFTWARE_LIST(config, "flop_list").set_original("x1_flop");
@ -2237,7 +2241,7 @@ void x1_state::x1(machine_config &config)
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
/* TODO:is the AY mono or stereo? Also volume balance isn't right. */
// TODO: fix thru schematics (formation of resistors tied to ABC outputs)
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");
@ -2254,20 +2258,20 @@ void x1_state::x1(machine_config &config)
SOFTWARE_LIST(config, "cass_list").set_original("x1_cass");
TIMER(config, "keyboard_timer").configure_periodic(FUNC(x1_state::x1_keyboard_callback), attotime::from_hz(250));
TIMER(config, "cmt_wind_timer").configure_periodic(FUNC(x1_state::x1_cmt_wind_timer), attotime::from_hz(16));
TIMER(config, "keyboard_timer").configure_periodic(FUNC(x1_state::sub_keyboard_cb), attotime::from_hz(250));
TIMER(config, "cmt_wind_timer").configure_periodic(FUNC(x1_state::cmt_seek_cb), attotime::from_hz(16));
}
void x1_state::x1turbo(machine_config &config)
void x1turbo_state::x1turbo(machine_config &config)
{
x1(config);
m_maincpu->set_addrmap(AS_PROGRAM, &x1_state::x1turbo_mem);
m_maincpu->set_addrmap(AS_PROGRAM, &x1turbo_state::x1turbo_mem);
m_maincpu->set_daisy_config(x1turbo_daisy);
MCFG_MACHINE_RESET_OVERRIDE(x1_state,x1turbo)
m_iobank->set_map(&x1_state::x1turbo_io_banks);
m_iobank->set_map(&x1turbo_state::x1turbo_io_banks);
z80sio_device& sio(Z80SIO(config, "sio", MAIN_CLOCK/4));
sio.out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
@ -2275,14 +2279,20 @@ void x1_state::x1turbo(machine_config &config)
Z80DMA(config, m_dma, MAIN_CLOCK/4);
m_dma->out_busreq_callback().set_inputline(m_maincpu, INPUT_LINE_HALT);
m_dma->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_dma->in_mreq_callback().set(FUNC(x1_state::memory_read_byte));
m_dma->out_mreq_callback().set(FUNC(x1_state::memory_write_byte));
m_dma->in_iorq_callback().set(FUNC(x1_state::io_read_byte));
m_dma->out_iorq_callback().set(FUNC(x1_state::io_write_byte));
m_dma->in_mreq_callback().set(FUNC(x1turbo_state::memory_read_byte));
m_dma->out_mreq_callback().set(FUNC(x1turbo_state::memory_write_byte));
m_dma->in_iorq_callback().set(FUNC(x1turbo_state::io_read_byte));
m_dma->out_iorq_callback().set(FUNC(x1turbo_state::io_write_byte));
m_fdc->drq_wr_callback().set(FUNC(x1_state::fdc_drq_w));
m_fdc->drq_wr_callback().set(FUNC(x1turbo_state::fdc_drq_w));
YM2151(config, m_ym, MAIN_CLOCK/8); //option board
// TODO: as sub-board option, CZ-8BS1
Z80CTC(config, m_ctc_ym, MAIN_CLOCK/4);
// FIXME: check intr
m_ctc_ym->intr_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0);
m_ctc_ym->zc_callback<0>().set(m_ctc_ym, FUNC(z80ctc_device::trg3));
YM2151(config, m_ym, MAIN_CLOCK/8);
m_ym->add_route(0, "lspeaker", 0.50);
m_ym->add_route(1, "rspeaker", 0.50);
}
@ -2382,8 +2392,8 @@ 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 )
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, x1_state, init_x1_kanji, "Sharp", "X1 Turbo (CZ-850C)", MACHINE_NOT_WORKING ) //model 10
COMP( 1985, x1turbo40, x1, 0, x1turbo, x1turbo, x1_state, init_x1_kanji, "Sharp", "X1 Turbo (CZ-862C)", 0 ) //model 40
COMP( 1984, x1turbo, x1, 0, x1turbo, x1turbo, x1turbo_state, init_x1_kanji, "Sharp", "X1 Turbo (CZ-850C)", MACHINE_NOT_WORKING ) //model 10
COMP( 1985, x1turbo40, x1, 0, x1turbo, x1turbo, x1turbo_state, init_x1_kanji, "Sharp", "X1 Turbo (CZ-862C)", 0 ) //model 40
//COMP( 1986, x1turboz, x1, 0, x1turbo, x1turbo, x1_state, init_x1_kanji, "Sharp", "X1 TurboZ", MACHINE_NOT_WORKING )

View file

@ -54,32 +54,33 @@ private:
class x1_state : public driver_device
{
public:
x1_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "x1_cpu"),
m_cassette(*this, "cassette"),
m_cart(*this, "cartslot"),
m_fdc(*this, "fdc"),
m_floppy(*this, "fdc:%u", 0),
m_crtc(*this, "crtc"),
m_screen(*this, "screen"),
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_dma(*this, "dma"),
m_iobank(*this, "iobank"),
m_ym(*this, "ym"),
m_sound_sw(*this, "SOUND_SW"),
m_tvram(*this, "tvram"),
m_avram(*this, "avram"),
m_kvram(*this, "kvram"),
m_bitmapbank(*this, "bitmapbank"),
m_ipl_rom(*this, "ipl"),
m_cg_rom(*this, "cgrom"),
m_kanji_rom(*this, "kanji")
x1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "x1_cpu")
, m_cassette(*this, "cassette")
, m_cart(*this, "cartslot")
, m_fdc(*this, "fdc")
, m_floppy(*this, "fdc:%u", 0)
, m_crtc(*this, "crtc")
, m_screen(*this, "screen")
, m_gfxdecode(*this, "gfxdecode")
, m_palette(*this, "palette")
, m_iobank(*this, "iobank")
, m_ym(*this, "ym")
, m_sound_sw(*this, "SOUND_SW")
, m_tvram(*this, "tvram")
, m_avram(*this, "avram")
, m_kvram(*this, "kvram")
, m_bitmapbank(*this, "bitmapbank")
, m_ipl_rom(*this, "ipl")
, m_cg_rom(*this, "cgrom")
, m_kanji_rom(*this, "kanji")
{ }
static void floppy_formats(format_registration &fr);
void x1(machine_config &config);
required_device<z80_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_device<generic_slot_device> m_cart;
@ -88,30 +89,29 @@ public:
required_device<mc6845_device> m_crtc;
required_device<screen_device> m_screen;
uint8_t x1_mem_r(offs_t offset);
void x1_mem_w(offs_t offset, uint8_t data);
uint8_t x1_sub_io_r();
void x1_sub_io_w(uint8_t data);
uint8_t x1_rom_r();
void x1_rom_w(offs_t offset, uint8_t data);
void x1_rom_bank_0_w(uint8_t data);
void x1_rom_bank_1_w(uint8_t data);
uint8_t x1_fdc_r(offs_t offset);
void x1_fdc_w(offs_t offset, uint8_t data);
uint8_t x1_pcg_r(offs_t offset);
void x1_pcg_w(offs_t offset, uint8_t data);
void x1_pal_r_w(uint8_t data);
void x1_pal_g_w(uint8_t data);
void x1_pal_b_w(uint8_t data);
uint8_t x1_ex_gfxram_r(offs_t offset);
void x1_ex_gfxram_w(offs_t offset, uint8_t data);
void x1_scrn_w(uint8_t data);
void x1_pri_w(uint8_t data);
void x1_6845_w(offs_t offset, uint8_t data);
uint8_t x1_kanji_r(offs_t offset);
void x1_kanji_w(offs_t offset, uint8_t data);
uint8_t x1_emm_r(offs_t offset);
void x1_emm_w(offs_t offset, uint8_t data);
uint8_t mem_r(offs_t offset);
void mem_w(offs_t offset, uint8_t data);
uint8_t sub_io_r();
void sub_io_w(uint8_t data);
uint8_t rom_r();
void rom_w(offs_t offset, uint8_t data);
void rom_bank_0_w(uint8_t data);
void rom_bank_1_w(uint8_t data);
uint8_t fdc_r(offs_t offset);
void fdc_w(offs_t offset, uint8_t data);
uint8_t pcg_r(offs_t offset);
void pcg_w(offs_t offset, uint8_t data);
void pal_r_w(uint8_t data);
void pal_g_w(uint8_t data);
void pal_b_w(uint8_t data);
uint8_t ex_gfxram_r(offs_t offset);
void ex_gfxram_w(offs_t offset, uint8_t data);
void scrn_w(uint8_t data);
void pri_w(uint8_t data);
uint8_t kanji_r(offs_t offset);
void kanji_w(offs_t offset, uint8_t data);
uint8_t emm_r(offs_t offset);
void emm_w(offs_t offset, uint8_t data);
uint8_t x1turbo_pal_r();
uint8_t x1turbo_txpal_r(offs_t offset);
uint8_t x1turbo_txdisp_r();
@ -121,8 +121,6 @@ public:
void x1turbo_txdisp_w(uint8_t data);
void x1turbo_gfxpal_w(uint8_t data);
void x1turbo_blackclip_w(uint8_t data);
uint8_t x1turbo_mem_r(offs_t offset);
void x1turbo_mem_w(offs_t offset, uint8_t data);
void x1turboz_4096_palette_w(offs_t offset, uint8_t data);
uint8_t x1turboz_blackclip_r();
uint8_t x1turbo_bank_r();
@ -141,22 +139,14 @@ public:
uint32_t screen_update_x1(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
DECLARE_INPUT_CHANGED_MEMBER(ipl_reset);
DECLARE_INPUT_CHANGED_MEMBER(nmi_reset);
TIMER_CALLBACK_MEMBER(x1_rtc_increment);
TIMER_CALLBACK_MEMBER(motor_off_callback);
TIMER_DEVICE_CALLBACK_MEMBER(x1_cmt_wind_timer);
TIMER_DEVICE_CALLBACK_MEMBER(x1_keyboard_callback);
void fdc_drq_w(int state);
TIMER_CALLBACK_MEMBER(rtc_tick_cb);
TIMER_CALLBACK_MEMBER(fdc_motor_off_cb);
TIMER_DEVICE_CALLBACK_MEMBER(cmt_seek_cb);
TIMER_DEVICE_CALLBACK_MEMBER(sub_keyboard_cb);
void hdl_w(int state);
uint8_t memory_read_byte(offs_t offset);
void memory_write_byte(offs_t offset, uint8_t data);
uint8_t io_read_byte(offs_t offset);
void io_write_byte(offs_t offset, uint8_t data);
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
optional_device<z80dma_device> m_dma;
void x1turbo(machine_config &config);
void x1(machine_config &config);
uint8_t ym_r(offs_t offset);
uint8_t color_board_r(address_space &space);
@ -185,9 +175,6 @@ public:
void x1_io_banks(address_map &map);
void x1_io_banks_common(address_map &map);
void x1_mem(address_map &map);
void x1turbo_io_banks(address_map &map);
void x1turbo_mem(address_map &map);
protected:
struct scrn_reg_t
{
@ -213,7 +200,7 @@ protected:
uint8_t sec = 0, min = 0, hour = 0, day = 0, wday = 0, month = 0, year = 0;
};
void x1_draw_pixel(bitmap_rgb32 &bitmap,int y,int x,uint16_t pen,uint8_t width,uint8_t height);
void draw_pixel(bitmap_rgb32 &bitmap,int y,int x,uint16_t pen,uint8_t width,uint8_t height);
void draw_fgtilemap(bitmap_rgb32 &bitmap,const rectangle &cliprect);
void draw_gfxbitmap(bitmap_rgb32 &bitmap,const rectangle &cliprect, int plane,int pri);
uint8_t check_prev_height(int x,int y,int x_size);
@ -340,6 +327,35 @@ protected:
};
class x1turbo_state : public x1_state
{
public:
x1turbo_state(const machine_config &mconfig, device_type type, const char *tag)
: x1_state(mconfig, type, tag)
, m_dma(*this, "dma")
, m_ctc_ym(*this, "ctc_ym")
{ }
void x1turbo(machine_config &config);
protected:
void x1turbo_io_banks(address_map &map);
void x1turbo_mem(address_map &map);
private:
required_device<z80dma_device> m_dma;
required_device<z80ctc_device> m_ctc_ym;
uint8_t x1turbo_mem_r(offs_t offset);
void x1turbo_mem_w(offs_t offset, uint8_t data);
uint8_t memory_read_byte(offs_t offset);
void memory_write_byte(offs_t offset, uint8_t data);
uint8_t io_read_byte(offs_t offset);
void io_write_byte(offs_t offset, uint8_t data);
void fdc_drq_w(int state);
};
/*----------- defined in machine/x1.c -----------*/
DECLARE_DEVICE_TYPE(X1_KEYBOARD, x1_keyboard_device)

View file

@ -1,18 +1,20 @@
// license:LGPL-2.1+
// copyright-holders:Angelo Salese, Barry Rodewald
/******************************************************************************
/***************************************************************************************************
*
* Sharp X1 Video functions
*
* TODO:
* - Rewrite drawing functions by taking scanline renderer into account
* * cfr. x1fdemo raster effect on first screen.
* - Use mc6845 internal functions instead of breaking encapsulation
* * annoying due of the double height/width stuff.
* - Improve border drawing, pinpoint what are the visible limits for a mc6845;
* - Use mc6845 internal functions or instead of breaking encapsulation
* \- annoying due of the double height/width stuff.
* \- may consider doing an own version of 6845 instead, aiding other heavyweight clients in
* the process cfr. https://github.com/mamedev/mame/pull/12010#discussion_r1479780670
* \- improve border drawing, pinpoint what are the visible limits for a mc6845;
* - Move X1Turbo features into specific overrides;
*
*****************************************************************************/
**************************************************************************************************/
#include "emu.h"
#include "x1.h"
@ -34,7 +36,7 @@ void x1_state::video_start()
// helper for a single tile pixel taking height and width into account
// TODO: height is never used
void x1_state::x1_draw_pixel(bitmap_rgb32 &bitmap, int y, int x, uint16_t pen, uint8_t width, uint8_t height)
void x1_state::draw_pixel(bitmap_rgb32 &bitmap, int y, int x, uint16_t pen, uint8_t width, uint8_t height)
{
if(!m_screen->visible_area().contains(x, y))
return;
@ -105,25 +107,24 @@ uint8_t x1_state::check_line_valid_height(int y, int x_size, int height)
}
// tilemap drawing
/*
attribute table:
x--- ---- double width
-x-- ---- double height
--x- ---- PCG select
---x ---- color blinking (if 1 reverses color patterns rather than true blinking)
---- x--- reverse color
---- -xxx color pen
X1 Turbo can also access an additional Kanji VRAM area
x--- ---- select Kanji ROM
-x-- ---- Kanji side (0=left, 1=right)
--x- ---- Underline
---x ---- Kanji ROM select (0=level 1, 1=level 2)
---- xxxx Kanji upper 4 bits
*/
void x1_state::draw_fgtilemap(bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
/*
attribute table:
x--- ---- double width
-x-- ---- double height
--x- ---- PCG select
---x ---- color blinking (if 1 reverses color patterns rather than true blinking)
---- x--- reverse color
---- -xxx color pen
X1 Turbo can also access an additional Kanji VRAM area
x--- ---- select Kanji ROM
-x-- ---- Kanji side (0=left, 1=right)
--x- ---- Underline
---x ---- Kanji ROM select (0=level 1, 1=level 2)
---- xxxx Kanji upper 4 bits
*/
int y, x, res_x, res_y;
uint32_t tile_offset;
uint8_t x_size, y_size;
@ -270,7 +271,7 @@ void x1_state::draw_fgtilemap(bitmap_rgb32 &bitmap, const rectangle &cliprect)
if(res_y < cliprect.min_y || res_y > cliprect.max_y)
continue;
x1_draw_pixel(bitmap, res_y, res_x, pcg_pen, width, 0);
draw_pixel(bitmap, res_y, res_x, pcg_pen, width, 0);
}
}
}
@ -363,7 +364,7 @@ void x1_state::draw_gfxbitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect, i
continue;
// TODO: call a fn subset instead of looping for a width/height that is never hit
x1_draw_pixel(bitmap, y*(mc6845_tile_height)+yi, x*8+xi, color, 0, 0);
draw_pixel(bitmap, y*(mc6845_tile_height)+yi, x*8+xi, color, 0, 0);
}
}
}

View file

@ -66,7 +66,7 @@ uint32_t x1twin_state::screen_update_x1pce(screen_device &screen, bitmap_rgb32 &
void x1twin_state::x1_mem(address_map &map)
{
map.unmap_value_high();
map(0x0000, 0xffff).rw(FUNC(x1twin_state::x1_mem_r), FUNC(x1twin_state::x1_mem_w));
map(0x0000, 0xffff).rw(FUNC(x1twin_state::mem_r), FUNC(x1twin_state::mem_w));
}
void x1twin_state::x1_io(address_map &map)
@ -518,8 +518,8 @@ void x1twin_state::x1twin(machine_config &config)
SOFTWARE_LIST(config, "cass_list").set_original("x1_cass");
TIMER(config, "keyboard_timer").configure_periodic(FUNC(x1twin_state::x1_keyboard_callback), attotime::from_hz(250));
TIMER(config, "cmt_wind_timer").configure_periodic(FUNC(x1twin_state::x1_cmt_wind_timer), attotime::from_hz(16));
TIMER(config, "keyboard_timer").configure_periodic(FUNC(x1twin_state::sub_keyboard_cb), attotime::from_hz(250));
TIMER(config, "cmt_wind_timer").configure_periodic(FUNC(x1twin_state::cmt_seek_cb), attotime::from_hz(16));
}
ROM_START( x1twin )