mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
all-in-one
Some checks are pending
CI (Windows) / build-windows (gcc, gcc, g++, mame, mame) (push) Waiting to run
Some checks are pending
CI (Windows) / build-windows (gcc, gcc, g++, mame, mame) (push) Waiting to run
This commit is contained in:
parent
8fae6f00e8
commit
b2d13274e3
44
.github/workflows/bgfxshaders.yml
vendored
44
.github/workflows/bgfxshaders.yml
vendored
@ -1,44 +0,0 @@
|
||||
name: Rebuild BGFX shaders
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'src/osd/modules/render/bgfx/shaders/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'src/osd/modules/render/bgfx/shaders/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rebuild:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
install: git make mingw-w64-x86_64-gcc mingw-w64-x86_64-python mingw-w64-x86_64-libc++
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Prevent make from rebuilding GLSL parser source
|
||||
run: |
|
||||
touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c
|
||||
touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c
|
||||
touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h
|
||||
touch 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
|
||||
touch 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
|
||||
- name: Build
|
||||
env:
|
||||
MINGW64: "/mingw64"
|
||||
run: make shaders
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: mame-bgfx-${{ github.sha }}
|
||||
path: bgfx/shaders
|
||||
if-no-files-found: error
|
76
.github/workflows/ci-linux.yml
vendored
76
.github/workflows/ci-linux.yml
vendored
@ -1,76 +0,0 @@
|
||||
name: CI (Linux)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- 'hash/**'
|
||||
- 'scripts/**'
|
||||
- 'src/**'
|
||||
- 'COPYING'
|
||||
- 'makefile'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- 'hash/**'
|
||||
- 'scripts/**'
|
||||
- 'src/**'
|
||||
- 'COPYING'
|
||||
- 'makefile'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
compiler: [gcc, clang]
|
||||
include:
|
||||
- compiler: gcc
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
archopts: -U_FORTIFY_SOURCE
|
||||
subtarget: tiny
|
||||
executable: mametiny
|
||||
- compiler: clang
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
subtarget: mame
|
||||
executable: mame
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libasound2-dev libxinerama-dev libxi-dev qtbase5-dev qtbase5-dev-tools
|
||||
- name: Install clang
|
||||
if: matrix.compiler == 'clang'
|
||||
run: sudo apt-get install -y clang
|
||||
- name: Build
|
||||
env:
|
||||
OVERRIDE_CC: ${{ matrix.cc }}
|
||||
OVERRIDE_CXX: ${{ matrix.cxx }}
|
||||
ARCHOPTS: ${{ matrix.archopts }}
|
||||
SUBTARGET: ${{ matrix.subtarget }}
|
||||
TOOLS: 1
|
||||
run: make -j3
|
||||
- name: Validate
|
||||
run: ./${{ matrix.executable }} -validate
|
||||
- name: Reconcile driver list
|
||||
run: ./${{ matrix.executable }} -listxml | python scripts/build/makedep.py reconcilelist -l src/mame/${{ matrix.subtarget }}.lst -
|
||||
- name: ORM check
|
||||
run: python scripts/minimaws/minimaws.py load --executable ./${{ matrix.executable }} --softwarepath hash
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: ${{ matrix.executable }}-linux-${{ matrix.compiler }}-${{ github.sha }}
|
||||
path: |
|
||||
${{ matrix.executable }}
|
||||
chdman
|
||||
unidasm
|
||||
if-no-files-found: error
|
47
.github/workflows/ci-macos.yml
vendored
47
.github/workflows/ci-macos.yml
vendored
@ -1,47 +0,0 @@
|
||||
name: CI (macOS)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- 'scripts/**'
|
||||
- 'src/**'
|
||||
- 'COPYING'
|
||||
- 'makefile'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- 'scripts/**'
|
||||
- 'src/**'
|
||||
- 'COPYING'
|
||||
- 'makefile'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macOS-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: brew install python3 sdl2
|
||||
- name: Build
|
||||
env:
|
||||
USE_LIBSDL: 1
|
||||
TOOLS: 1
|
||||
run: make -j2
|
||||
- name: Validate
|
||||
run: ./mame -validate
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: mame-macos-${{ github.sha }}
|
||||
path: |
|
||||
mame
|
||||
chdman
|
||||
unidasm
|
||||
if-no-files-found: error
|
16
.github/workflows/ci-windows.yml
vendored
16
.github/workflows/ci-windows.yml
vendored
@ -29,18 +29,13 @@ jobs:
|
||||
shell: msys2 {0}
|
||||
strategy:
|
||||
matrix:
|
||||
compiler: [gcc, clang]
|
||||
compiler: [gcc]
|
||||
include:
|
||||
- compiler: gcc
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
subtarget: mame
|
||||
executable: mame
|
||||
- compiler: clang
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
subtarget: tiny
|
||||
executable: mametiny
|
||||
steps:
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
@ -56,15 +51,12 @@ jobs:
|
||||
OVERRIDE_CXX: ${{ matrix.cxx }}
|
||||
ARCHOPTS: "-fuse-ld=lld"
|
||||
SUBTARGET: ${{ matrix.subtarget }}
|
||||
TOOLS: 1
|
||||
run: make -j3
|
||||
- name: Validate
|
||||
run: ./${{ matrix.executable }}.exe -validate
|
||||
SOURCES: sinclair/sprinter.cpp,sinclair/tsconf.cpp,sinclair/byte.cpp,sinclair/pentevo.cpp
|
||||
TOOLS: 0
|
||||
run: make -j$(nproc)
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: ${{ matrix.executable }}-windows-${{ matrix.compiler }}-${{ github.sha }}
|
||||
path: |
|
||||
${{ matrix.executable }}.exe
|
||||
chdman.exe
|
||||
unidasm.exe
|
||||
if-no-files-found: error
|
||||
|
38
.github/workflows/docs.yml
vendored
38
.github/workflows/docs.yml
vendored
@ -1,38 +0,0 @@
|
||||
name: Build documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'docs/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y librsvg2-bin latexmk python3-pip python3-sphinx texlive texlive-formats-extra texlive-science
|
||||
pip3 install sphinxcontrib-svg2pdfconverter
|
||||
- name: Build HTML
|
||||
run: make -C docs html
|
||||
- name: Build PDF
|
||||
run: make -C docs latexpdf
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: mame-docs-${{ github.sha }}
|
||||
path: |
|
||||
docs/build/html
|
||||
docs/build/latex/MAME.pdf
|
||||
if-no-files-found: error
|
38
.github/workflows/hash.yml
vendored
38
.github/workflows/hash.yml
vendored
@ -1,38 +0,0 @@
|
||||
name: XML/JSON validation
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'ctrlr/*'
|
||||
- 'hash/*'
|
||||
- 'plugins/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'ctrlr/*'
|
||||
- 'hash/*'
|
||||
- 'plugins/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libxml2-utils python3-jsonschema
|
||||
- name: Validate (controller configuration)
|
||||
run: for x in ctrlr/*.cfg ; do xmllint --noout "$x" ; done
|
||||
- name: Validate (HSI)
|
||||
run: for x in hash/*.hsi ; do xmllint --noout "$x" ; done
|
||||
- name: Validate (software list)
|
||||
run: for x in hash/*.xml ; do xmllint --noout --valid "$x" ; done
|
||||
- name: Validate (plugin properties)
|
||||
run: for x in plugins/*/plugin.json ; do jsonschema -i "$x" plugins/plugin.schema ; done
|
29
.github/workflows/language.yml
vendored
29
.github/workflows/language.yml
vendored
@ -1,29 +0,0 @@
|
||||
name: Compile UI translations
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'language/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/**'
|
||||
- 'language/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-language:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Compile message catalogs
|
||||
run: for x in language/*/*.po ; do python scripts/build/msgfmt.py --output-file "`dirname "$x"`/`basename "$x" .po`.mo" "$x" ; done
|
||||
- uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: mame-language-${{ github.sha }}
|
||||
path: language/*/*.mo
|
||||
if-no-files-found: error
|
@ -5,10 +5,65 @@ license:CC0-1.0
|
||||
-->
|
||||
<softwarelist name="tsconf_betadisc_flop" description="TS-Configuration Beta Disc / TR-DOS disk images">
|
||||
|
||||
<software name="alterego">
|
||||
<description>Alter Ego</description>
|
||||
<year>2011</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<info name="developer" value="Shiru"/>
|
||||
<info name="developer" value="brightentayle"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="32256">
|
||||
<rom name="alteregobeta.spg" size="32256" crc="5645820c" sha1="957b66480d513bb8a34187326cb8b1824925bbc3" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="bomberman">
|
||||
<description>Bomberman</description>
|
||||
<year>2012</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Budder"/>
|
||||
<info name="developer" value="Wizart"/>
|
||||
<info name="developer" value="Crash"/>
|
||||
<info name="developer" value="Breeze"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="102400">
|
||||
<rom name="bomber.spg" size="102400" crc="16601e87" sha1="7bc8bf23ffba2e8177485303ba0879bb26ac4453" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="brucelee">
|
||||
<description>Bruce Lee</description>
|
||||
<year>2015</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="71680">
|
||||
<rom name="brucelee.spg" size="71680" crc="a86875e1" sha1="475732defc8d88ad0160b071ad5a6535cb220ff5" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="chase">
|
||||
<description>Chase</description>
|
||||
<year>2012</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<info name="developer" value="Shiru"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="13824">
|
||||
<rom name="chase.spg" size="13824" crc="0b8b82fe" sha1="79a26756345f9178adb1305dbd5c31ea87d9f252" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="copter">
|
||||
<description>Copter v0.1</description>
|
||||
<year>2012</year>
|
||||
<publisher>Wizart/DT</publisher>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Wizart"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="655360">
|
||||
<rom name="COPTER.trd" size="655360" crc="43236562" sha1="c4e3a9bcfd2387e954372a633f7415db368dbd4b" />
|
||||
@ -16,10 +71,367 @@ license:CC0-1.0
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="digger">
|
||||
<description>Digger</description>
|
||||
<year>2016</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<info name="developer" value="Er"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="411648">
|
||||
<rom name="Digger.spg" size="411648" crc="f6c1de1b" sha1="d2d85cefd758832dfb89abb24b672e1a05eef009" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="edgegrinder">
|
||||
<description>Edge Grinder v1.01</description>
|
||||
<year>2018</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<info name="developer" value="Trevor Smila Storey"/>
|
||||
<info name="developer" value="Tom+Jerry"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="43520">
|
||||
<rom name="edge_grinder.spg" size="43520" crc="dfbce1ca" sha1="932a8627cd2a69392d7b6eb2995ab52d9ca60288" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="jptst">
|
||||
<description>Jim Power Test</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="60928">
|
||||
<rom name="jptst.spg" size="60928" crc="f12f6921" sha1="4f1b2efc14ae006cb574bfa109e30680a96fbe18" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="lirus">
|
||||
<description>Lirus</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Denis Grachev"/>
|
||||
<info name="developer" value="nodeus"/>
|
||||
<info name="developer" value="Oleg Nikitin"/>
|
||||
<info name="developer" value="Alex Lobov"/>
|
||||
<info name="developer" value="Alex Semenov"/>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="323072">
|
||||
<rom name="Lirus.spg" size="323072" crc="5c081bd8" sha1="abec5973471697b82f36bdfe6cbc71498892a945" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="lost">
|
||||
<description>Touhou Zero. Lost Donation Box Incident</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Nihirash"/>
|
||||
<info name="developer" value="Hina"/>
|
||||
<info name="developer" value="EA"/>
|
||||
<info name="developer" value="Gogin"/>
|
||||
<info name="developer" value="Scalesmann"/>
|
||||
<info name="developer" value="wbc"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="1901568">
|
||||
<rom name="lost-ts.spg" size="1901568" crc="d2322d8b" sha1="8176b473d3be34543be1e35749b1c6e4baa5db61" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="multidude">
|
||||
<description>MultiDude</description>
|
||||
<year>2014</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Denis Grachev"/>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<info name="developer" value="brightentayle"/>
|
||||
<info name="developer" value="MMCM"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="26624">
|
||||
<rom name="MultiDude.spg" size="26624" crc="c3e10b45" sha1="e2046de86f546db2a8d95244d3c703358f5e1655" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="ninjagarden">
|
||||
<description>Ninja Gaiden</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="173056">
|
||||
<rom name="NinjaGaiden.spg" size="173056" crc="10fca9ba" sha1="398eeb975604b1f75c36d750539f248e1aab114d" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="ouk">
|
||||
<description>Once Upon a Time in a Kingdom</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Marie Slip"/>
|
||||
<info name="developer" value="Colorizator"/>
|
||||
<info name="developer" value="Devstratum, Graf Cherry"/>
|
||||
<info name="developer" value="Mister Robin"/>
|
||||
<info name="developer" value="Fatalsnipe"/>
|
||||
<info name="developer" value="Karbafos"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="655360">
|
||||
<rom name="O.U.K (AY) last-cat.trd" size="655360" crc="5f84d0f7" sha1="c4e061dde0b4cc3244e994b51b1ed02ef8b56fbc" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="otterandsmoker">
|
||||
<description>Otter & Smoker</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Black Cat"/>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<info name="developer" value="Marie Slip"/>
|
||||
<info name="developer" value="Mike Gamaev"/>
|
||||
<info name="developer" value="Colorizator"/>
|
||||
<info name="developer" value="Joe Vondayl"/>
|
||||
<info name="developer" value="Mister Robin"/>
|
||||
<info name="developer" value="Fatalsnipe"/>
|
||||
<info name="developer" value="Alex Mart"/>
|
||||
<part name="v1_6_neogs" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="1703424">
|
||||
<rom name="Otter&Smocker v1.6 (NEOGS).spg" size="1703424" crc="b069bff4" sha1="b28ac7a9afcb11d7cbfc6392df601e3b6473d9b1" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="v1_6_turbosound" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="1703424">
|
||||
<rom name="Otter&Smocker v1.6 (TAY).spg" size="1703424" crc="7539f2ca" sha1="e7c85f002e31b0ef4fe02c6565e8552ef528778b" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="v1_6_nofx" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="1703424">
|
||||
<rom name="Otter&Smocker v1.6 (NoFX).spg" size="1703424" crc="a76b1815" sha1="063d1d0922bc1c70f0832c3ba17d35f413bb10b2" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="ottifants">
|
||||
<description>Ottifants</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Dr.Max"/>
|
||||
<info name="developer" value="EA"/>
|
||||
<info name="developer" value="Fatalsnipe"/>
|
||||
<info name="developer" value="Gogin"/>
|
||||
<info name="developer" value="MR287CC"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<info name="developer" value="Quiet"/>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="358912">
|
||||
<rom name="Ottifants.spg" size="358912" crc="103cd3f2" sha1="159a7679873c6293f67740a0aa8c65924cdccac5" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="pacpack">
|
||||
<description>PacPack</description>
|
||||
<year>2018</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="297472">
|
||||
<rom name="PacPack.spg" size="297472" crc="a3918598" sha1="4d1497a8774c50ea962290078e1a2f2931a44f3b" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="parallax">
|
||||
<description>Cannon Fodder Parallax</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="20480">
|
||||
<rom name="cfparallax.spg" size="20480" crc="4e500604" sha1="8e11d90a0bb72ec408dfc212f9fa01ce5acc7186" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="sirababol">
|
||||
<description>Sir Ababol</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<info name="developer" value="na_th_an"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="36864">
|
||||
<rom name="sirababol.spg" size="36864" crc="a8158028" sha1="83997cbc28a16670ab0a1cdb470f2b7624062353" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="socoban">
|
||||
<description>Socoban</description>
|
||||
<year>2015</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="g0blinish"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="24064">
|
||||
<rom name="soco.spg" size="24064" crc="c5b5179c" sha1="3518bbc1145e4941c08703084d52b4ba4ea53272" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="sonicthehedgehog">
|
||||
<description>Sonic the Hedgehog</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="320512">
|
||||
<rom name="Sonic.spg" size="320512" crc="84abf16d" sha1="8cd8b3083e3143d26262116bb07646f69c462909" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="synchronization">
|
||||
<description>Synchronization</description>
|
||||
<year>201?</year>
|
||||
<publisher>Robus</publisher>
|
||||
<info name="developer" value="Hacker VBI"/>
|
||||
<info name="developer" value="Robus"/>
|
||||
<info name="developer" value="Mellona"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="655360">
|
||||
<rom name="SYNCHRO.TRD" size="655360" crc="8b99764d" sha1="022ea81b2f3e2154ee0fdd733dbe6ddc8a020ca6" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tcircles">
|
||||
<description>T-circles</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Buyan"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="22528">
|
||||
<rom name="Tcircles.spg" size="22528" crc="ac5c5b9b" sha1="13102d62ba48c45d77fbeb9e953c122fc8f6c8b2" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tetris">
|
||||
<description>Tetris</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="denpopov"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="3584">
|
||||
<rom name="tetris.spg" size="3584" crc="335c998d" sha1="f730ea4eabb1b301bf8b8e2713bbf0ae2d3745fe" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tsdemo">
|
||||
<description>TS-TechDemo</description>
|
||||
<year>2013</year>
|
||||
<publisher>Wizart/DT</publisher>
|
||||
<info name="developer" value="Wizart"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="655360">
|
||||
<rom name="TSDemo.trd" size="655360" crc="c2e72fe4" sha1="fe99a846c9702c3c424daa8b6509458853bcf5ff" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tsolitaire">
|
||||
<description>TSolitaire</description>
|
||||
<year>201?</year>
|
||||
<publisher>ERA Creative Group (Multinational)</publisher>
|
||||
<info name="developer" value="Marie Slip"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<info name="developer" value="Black Cat"/>
|
||||
<info name="developer" value="Inside"/>
|
||||
<part name="v2_0_turbosound" interface="floppy_5_25">
|
||||
<dataarea name="flop1" size="655360">
|
||||
<rom name="TS v2.0(TFM)_edited.trd" size="655360" crc="05cf31ef" sha1="6a25e71b805c21410607f8c62a62198333ced2fd" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="v2_0" interface="floppy_5_25">
|
||||
<dataarea name="flop1" size="655360">
|
||||
<rom name="TS v2.0_edited.trd" size="655360" crc="e4d026bb" sha1="a8bbb38f301cc588f3af0f8ed01f0822c7b38ab3" />
|
||||
</dataarea>
|
||||
</part>
|
||||
<part name="v1_1" interface="floppy_5_25">
|
||||
<dataarea name="flop1" size="655360">
|
||||
<rom name="TSolv1.1.trd" size="655360" crc="0ec1c4da" sha1="5c0a0cb8c8043748b582750d0171d68d9ac4d6c7" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="uwol">
|
||||
<description>Uwol - Quest for Money</description>
|
||||
<year>2012</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<info name="developer" value="Shiru"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="53760">
|
||||
<rom name="uwol_1.0.spg" size="53760" crc="768fc5ca" sha1="78c8c63ce896d03f620c03269d73ff018563f885" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="wonderboy">
|
||||
<description>Wonder Boy</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Blade"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="84992">
|
||||
<rom name="WonderBoy.spg" size="84992" crc="f6fcc4cd" sha1="fd0ba88a6f521a664e70995188102c77e8cd8331" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="xonix">
|
||||
<description>Xonix</description>
|
||||
<year>2012</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Shiru"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="224256">
|
||||
<rom name="xnx.spg" size="224256" crc="b6da5a5d" sha1="a3ec74ce8bb239565fac7425283cd0c4adcc0d13" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="zenloops">
|
||||
<description>Zen Loops</description>
|
||||
<year>201?</year>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="g0blinish"/>
|
||||
<part name="dump" interface="spectrum_snapshot">
|
||||
<dataarea name="dump" size="18432">
|
||||
<rom name="zenloops.spg" size="18432" crc="50f3a0e4" sha1="6a99fdac432f5467dc16bbb7374a7455eca9df19" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="zxbatlecity">
|
||||
<description>ZX Battle City v1.4 (NoVDAC)</description>
|
||||
<year>2020</year>
|
||||
<publisher>Marie Slip / n1k-o</publisher>
|
||||
<publisher><homebrew></publisher>
|
||||
<info name="developer" value="Marie Slip"/>
|
||||
<info name="developer" value="n1k-o"/>
|
||||
<part name="flop1" interface="floppy_5_25">
|
||||
<dataarea name="flop" size="655360">
|
||||
<rom name="zxbattlecity_1_4_novdac.trd" size="655360" crc="0a2bfb45" sha1="21747a464db723d934ec2fa8a398b212344f6c1e" />
|
||||
|
@ -41,7 +41,7 @@ DEFINE_DEVICE_TYPE(ISA8_COM, isa8_com_device, "isa_com", "Communications Adapter
|
||||
|
||||
void isa8_com_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
ins8250_device &uart0(INS8250(config, "uart_0", XTAL(1'843'200)));
|
||||
ns16550_device &uart0(NS16550(config, "uart_0", XTAL(1'843'200)));
|
||||
uart0.out_tx_callback().set("serport0", FUNC(rs232_port_device::write_txd));
|
||||
uart0.out_dtr_callback().set("serport0", FUNC(rs232_port_device::write_dtr));
|
||||
uart0.out_rts_callback().set("serport0", FUNC(rs232_port_device::write_rts));
|
||||
@ -118,7 +118,7 @@ isa8_com_device::isa8_com_device(const machine_config &mconfig, device_type type
|
||||
void isa8_com_device::device_start()
|
||||
{
|
||||
set_isa_device();
|
||||
m_isa->install_device(0x03f8, 0x03ff, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_w)));
|
||||
m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_0"), FUNC(ins8250_device::ins8250_w)));
|
||||
m_isa->install_device(0x02f8, 0x02ff, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_1"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_1"), FUNC(ins8250_device::ins8250_w)));
|
||||
// m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_2"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_2"), FUNC(ins8250_device::ins8250_w)));
|
||||
// m_isa->install_device(0x02e8, 0x02ef, read8sm_delegate(*subdevice<ins8250_uart_device>("uart_3"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice<ins8250_uart_device>("uart_3"), FUNC(ins8250_device::ins8250_w)));
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "emu.h"
|
||||
#include "isa_cards.h"
|
||||
|
||||
/*
|
||||
// video
|
||||
#include "mda.h"
|
||||
#include "cga.h"
|
||||
@ -89,10 +90,11 @@
|
||||
#include "finalchs.h"
|
||||
#include "bblue2.h"
|
||||
#include "opus100pm.h"
|
||||
|
||||
*/
|
||||
|
||||
void pc_isa8_cards(device_slot_interface &device)
|
||||
{
|
||||
/*
|
||||
device.option_add("mda", ISA8_MDA);
|
||||
device.option_add("cga", ISA8_CGA);
|
||||
device.option_add("cga_ec1841", ISA8_EC1841_0002);
|
||||
@ -146,10 +148,12 @@ void pc_isa8_cards(device_slot_interface &device)
|
||||
device.option_add("acb2072", ACB2072);
|
||||
device.option_add("3xtwin", ISA8_3XTWIN);
|
||||
device.option_add("opus108pm", ISA8_OPUS108PM);
|
||||
*/
|
||||
}
|
||||
|
||||
void pc_isa16_cards(device_slot_interface &device)
|
||||
{
|
||||
/*
|
||||
// 8-bit
|
||||
device.option_add("mda", ISA8_MDA);
|
||||
device.option_add("cga", ISA8_CGA);
|
||||
@ -250,4 +254,5 @@ void pc_isa16_cards(device_slot_interface &device)
|
||||
device.option_add("omti8621", ISA16_OMTI8621);
|
||||
device.option_add("lrk331", LRK331);
|
||||
device.option_add("hpblp", HPBLP);
|
||||
*/
|
||||
}
|
||||
|
@ -201,7 +201,13 @@ DEFINE_DEVICE_TYPE(PC_KBD_MICROSOFT_NATURAL, pc_kbd_microsoft_natural_device, "k
|
||||
|
||||
ROM_START( microsoft_natural )
|
||||
ROM_REGION(0x1000, "ms_natrl_cpu", 0)
|
||||
ROM_LOAD("natural.bin", 0x0000, 0x1000, CRC(aa8243ab) SHA1(72134882a5c03e785db07cc54dfb7572c0a730d9))
|
||||
ROM_DEFAULT_BIOS("orig")
|
||||
|
||||
ROM_SYSTEM_BIOS(0, "orig", "Original")
|
||||
ROMX_LOAD("natural.bin", 0x0000, 0x1000, CRC(aa8243ab) SHA1(72134882a5c03e785db07cc54dfb7572c0a730d9), ROM_BIOS(0))
|
||||
|
||||
ROM_SYSTEM_BIOS(1, "sp2k", "Sprinter 2k Fix")
|
||||
ROMX_LOAD("natural-sp2k.bin", 0x0000, 0x1000, CRC(16c21ab2) SHA1(72c6ebe8fd88a81a6c9622ff968ad2d0eb04a629), ROM_BIOS(1))
|
||||
ROM_END
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ protected:
|
||||
virtual void signature() override;
|
||||
|
||||
int m_can_identify_device;
|
||||
uint16_t m_num_cylinders;
|
||||
uint32_t m_num_cylinders;
|
||||
uint8_t m_num_sectors;
|
||||
uint8_t m_num_heads;
|
||||
|
||||
|
@ -122,7 +122,8 @@ gfx_element::gfx_element(device_palette_interface *palette, const gfx_layout &gl
|
||||
m_layout_is_raw(false),
|
||||
m_layout_planes(0),
|
||||
m_layout_xormask(xormask),
|
||||
m_layout_charincrement(0)
|
||||
m_layout_charincrement(0),
|
||||
m_layout_char_offset(nullptr)
|
||||
{
|
||||
// set the layout
|
||||
set_layout(gl, srcdata);
|
||||
@ -281,7 +282,6 @@ void gfx_element::set_source_clip(u32 xoffs, u32 width, u32 yoffs, u32 height)
|
||||
m_starty = yoffs;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// decode - decode a single character
|
||||
//-------------------------------------------------
|
||||
@ -301,7 +301,9 @@ void gfx_element::decode(u32 code)
|
||||
plane < m_layout_planes;
|
||||
plane++, planebit >>= 1)
|
||||
{
|
||||
int planeoffs = code * m_layout_charincrement + m_layout_planeoffset[plane];
|
||||
int planeoffs = m_layout_planeoffset[plane] + (m_layout_char_offset == nullptr
|
||||
? code * m_layout_charincrement
|
||||
: m_layout_char_offset(code, m_width, m_height, m_layout_planes, m_layout_charincrement));
|
||||
|
||||
// iterate over rows
|
||||
for (int y = 0; y < m_origheight; y++)
|
||||
|
@ -140,7 +140,6 @@ enum
|
||||
GFX_PMASK_8 = 0xff00
|
||||
};
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
@ -148,6 +147,8 @@ enum
|
||||
class gfx_element
|
||||
{
|
||||
public:
|
||||
typedef u32 (*layout_char_offset_delegate)(u32, u16, u16, u8, u32);
|
||||
|
||||
// construction/destruction
|
||||
#ifdef UNUSED_FUNCTION
|
||||
gfx_element();
|
||||
@ -182,6 +183,7 @@ public:
|
||||
void set_colorbase(u16 colorbase) { m_color_base = colorbase; }
|
||||
void set_granularity(u16 granularity) { m_color_granularity = granularity; }
|
||||
void set_source_clip(u32 xoffs, u32 width, u32 yoffs, u32 height);
|
||||
void set_layout_char_offset_func(layout_char_offset_delegate func) { m_layout_char_offset = func; };
|
||||
|
||||
// operations
|
||||
void mark_dirty(u32 code) { if (code < elements()) { m_dirty[code] = 1; m_dirtyseq++; } }
|
||||
@ -317,6 +319,7 @@ private:
|
||||
std::vector<u32> m_layout_planeoffset;// plane offsets
|
||||
std::vector<u32> m_layout_xoffset; // X offsets
|
||||
std::vector<u32> m_layout_yoffset; // Y offsets
|
||||
layout_char_offset_delegate m_layout_char_offset = nullptr; // char offset not common calculation
|
||||
};
|
||||
|
||||
|
||||
@ -550,4 +553,6 @@ protected:
|
||||
virtual void device_start() override {}
|
||||
};
|
||||
|
||||
#define LAYOUT_CHAR_OFFSET_FUNC(_name) u32 _name(u32 code, u16 width, u16 height, u8 planes, u32 charincrement)
|
||||
|
||||
#endif // MAME_EMU_DRAWGFX_H
|
||||
|
@ -238,6 +238,13 @@ void spectrum_128_state::spectrum_128_port_7ffd_w(offs_t offset, uint8_t data)
|
||||
m_exp->iorq_w(offset | 1, data);
|
||||
}
|
||||
|
||||
void spectrum_128_state::bank3_set_page(u8 page)
|
||||
{
|
||||
m_port_7ffd_data &= 0xf8;
|
||||
m_port_7ffd_data |= page & 0x07;
|
||||
spectrum_128_update_memory();
|
||||
}
|
||||
|
||||
void spectrum_128_state::spectrum_128_update_memory()
|
||||
{
|
||||
m_bank_rom[0]->set_entry(BIT(m_port_7ffd_data, 4));
|
||||
|
@ -33,6 +33,7 @@ protected:
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
|
||||
virtual void bank3_set_page(u8 page) override;
|
||||
virtual void spectrum_128_update_memory() override;
|
||||
virtual rectangle get_screen_area() override;
|
||||
|
||||
|
@ -206,6 +206,15 @@ SNAPSHOT_LOAD_MEMBER(spectrum_state::snapshot_cb)
|
||||
|
||||
setup_frz(&snapshot_data[0], snapshot_size);
|
||||
}
|
||||
else if (image.is_filetype("spg"))
|
||||
{
|
||||
if (snapshot_data[32] != 'S' || snapshot_data[33] != 'p' || snapshot_data[34] != 'e' || snapshot_data[35] != 'c'
|
||||
|| snapshot_data[36] != 't' || snapshot_data[37] != 'r' || snapshot_data[38] != 'u' || snapshot_data[39] != 'm'
|
||||
|| snapshot_data[40] != 'P' || snapshot_data[41] != 'r' ||snapshot_data[42] != 'o' || snapshot_data[43] != 'g')
|
||||
return std::make_pair(image_error::INVALIDIMAGE, "Invalid .SPG file header.");
|
||||
|
||||
setup_spg(&snapshot_data[0], snapshot_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
setup_z80(&snapshot_data[0], snapshot_size);
|
||||
@ -1767,6 +1776,356 @@ void spectrum_state::snx_decompress_block(address_space &space, const uint8_t *s
|
||||
}
|
||||
}
|
||||
|
||||
static u16 hrust_decompress_block(uint8_t *dest, const uint8_t *source, uint16_t size)
|
||||
{
|
||||
class bb_stream
|
||||
{
|
||||
private:
|
||||
const u8 *base;
|
||||
const u8 *p;
|
||||
int idx;
|
||||
int len;
|
||||
bool eof;
|
||||
u16 bits;
|
||||
|
||||
public:
|
||||
bb_stream(const u8 *from, int block_size)
|
||||
{
|
||||
base = p = from;
|
||||
|
||||
len = block_size;
|
||||
idx = 0;
|
||||
eof = false;
|
||||
|
||||
bits = get_byte();
|
||||
bits += 256 * get_byte();
|
||||
}
|
||||
|
||||
u8 get_byte()
|
||||
{
|
||||
if (p - base == len)
|
||||
{
|
||||
eof = true;
|
||||
return 0;
|
||||
}
|
||||
return *p++;
|
||||
}
|
||||
|
||||
u8 get_bit()
|
||||
{
|
||||
u8 bit = BIT(bits, 15 - idx);
|
||||
if (idx == 15)
|
||||
{
|
||||
bits = get_byte();
|
||||
bits += 256 * get_byte();
|
||||
}
|
||||
|
||||
idx = (idx + 1) % 16;
|
||||
return bit;
|
||||
}
|
||||
|
||||
u8 get_bits(int n)
|
||||
{
|
||||
u8 r = 0;
|
||||
do
|
||||
{
|
||||
r = 2 * r + get_bit();
|
||||
} while (--n);
|
||||
return r;
|
||||
}
|
||||
|
||||
bool error() { return eof; }
|
||||
};
|
||||
|
||||
bb_stream s(source, size);
|
||||
u8 *to = dest;
|
||||
*to++ = s.get_byte();
|
||||
u8 no_bits = 2;
|
||||
constexpr u8 mask[] = {0, 0, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0};
|
||||
|
||||
while (!s.error())
|
||||
{
|
||||
while (s.get_bit())
|
||||
*to++ = s.get_byte();
|
||||
|
||||
u16 len = 0;
|
||||
u8 bb /* = 0*/;
|
||||
do
|
||||
{
|
||||
bb = s.get_bits(2);
|
||||
len += bb;
|
||||
} while (bb == 0x03 && len != 0x0f);
|
||||
|
||||
short offset = 0;
|
||||
if (len == 0)
|
||||
{
|
||||
offset = 0xfff8 + s.get_bits(3);
|
||||
*to = to[offset];
|
||||
to++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (len == 1)
|
||||
{
|
||||
u8 code = s.get_bits(2);
|
||||
|
||||
if (code == 2)
|
||||
{
|
||||
u8 b = s.get_byte();
|
||||
if (b >= 0xe0)
|
||||
{
|
||||
b <<= 1;
|
||||
++b; // rlca
|
||||
b ^= 2; // xor c
|
||||
|
||||
if (b == 0xff)
|
||||
{
|
||||
++no_bits;
|
||||
continue;
|
||||
}
|
||||
|
||||
offset = 0xff00 + b - 0x0f;
|
||||
*to = to[offset];
|
||||
to++;
|
||||
*to++ = s.get_byte();
|
||||
*to = to[offset];
|
||||
to++;
|
||||
continue;
|
||||
}
|
||||
offset = 0xff00 + b;
|
||||
}
|
||||
|
||||
if (code == 0 || code == 1)
|
||||
{
|
||||
offset = s.get_byte();
|
||||
offset += 256 * (code ? 0xfe : 0xfd);
|
||||
}
|
||||
if (code == 3)
|
||||
offset = 0xffe0 + s.get_bits(5);
|
||||
|
||||
for (u8 i = 0; i < 2; ++i)
|
||||
{
|
||||
*to = to[offset];
|
||||
to++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (len == 3)
|
||||
{
|
||||
if (s.get_bit())
|
||||
{
|
||||
offset = 0xfff0 + s.get_bits(4);
|
||||
*to = to[offset];
|
||||
to++;
|
||||
*to++ = s.get_byte();
|
||||
*to = to[offset];
|
||||
to++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (s.get_bit())
|
||||
{
|
||||
u8 noBytes = 6 + s.get_bits(4);
|
||||
for (u8 i = 0; i < 2 * noBytes; ++i)
|
||||
*to++ = s.get_byte();
|
||||
continue;
|
||||
}
|
||||
|
||||
len = s.get_bits(7);
|
||||
if (len == 0x0f)
|
||||
break; // EOF
|
||||
if (len < 0x0f)
|
||||
len = 256 * len + s.get_byte();
|
||||
}
|
||||
|
||||
if (len == 2)
|
||||
++len;
|
||||
|
||||
u8 code = s.get_bits(2);
|
||||
|
||||
if (code == 1)
|
||||
{
|
||||
u8 b = s.get_byte();
|
||||
|
||||
if (b >= 0xe0)
|
||||
{
|
||||
if (len > 3)
|
||||
return false;
|
||||
|
||||
b <<= 1;
|
||||
++b; // rlca
|
||||
b ^= 3; // xor c
|
||||
|
||||
offset = 0xff00 + b - 0x0f;
|
||||
|
||||
*to = to[offset];
|
||||
to++;
|
||||
*to++ = s.get_byte();
|
||||
*to = to[offset];
|
||||
to++;
|
||||
continue;
|
||||
}
|
||||
offset = 0xff00 + b;
|
||||
}
|
||||
|
||||
if (code == 0)
|
||||
offset = 0xfe00 + s.get_byte();
|
||||
else if (code == 2)
|
||||
offset = 0xffe0 + s.get_bits(5);
|
||||
else if (code == 3)
|
||||
{
|
||||
offset = 256 * (mask[no_bits] + s.get_bits(no_bits));
|
||||
offset += s.get_byte();
|
||||
}
|
||||
|
||||
for (u16 i = 0; i < len; ++i)
|
||||
{
|
||||
*to = to[offset];
|
||||
to++;
|
||||
}
|
||||
}
|
||||
|
||||
return to - dest;
|
||||
}
|
||||
|
||||
static void mlz_decompress_block(uint8_t *dest, const uint8_t *source)
|
||||
{
|
||||
class de_mlz
|
||||
{
|
||||
private:
|
||||
const u8 *from;
|
||||
u8 *to;
|
||||
u8 bitstream;
|
||||
int bitcount;
|
||||
|
||||
public:
|
||||
de_mlz(u8 *dst, const u8 *src)
|
||||
{
|
||||
from = src;
|
||||
to = dst;
|
||||
}
|
||||
|
||||
void init_bitstream()
|
||||
{
|
||||
bitstream = get_byte();
|
||||
bitcount = 8;
|
||||
}
|
||||
|
||||
u8 get_byte()
|
||||
{
|
||||
return *from++;
|
||||
}
|
||||
|
||||
void put_byte(u8 val)
|
||||
{
|
||||
*to++ = val;
|
||||
}
|
||||
|
||||
void repeat(u32 disp, int num)
|
||||
{
|
||||
for (int i = 0; i < num; i++)
|
||||
{
|
||||
u8 val = *(to - disp);
|
||||
put_byte(val);
|
||||
}
|
||||
}
|
||||
|
||||
// gets specified number of bits from bitstream
|
||||
// returns them LSB-aligned
|
||||
u32 get_bits(int count)
|
||||
{
|
||||
u32 bits = 0;
|
||||
while (count--)
|
||||
{
|
||||
if (bitcount--)
|
||||
{
|
||||
bits <<= 1;
|
||||
bits |= 1 & (bitstream >> 7);
|
||||
bitstream <<= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
init_bitstream();
|
||||
count++; // repeat loop once more
|
||||
}
|
||||
}
|
||||
|
||||
return bits;
|
||||
}
|
||||
|
||||
int get_bigdisp()
|
||||
{
|
||||
u32 bits;
|
||||
|
||||
// inter displacement
|
||||
if (get_bits(1))
|
||||
{
|
||||
bits = get_bits(4);
|
||||
return 0x1100 - (bits << 8) - get_byte();
|
||||
}
|
||||
|
||||
// shorter displacement
|
||||
else
|
||||
return 256 - get_byte();
|
||||
}
|
||||
};
|
||||
|
||||
de_mlz s(dest, source);
|
||||
u32 done = 0;
|
||||
int i;
|
||||
|
||||
// get first byte of packed file and write to output
|
||||
s.put_byte(s.get_byte());
|
||||
|
||||
// second byte goes to bitstream
|
||||
s.init_bitstream();
|
||||
|
||||
// actual depacking loop!
|
||||
do
|
||||
{
|
||||
// get 1st bit - either OUTBYTE or beginning of LZ code
|
||||
// OUTBYTE
|
||||
if (s.get_bits(1))
|
||||
s.put_byte(s.get_byte());
|
||||
|
||||
// LZ code
|
||||
else
|
||||
{
|
||||
switch (s.get_bits(2))
|
||||
{
|
||||
case 0: // 000
|
||||
s.repeat(8 - s.get_bits(3), 1);
|
||||
break;
|
||||
|
||||
case 1: // 001
|
||||
s.repeat(256 - s.get_byte(), 2);
|
||||
break;
|
||||
|
||||
case 2: // 010
|
||||
s.repeat(s.get_bigdisp(), 3);
|
||||
break;
|
||||
|
||||
case 3: // 011
|
||||
// extract num of length bits
|
||||
for (i = 1; !s.get_bits(1); i++)
|
||||
;
|
||||
|
||||
// check for exit code
|
||||
if (i == 9)
|
||||
done = 1;
|
||||
else if (i <= 7)
|
||||
{
|
||||
// get length bits itself
|
||||
int bits = s.get_bits(i);
|
||||
s.repeat(s.get_bigdisp(), 2 + (1 << i) + bits);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (!done);
|
||||
}
|
||||
|
||||
void spectrum_state::setup_snx(const uint8_t *snapdata, uint32_t snapsize)
|
||||
{
|
||||
uint8_t intr;
|
||||
@ -2396,6 +2755,129 @@ void spectrum_state::setup_z80(const uint8_t *snapdata, uint32_t snapsize)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Load a .SPG (Spectrum Prog) file.
|
||||
|
||||
v1.1: https://raw.githubusercontent.com/tslabs/zx-evo/master/pentevo/docs/Formats/SPGv1_1.txt
|
||||
v1.0: https://raw.githubusercontent.com/tslabs/zx-evo/master/pentevo/docs/Formats/SPGv1_0.txt
|
||||
v0.2 https://raw.githubusercontent.com/tslabs/zx-evo/master/pentevo/docs/Formats/SPGv0_2.txt
|
||||
*/
|
||||
void spectrum_state::setup_spg(const u8 *snapdata, u32 snapsize)
|
||||
{
|
||||
struct spg_v10
|
||||
{
|
||||
char author[32];
|
||||
char magic[12];
|
||||
struct
|
||||
{
|
||||
u8 minor : 4;
|
||||
u8 major : 4;
|
||||
} version;
|
||||
struct
|
||||
{
|
||||
u8 day;
|
||||
u8 month;
|
||||
u8 year; // 2000 + X
|
||||
} date;
|
||||
u16 pc;
|
||||
u16 sp;
|
||||
u8 win3_pg;
|
||||
struct
|
||||
{
|
||||
u8 clock : 2;
|
||||
u8 ei : 1;
|
||||
u8 reserved : 5;
|
||||
} cpu;
|
||||
u16 pager_address;
|
||||
u16 resident_address;
|
||||
u16 blocks_num;
|
||||
struct
|
||||
{
|
||||
u8 seconds;
|
||||
u8 minutes;
|
||||
u8 hours;
|
||||
} time;
|
||||
u8 reserved_1[17];
|
||||
char utility[32];
|
||||
u8 reserved_2[144];
|
||||
struct block
|
||||
{
|
||||
struct
|
||||
{
|
||||
u8 address512 : 5; // 0-#C000, 1f-#FE00
|
||||
u8 reserved_1 : 2;
|
||||
bool is_last : 1;
|
||||
};
|
||||
struct
|
||||
{
|
||||
u8 size512 : 5; // 0-512b, 1f-16kB
|
||||
u8 reserved_2 : 1;
|
||||
u8 compression : 2; // 0-NONE, 1-MLZ, 2-HRUST
|
||||
};
|
||||
u8 page; // #00-#DF
|
||||
} blocks[256];
|
||||
u8 data;
|
||||
};
|
||||
|
||||
spg_v10* spg = (spg_v10*)snapdata;
|
||||
|
||||
const u8 v_maj = spg->version.major;
|
||||
const u8 v_min = spg->version.minor;
|
||||
if (v_maj != 1 || v_min != 0) // just v1.0 for now
|
||||
{
|
||||
logerror("Can't load .SPG file v%d.%d\n", v_maj, v_min);
|
||||
return;
|
||||
}
|
||||
|
||||
m_maincpu->set_state_int(Z80_IY, 0x5c3a);
|
||||
m_maincpu->set_state_int(Z80_HL2, 0x2758);
|
||||
m_maincpu->set_state_int(Z80_I, 0x3f);
|
||||
m_maincpu->set_state_int(Z80_IM, 1);
|
||||
m_port_7ffd_data = 16;
|
||||
|
||||
m_maincpu->set_state_int(Z80_SP, spg->sp);
|
||||
m_maincpu->set_state_int(Z80_PC, spg->pc);
|
||||
m_maincpu->set_state_int(Z80_IFF1, spg->cpu.ei);
|
||||
|
||||
bank3_set_page(spg->win3_pg);
|
||||
|
||||
u8 *data = &spg->data;
|
||||
for (u8 i = 0; i < spg->blocks_num; i++)
|
||||
{
|
||||
const u16 size = (spg->blocks[i].size512 + 1) * 512;
|
||||
const u8 page = spg->blocks[i].page;
|
||||
const u16 offs = (spg->blocks[i].address512) * 512;
|
||||
if (m_ram->size() < ((page << 14) + size))
|
||||
{
|
||||
logerror("Can't write to %d, only %d available\n", (page << 14) + size, m_ram->size());
|
||||
return;
|
||||
}
|
||||
switch (spg->blocks[i].compression)
|
||||
{
|
||||
case 0x00:
|
||||
memcpy(m_ram->pointer() + (page << 14) + offs, data, size);
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
mlz_decompress_block(m_ram->pointer() + (page << 14) + offs, data);
|
||||
break;
|
||||
|
||||
case 0x02:
|
||||
hrust_decompress_block(m_ram->pointer() + (page << 14) + offs, data, size);
|
||||
break;
|
||||
|
||||
default:
|
||||
//
|
||||
logerror("Unsupported compression\n");
|
||||
return;
|
||||
}
|
||||
|
||||
data += size;
|
||||
if (spg->blocks[i].is_last)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QUICKLOAD_LOAD_MEMBER(spectrum_state::quickload_cb)
|
||||
{
|
||||
size_t quickload_size = image.length();
|
||||
|
@ -628,7 +628,7 @@ INPUT_PORTS_START( spectrum )
|
||||
PORT_START("LINE0") /* 0xFEFE */
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z Z : LN BEEP COPY") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(':')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(u8"x X £ EXP INK CLEAR") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(U'£')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x X £ EXP INK CLEAR") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(U'£')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c C ? LPRINT PAPER CONT") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('?')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("v V / LLIST FLASH CLS") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR('/')
|
||||
|
||||
@ -835,7 +835,9 @@ void spectrum_state::spectrum_common(machine_config &config)
|
||||
m_exp->fb_r_handler().set(FUNC(spectrum_state::floating_bus_r));
|
||||
|
||||
/* devices */
|
||||
SNAPSHOT(config, "snapshot", "ach,frz,plusd,prg,sem,sit,sna,snp,snx,sp,z80,zx").set_load_callback(FUNC(spectrum_state::snapshot_cb));
|
||||
SNAPSHOT(config, m_snapshot, "ach,frz,plusd,prg,sem,sit,sna,snp,snx,sp,z80,zx,spg");
|
||||
m_snapshot->set_load_callback(FUNC(spectrum_state::snapshot_cb));
|
||||
m_snapshot->set_interface("spectrum_snapshot");
|
||||
QUICKLOAD(config, "quickload", "raw,scr", attotime::from_seconds(2)).set_load_callback(FUNC(spectrum_state::quickload_cb)); // The delay prevents the screen from being cleared by the RAM test at boot
|
||||
|
||||
CASSETTE(config, m_cassette);
|
||||
|
@ -54,6 +54,7 @@ public:
|
||||
m_video_ram(*this, "video_ram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_screen(*this, "screen"),
|
||||
m_snapshot(*this, "snapshot"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_ram(*this, RAM_TAG),
|
||||
m_specmem(*this, "specmem"),
|
||||
@ -90,6 +91,7 @@ protected:
|
||||
virtual void video_start() override ATTR_COLD;
|
||||
|
||||
// until machine/spec_snqk.cpp gets somehow disentangled
|
||||
virtual void bank3_set_page(u8 page) { }
|
||||
virtual void plus3_update_memory() { }
|
||||
virtual void spectrum_128_update_memory() { }
|
||||
virtual void ts2068_update_memory() { }
|
||||
@ -154,6 +156,7 @@ protected:
|
||||
void spectrum_map(address_map &map) ATTR_COLD;
|
||||
void spectrum_data(address_map &map) ATTR_COLD;
|
||||
|
||||
optional_device<snapshot_image_device> m_snapshot;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
required_device<ram_device> m_ram;
|
||||
optional_device<address_map_bank_device> m_specmem;
|
||||
@ -207,6 +210,7 @@ protected:
|
||||
void setup_frz(const uint8_t *snapdata, uint32_t snapsize);
|
||||
void z80_decompress_block(address_space &space, const uint8_t *source, uint16_t dest, uint16_t size);
|
||||
void setup_z80(const uint8_t *snapdata, uint32_t snapsize);
|
||||
void setup_spg(const u8 *snapdata, u32 snapsize);
|
||||
|
||||
// quickload helpers
|
||||
void log_quickload(const char *type, uint32_t start, uint32_t length, uint32_t exec, const char *exec_format);
|
||||
|
@ -103,6 +103,7 @@ public:
|
||||
void sprinter(machine_config &config);
|
||||
|
||||
INPUT_CHANGED_MEMBER(turbo_changed);
|
||||
INPUT_CHANGED_MEMBER(on_nmi);
|
||||
|
||||
protected:
|
||||
virtual void machine_start() override ATTR_COLD;
|
||||
@ -259,6 +260,7 @@ private:
|
||||
bool m_turbo;
|
||||
bool m_turbo_hard;
|
||||
bool m_arom16;
|
||||
bool m_nmi_ena;
|
||||
u8 m_rom_rg;
|
||||
u8 m_pn;
|
||||
u8 m_sc;
|
||||
@ -317,7 +319,7 @@ void sprinter_state::update_memory()
|
||||
else
|
||||
{
|
||||
const bool cash_on = 0;
|
||||
const bool nmi_ena = 1;
|
||||
const bool nmi_ena = m_nmi_ena;
|
||||
const bool sc0 = BIT(m_sc, 0);
|
||||
const bool sc_lc = !(sc0 && m_ram_sys) && !cash_on;
|
||||
const u8 spr_ = BIT(m_sc, 1) ? 0 : ((m_dos << 1) | (BIT(m_pn, 4) || !m_dos));
|
||||
@ -1424,6 +1426,7 @@ void sprinter_state::machine_start()
|
||||
save_item(NAME(m_turbo));
|
||||
save_item(NAME(m_turbo_hard));
|
||||
save_item(NAME(m_arom16));
|
||||
save_item(NAME(m_nmi_ena));
|
||||
save_item(NAME(m_rom_rg));
|
||||
save_item(NAME(m_pn));
|
||||
save_item(NAME(m_sc));
|
||||
@ -1467,6 +1470,13 @@ void sprinter_state::machine_start()
|
||||
m_dcp_location = m_ram->pointer() + (0x40 << 14);
|
||||
m_maincpu->space(AS_PROGRAM).specific(m_program);
|
||||
|
||||
for (int addr = 0; addr < m_fastram.bytes(); ++addr)
|
||||
m_fastram.target()[addr] = machine().rand();
|
||||
for (int addr = 0; addr < m_vram.bytes(); ++addr)
|
||||
m_vram.target()[addr] = machine().rand();
|
||||
for (int addr = 0; addr < m_ram->size(); ++addr)
|
||||
m_ram->pointer()[addr] = machine().rand();
|
||||
|
||||
const u8 port_default[0x40] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Cx - SYS PORTS COPIES
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, // Dx - RAM PAGES
|
||||
@ -1481,6 +1491,31 @@ void sprinter_state::machine_start()
|
||||
m_hold = {0, 0}; // cb
|
||||
m_conf_loading = 1;
|
||||
m_conf = 0;
|
||||
|
||||
int idx = Z84_MCR + 1;
|
||||
m_maincpu->state_add_divider(-1);
|
||||
m_maincpu->state_add(idx++, "PG0", m_pages[0]);
|
||||
m_maincpu->state_add(idx++, "PG1", m_pages[1]);
|
||||
m_maincpu->state_add(idx++, "PG2", m_pages[2]);
|
||||
m_maincpu->state_add(idx++, "PG3", m_pages[3]);
|
||||
m_maincpu->state_add(idx++, "7FFD", m_pn);
|
||||
m_maincpu->state_add(idx++, "1FFD", m_sc);
|
||||
|
||||
m_maincpu->state_add_divider(-1);
|
||||
|
||||
m_maincpu->state_add(idx++, "DOS OFF", m_dos);
|
||||
m_maincpu->state_add(idx++, "CNF", m_cnf);
|
||||
m_maincpu->state_add(idx++, "PORT_Y", m_port_y);
|
||||
m_maincpu->state_add(idx++, "RGMOD", m_rgmod);
|
||||
|
||||
m_maincpu->state_add_divider(-1);
|
||||
m_maincpu->state_add(idx++, "ACC MODE", m_acc_dir);
|
||||
m_maincpu->state_add(idx++, "ACC Buffer", m_rgacc);
|
||||
m_maincpu->state_add(idx++, "Ext ACC", m_alt_acc);
|
||||
m_maincpu->state_add(idx++, "ACC Counter", m_acc_cnt);
|
||||
|
||||
m_maincpu->state_add_divider(-1);
|
||||
m_maincpu->state_add(idx++, "ISA_ADDR_EXT", m_isa_addr_ext);
|
||||
}
|
||||
|
||||
void sprinter_state::machine_reset()
|
||||
@ -1498,6 +1533,7 @@ void sprinter_state::machine_reset()
|
||||
m_ram_sys = 0;
|
||||
m_sys_pg = 0;
|
||||
m_arom16 = 0;
|
||||
m_nmi_ena = 1; // off
|
||||
m_cnf = 0x00;
|
||||
m_pn = 0x00;
|
||||
m_sc = 0x00;
|
||||
@ -1699,13 +1735,25 @@ INPUT_CHANGED_MEMBER(sprinter_state::turbo_changed)
|
||||
update_cpu();
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(sprinter_state::on_nmi)
|
||||
{
|
||||
if ((m_io_nmi->read() & 0x01) && m_nmi_ena)
|
||||
{
|
||||
m_nmi_ena = false;
|
||||
update_memory();
|
||||
m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
||||
machine().debug_break();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
INPUT_PORTS_START( sprinter )
|
||||
/* PORT_NAME = KEY Mode CAPS Mode SYMBOL Mode EXT Mode EXT+Shift Mode BASIC Mode */
|
||||
PORT_START("IO_LINE0") /* 0xFEFE */
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CHAR(UCHAR_SHIFT_2)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("z Z : LN BEEP COPY") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(':')
|
||||
PORT_CODE(KEYCODE_BACKSLASH)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(u8"x X £ EXP INK CLEAR") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(U'£')
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("x X $ EXP INK CLEAR") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR('$')
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("c C ? LPRINT PAPER CONT") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR('?')
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("v V / LLIST FLASH CLS") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR('/')
|
||||
PORT_CODE(KEYCODE_SLASH) PORT_CODE(KEYCODE_SLASH_PAD)
|
||||
@ -1867,6 +1915,9 @@ INPUT_PORTS_START( sprinter )
|
||||
PORT_BIT(0x8000, IP_ACTIVE_HIGH, IPT_BUTTON6) PORT_PLAYER(2) PORT_CODE(JOYCODE_BUTTON6) PORT_NAME("%p Z")
|
||||
|
||||
|
||||
PORT_START("NMI")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("NMI") PORT_CODE(KEYCODE_F11) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(sprinter_state::on_nmi), 0)
|
||||
|
||||
PORT_START("TURBO")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("TURBO") PORT_CODE(KEYCODE_F12) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(sprinter_state::turbo_changed), 0)
|
||||
INPUT_PORTS_END
|
||||
@ -1965,6 +2016,12 @@ ROM_START( sprinter )
|
||||
|
||||
ROM_SYSTEM_BIOS(4, "v3.04.253", "BIOS v3.04, SETUP v253") // 06.16.2003
|
||||
ROMX_LOAD( "sp2k-3.04.253.rom", 0x000000, 0x40000, CRC(1729cb5c) SHA1(fb4c9f80651aa87526f141839fb4d6cb86b654c7), ROM_BIOS(4))
|
||||
|
||||
ROM_SYSTEM_BIOS(5, "v3.05.254", "BIOS v3.05, SETUP v254") // 01.01.2022
|
||||
ROMX_LOAD( "sp2k-3.05.254.rom", 0x000000, 0x40000, CRC(fe1c2685) SHA1(10e4e29bdc058cd4380837fb8831ce4f5977f6b8), ROM_BIOS(5))
|
||||
|
||||
ROM_SYSTEM_BIOS(6, "dev", "BIOS v3.06 beta9") // 24.10.2024
|
||||
ROMX_LOAD( "_sprin.bin", 0x000000, 0x40000, CRC(c8e8ca64) SHA1(51757b7953f8260b412286a659647c58426e5283), ROM_BIOS(6))
|
||||
ROM_END
|
||||
|
||||
} // Anonymous namespace
|
||||
|
@ -58,8 +58,7 @@ TILE_GET_INFO_MEMBER(tsconf_state::get_tile_info_16c)
|
||||
u8 *tile_info_addr = &m_ram->pointer()[(m_regs[T_MAP_PAGE] << 14) + row_offset + col_offset];
|
||||
u8 hi = tile_info_addr[1];
|
||||
|
||||
u32 /*u16*/ tile = ((u16(hi) & 0x0f) << 8) | tile_info_addr[0];
|
||||
tile = tile / tilemap.cols() * 64 * 8 + (tile % tilemap.cols()); // same as: tmp_tile_oversized_to_code()
|
||||
u16 tile = ((u16(hi) & 0x0f) << 8) | tile_info_addr[0];
|
||||
u8 pal = (BIT(m_regs[PAL_SEL], 4 + Layer * 2, 2) << 2) | BIT(hi, 4, 2);
|
||||
tileinfo.set(TM_TILES0 + Layer, tile, pal, TILE_FLIPYX(BIT(hi, 6, 2)));
|
||||
tileinfo.category = tile == 0 ? 2 : 1;
|
||||
@ -137,16 +136,20 @@ static const gfx_layout tsconf_charlayout =
|
||||
|
||||
static const gfx_layout tsconf_tile_16cpp_layout =
|
||||
{
|
||||
8,
|
||||
8,
|
||||
64 * 64 * 8,
|
||||
8, 8,
|
||||
64 * 64,
|
||||
4,
|
||||
{STEP4(0, 1)},
|
||||
{STEP8(0, 4)},
|
||||
{STEP8(0, 256 * 8)}, // Much more tiles when needed. Because tiles are in RAW format but we don't know region properties.
|
||||
8 * 4
|
||||
{STEP8(0, 256 * 8)}
|
||||
};
|
||||
|
||||
static LAYOUT_CHAR_OFFSET_FUNC(layout_tile_offset) {
|
||||
u32 col = code % 64;
|
||||
u32 row = code / 64;
|
||||
return (width * planes) * (row * height * 8 * 8 + col);
|
||||
}
|
||||
|
||||
static GFXDECODE_START(gfx_tsconf)
|
||||
GFXDECODE_ENTRY("maincpu", 0, tsconf_charlayout, 0xf7, 1) // TM_TS_CHAR : TXT
|
||||
GFXDECODE_ENTRY("maincpu", 0, tsconf_tile_16cpp_layout, 0, 16) // TM_TILES0 : T0 16cpp
|
||||
@ -162,12 +165,16 @@ void tsconf_state::video_start()
|
||||
|
||||
m_ts_tilemap[TM_TS_CHAR] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsconf_state::get_tile_info_txt)), TILEMAP_SCAN_ROWS, 8, 8, 128, 64);
|
||||
|
||||
m_gfxdecode->gfx(TM_TILES0)->set_layout_char_offset_func(layout_tile_offset);
|
||||
m_ts_tilemap[TM_TILES0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsconf_state::get_tile_info_16c<0>)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
|
||||
m_ts_tilemap[TM_TILES0]->set_transparent_pen(0);
|
||||
|
||||
m_gfxdecode->gfx(TM_TILES1)->set_layout_char_offset_func(layout_tile_offset);
|
||||
m_ts_tilemap[TM_TILES1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsconf_state::get_tile_info_16c<1>)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
|
||||
m_ts_tilemap[TM_TILES1]->set_transparent_pen(0);
|
||||
|
||||
m_gfxdecode->gfx(TM_SPRITES)->set_layout_char_offset_func(layout_tile_offset);
|
||||
|
||||
m_frame_irq_timer = timer_alloc(FUNC(tsconf_state::irq_frame), this);
|
||||
m_scanline_irq_timer = timer_alloc(FUNC(tsconf_state::irq_scanline), this);
|
||||
}
|
||||
|
@ -56,6 +56,8 @@ protected:
|
||||
virtual void machine_reset() override ATTR_COLD;
|
||||
virtual void device_post_load() override ATTR_COLD;
|
||||
|
||||
virtual void bank3_set_page(u8 page) override;
|
||||
|
||||
virtual TIMER_CALLBACK_MEMBER(irq_off) override;
|
||||
TIMER_CALLBACK_MEMBER(irq_frame);
|
||||
TIMER_CALLBACK_MEMBER(irq_scanline);
|
||||
|
@ -29,11 +29,6 @@ enum v_mode : u8
|
||||
VM_TXT
|
||||
};
|
||||
|
||||
static constexpr u32 tmp_tile_oversized_to_code(u16 code)
|
||||
{
|
||||
return code / 64 * 64 * 8 + (code % 64);
|
||||
}
|
||||
|
||||
// https://github.com/tslabs/zx-evo/blob/master/pentevo/vdac/vdac1/cpld/top.v
|
||||
static constexpr u8 pwm_to_rgb[32] = {
|
||||
0, 10, 21, 31, 42, 53, 63, 74,
|
||||
@ -364,7 +359,7 @@ void tsconf_state::draw_sprites(screen_device &screen_d, bitmap_rgb32 &bitmap, c
|
||||
for (auto spr = m_sprites_cache.rbegin(); spr != m_sprites_cache.rend(); ++spr)
|
||||
{
|
||||
m_gfxdecode->gfx(TM_SPRITES)->prio_transpen(bitmap, cliprect,
|
||||
tmp_tile_oversized_to_code(spr->code), spr->color, spr->flipx, spr->flipy, spr->destx, spr->desty,
|
||||
spr->code, spr->color, spr->flipx, spr->flipy, spr->destx, spr->desty,
|
||||
screen_d.priority(), spr->pmask, 0);
|
||||
}
|
||||
|
||||
@ -477,6 +472,11 @@ u8 tsconf_state::tsconf_port_xx1f_r(offs_t offset) {
|
||||
: 0x00; // TODO kempston read
|
||||
}
|
||||
|
||||
void tsconf_state::bank3_set_page(u8 page)
|
||||
{
|
||||
tsconf_port_xxaf_w(PAGE3 << 8, page);
|
||||
}
|
||||
|
||||
void tsconf_state::tsconf_port_7ffd_w(u8 data)
|
||||
{
|
||||
// LOCK? BIT(data, 5);
|
||||
|
Loading…
Reference in New Issue
Block a user