From 980c98d49ad9c6cbb0b1099e016f840747aaaf2c Mon Sep 17 00:00:00 2001 From: Andrei Holub Date: Mon, 6 Apr 2026 19:03:53 -0400 Subject: [PATCH] WIP: all-in-one --- .github/workflows/bgfxshaders.yml | 44 ------------------ .github/workflows/ci-linux.yml | 76 ------------------------------- .github/workflows/ci-macos.yml | 3 +- .github/workflows/ci-windows.yml | 25 ++-------- .github/workflows/docs.yml | 38 ---------------- .github/workflows/hash.yml | 38 ---------------- .github/workflows/language.yml | 29 ------------ src/devices/bus/isa/com.cpp | 4 +- src/devices/bus/isa/isa_cards.cpp | 8 +++- src/devices/bus/pc_kbd/msnat.cpp | 8 +++- src/devices/machine/atastorage.h | 2 +- src/mame/sinclair/atm.cpp | 8 +++- src/mame/sinclair/chloe.cpp | 15 ++++-- src/mame/sinclair/sprinter.cpp | 62 ++++++++++++++++++++++++- 14 files changed, 99 insertions(+), 261 deletions(-) delete mode 100644 .github/workflows/bgfxshaders.yml delete mode 100644 .github/workflows/ci-linux.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/hash.yml delete mode 100644 .github/workflows/language.yml diff --git a/.github/workflows/bgfxshaders.yml b/.github/workflows/bgfxshaders.yml deleted file mode 100644 index bff5085e5..000000000 --- a/.github/workflows/bgfxshaders.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml deleted file mode 100644 index 03e263bff..000000000 --- a/.github/workflows/ci-linux.yml +++ /dev/null @@ -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: - 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 - 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 libsdl2-dev libsdl2-ttf-dev libfontconfig-dev libasound2-dev libxinerama-dev libxi-dev qt6-base-dev qt6-base-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 diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index ae8c0abcd..a01d4dd1f 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -33,10 +33,9 @@ jobs: - name: Build env: USE_LIBSDL: 1 + SOURCES: sinclair/sprinter.cpp,sinclair/evo/tsconf.cpp,sinclair/next/specnext.cpp,sinclair/evo/pentevo.cpp,sinclair/spectrum.cpp,sinclair/spec128.cpp,sinclair/specpls3.cpp,sinclair/scorpion.cpp TOOLS: 1 run: make -j2 - - name: Validate - run: ./mame -validate - uses: actions/upload-artifact@main with: name: mame-macos-${{ github.sha }} diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 8d3801a92..eff83eba9 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -25,7 +25,7 @@ jobs: build-windows: strategy: matrix: - compiler: [gcc-x64, clang-x64, clang-arm64] + compiler: [gcc-x64] include: - compiler: gcc-x64 os: windows-latest @@ -35,24 +35,6 @@ jobs: cxx: g++ subtarget: mame executable: mame - - compiler: clang-x64 - os: windows-latest - msys: CLANG64 - slug: mingw-w64-clang-x86_64 - extrapkg: mingw-w64-clang-x86_64-gcc-compat - cc: clang - cxx: clang++ - subtarget: tiny - executable: mametiny - - compiler: clang-arm64 - os: windows-11-arm - msys: CLANGARM64 - slug: mingw-w64-clang-aarch64 - extrapkg: mingw-w64-clang-aarch64-gcc-compat - cc: clang - cxx: clang++ - subtarget: mame - executable: mame runs-on: ${{ matrix.os }} defaults: run: @@ -72,10 +54,9 @@ jobs: OVERRIDE_CXX: ${{ matrix.cxx }} ARCHOPTS: "-fuse-ld=lld" SUBTARGET: ${{ matrix.subtarget }} + SOURCES: sinclair/sprinter.cpp,sinclair/evo/tsconf.cpp,sinclair/next/specnext.cpp,sinclair/evo/pentevo.cpp,sinclair/spectrum.cpp,sinclair/spec128.cpp,sinclair/specpls3.cpp,sinclair/scorpion.cpp TOOLS: 1 - run: make -j3 - - name: Validate - run: ./${{ matrix.executable }}.exe -validate + run: make -j2 - uses: actions/upload-artifact@main with: name: ${{ matrix.executable }}-windows-${{ matrix.compiler }}-${{ github.sha }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 2c3bf6120..000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -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 PAPER=a4 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 diff --git a/.github/workflows/hash.yml b/.github/workflows/hash.yml deleted file mode 100644 index 5e5514542..000000000 --- a/.github/workflows/hash.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/language.yml b/.github/workflows/language.yml deleted file mode 100644 index a5c6eaf35..000000000 --- a/.github/workflows/language.yml +++ /dev/null @@ -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 diff --git a/src/devices/bus/isa/com.cpp b/src/devices/bus/isa/com.cpp index fab398f04..a8ef61b35 100644 --- a/src/devices/bus/isa/com.cpp +++ b/src/devices/bus/isa/com.cpp @@ -66,7 +66,7 @@ protected: 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)); @@ -127,7 +127,7 @@ void isa8_com_device::device_add_mconfig(machine_config &config) void isa8_com_device::device_start() { set_isa_device(); - m_isa->install_device(0x03f8, 0x03ff, read8sm_delegate(*subdevice("uart_0"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice("uart_0"), FUNC(ins8250_device::ins8250_w))); + m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(*subdevice("uart_0"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice("uart_0"), FUNC(ins8250_device::ins8250_w))); m_isa->install_device(0x02f8, 0x02ff, read8sm_delegate(*subdevice("uart_1"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice("uart_1"), FUNC(ins8250_device::ins8250_w))); // m_isa->install_device(0x03e8, 0x03ef, read8sm_delegate(*subdevice("uart_2"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice("uart_2"), FUNC(ins8250_device::ins8250_w))); // m_isa->install_device(0x02e8, 0x02ef, read8sm_delegate(*subdevice("uart_3"), FUNC(ins8250_device::ins8250_r)), write8sm_delegate(*subdevice("uart_3"), FUNC(ins8250_device::ins8250_w))); diff --git a/src/devices/bus/isa/isa_cards.cpp b/src/devices/bus/isa/isa_cards.cpp index 2befce318..7419c6c36 100644 --- a/src/devices/bus/isa/isa_cards.cpp +++ b/src/devices/bus/isa/isa_cards.cpp @@ -9,6 +9,7 @@ #include "emu.h" #include "isa_cards.h" +/* // video #include "aga.h" #include "amgda.h" @@ -105,11 +106,13 @@ #include "hpblp.h" #include "opus100pm.h" #include "pcat512me.h" +*/ #include "zxbus_adapter.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); @@ -168,14 +171,16 @@ void pc_isa8_cards(device_slot_interface &device) device.option_add("3xtwin", ISA8_3XTWIN); device.option_add("opus108pm", ISA8_OPUS108PM); device.option_add("ibm_speech", ISA8_IBM_SPEECH); +*/ device.option_add("zxbus_adapter", ISA8_ZXBUS); - device.option_add("ubpnic", ISA8_UBPNIC); + //device.option_add("ubpnic", ISA8_UBPNIC); } void pc_isa16_cards(device_slot_interface &device) { // any 8-bit card also works in a 16-bit slot pc_isa8_cards(device); +/* device.option_replace("fdc", ISA8_FDC_AT); device.option_remove("fdc_at"); device.option_add("fdc_superio", ISA8_FDC_SUPERIO); @@ -245,4 +250,5 @@ void pc_isa16_cards(device_slot_interface &device) device.option_add("dc320e", TEKRAM_DC320E); device.option_add("dc820", TEKRAM_DC820); device.option_add("dc820b", TEKRAM_DC820B); +*/ } diff --git a/src/devices/bus/pc_kbd/msnat.cpp b/src/devices/bus/pc_kbd/msnat.cpp index bc6310c94..12ca536bc 100644 --- a/src/devices/bus/pc_kbd/msnat.cpp +++ b/src/devices/bus/pc_kbd/msnat.cpp @@ -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 diff --git a/src/devices/machine/atastorage.h b/src/devices/machine/atastorage.h index 08a3d901b..27b433b8b 100644 --- a/src/devices/machine/atastorage.h +++ b/src/devices/machine/atastorage.h @@ -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; diff --git a/src/mame/sinclair/atm.cpp b/src/mame/sinclair/atm.cpp index eedf340f2..efa61139d 100644 --- a/src/mame/sinclair/atm.cpp +++ b/src/mame/sinclair/atm.cpp @@ -516,7 +516,7 @@ void atm_state::atm(machine_config &config) output_latch_device ¢_data_out(OUTPUT_LATCH(config, "cent_data_out")); m_centronics->set_output_latch(cent_data_out); - config.device_remove("exp"); + //config.device_remove("exp"); } @@ -588,6 +588,12 @@ ROM_START( atmtb2plus ) ROM_SYSTEM_BIOS(3, "v1.37", "Dual eXtra v1.37XT: BIOS v1.07.15, CP/M v2.2, TR-DOS v5.04R") ROMX_LOAD( "atmtb2x37xt.rom", 0x010000, 0x20000, CRC(e5ef44d9) SHA1(3fbb9ace7cb031e7365c19e4f8b67ed366e24064), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "gluk", "Gluk") + ROMX_LOAD( "glukatm.rom", 0x020000, 0x10000, CRC(7a017f0d) SHA1(301d9195ecaeeba31b7a7d6b7c4037b8cc72a240), ROM_BIOS(4)) + ROM_SYSTEM_BIOS(5, "gluk2", "Gluk2") + ROMX_LOAD( "glukatm2.rom", 0x020000, 0x10000, CRC(64cfee77) SHA1(cd180493e6c3ae4b0a0f753f0efff2debd43a329), ROM_BIOS(5)) + + ROM_REGION(0x01000, "keyboard", ROMREGION_ERASEFF) ROM_LOAD( "rf2ve3.rom", 0x0000, 0x0580, CRC(35e0f9ec) SHA1(adcf14758fab8472cfa0167af7e8326c66416416)) // XT Keyboard ROM_LOAD( "rfat710.rom", 0x0600, 0x0680, CRC(03734365) SHA1(6cb6311727fad9bc4ccb18919c3c39b37529b8e6)) // AT Keyboard diff --git a/src/mame/sinclair/chloe.cpp b/src/mame/sinclair/chloe.cpp index 176fb9983..cda5620eb 100644 --- a/src/mame/sinclair/chloe.cpp +++ b/src/mame/sinclair/chloe.cpp @@ -966,11 +966,18 @@ void chloe_state::chloe(machine_config &config) ROM_START(chloe) ROM_REGION(0xc000, "maincpu", ROMREGION_ERASEFF) + ROM_DEFAULT_BIOS("v101b") - // SE/OS 1.0 - ROM_LOAD( "10_boot.rom", 0x0000, 0x4000, CRC(efbfe46e) SHA1(f5a86b56955661f72fa416e7e644de0b3afe6509)) - ROM_LOAD( "10_basic_42.rom", 0x4000, 0x4000, CRC(c6273eaa) SHA1(f09a26c50f5cfe454e4d56c920cdcc62bc4f90cb)) - ROM_LOAD( "10_dos_31.rom", 0x8000, 0x2000, CRC(67dfef09) SHA1(ba9616494071dfe65834d7db657e0d3bcce0b732)) + ROM_SYSTEM_BIOS(0, "v10", "System 1.0") // 05.01.2024 - SE/OS 1.0 + ROMX_LOAD( "10_boot.rom", 0x0000, 0x4000, CRC(efbfe46e) SHA1(f5a86b56955661f72fa416e7e644de0b3afe6509), ROM_BIOS(0)) + ROMX_LOAD( "10_basic_42.rom", 0x4000, 0x4000, CRC(c6273eaa) SHA1(f09a26c50f5cfe454e4d56c920cdcc62bc4f90cb), ROM_BIOS(0)) + ROMX_LOAD( "10_dos_31.rom", 0x8000, 0x2000, CRC(67dfef09) SHA1(ba9616494071dfe65834d7db657e0d3bcce0b732), ROM_BIOS(0)) + + // SE/OS 1.1 + ROM_SYSTEM_BIOS(1, "v101b", "System 1.0.1b") // 05.xx.2024 - SE/OS 1.0.1b + ROMX_LOAD( "101_boot.rom", 0x0000, 0x4000, CRC(26c57f5a) SHA1(6680aaeac288c688f0400080faf07214959d5a1c), ROM_BIOS(1)) + ROMX_LOAD( "101_basic_42.rom", 0x4000, 0x4000, CRC(0f8658ba) SHA1(b6975e66c029165a39a1ee85ebec50c8e7f4ec1e), ROM_BIOS(1)) + ROMX_LOAD( "10_dos_31.rom", 0x8000, 0x2000, CRC(67dfef09) SHA1(ba9616494071dfe65834d7db657e0d3bcce0b732), ROM_BIOS(1)) ROM_END } // Anonymous namespace diff --git a/src/mame/sinclair/sprinter.cpp b/src/mame/sinclair/sprinter.cpp index dfd1c43e7..bc434ab9b 100644 --- a/src/mame/sinclair/sprinter.cpp +++ b/src/mame/sinclair/sprinter.cpp @@ -122,6 +122,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: u8 m_z80_data; bool m_z80_wait; u8 m_wait_ticks_count; + u8 m_z80_data_odd; std::list> m_ints; u8 m_joy1_ctrl; u8 m_joy2_ctrl; @@ -278,6 +280,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; @@ -336,7 +339,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)); @@ -1014,6 +1017,10 @@ void sprinter_state::check_accel(bool is_read, offs_t offset, u8 &data) m_in_out_cmd = false; } + if (~offset & 1) { + m_z80_data_odd = data; + } + const bool accel_go_case = m_access_state == ACCEL_OFF && !m_z80_m1 && m_acc_dir && acc_ena(); if (accel_go_case) { @@ -1485,6 +1492,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)); @@ -1527,6 +1535,13 @@ void sprinter_state::machine_start() m_dcp_location = m_ram->pointer() + (0x40 << 14); + 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 @@ -1541,6 +1556,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() @@ -1560,6 +1600,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; @@ -1722,7 +1763,6 @@ void sprinter_state::do_mem_wait(u8 cpu_taken = 0) u8 over = m_maincpu->total_cycles() % 6; over = over ? (6 - over) : 0; m_wait_ticks_count = over + 6 - cpu_taken; - m_maincpu->adjust_icount(-m_wait_ticks_count); } } @@ -1767,6 +1807,18 @@ 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 */ @@ -1935,6 +1987,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 @@ -2044,6 +2099,9 @@ ROM_START( sprinter ) ROM_SYSTEM_BIOS(6, "v3.06", "Firmware v3.06, 25.06.2025") ROMX_LOAD( "sp2k-3.06.rom", 0x000000, 0x40000, CRC(187f4382) SHA1(717ed28c59f9533a9b3f9d24098b536a0d3c1573), ROM_BIOS(6)) + + ROM_SYSTEM_BIOS(7, "dev", "Firmware in development") + ROMX_LOAD( "_sprin.bin", 0x000000, 0x40000, CRC(00000000) SHA1(0000000000000000000000000000000000000000), ROM_BIOS(7)) ROM_END } // Anonymous namespace