Skip to content

Instantly share code, notes, and snippets.

diff --git a/src/devices/machine/wd33c9x.cpp b/src/devices/machine/wd33c9x.cpp
--- a/src/devices/machine/wd33c9x.cpp
+++ b/src/devices/machine/wd33c9x.cpp
@@ -902,7 +906,9 @@ void wd33c9x_base_device::step(bool timeout)
irq_fifo_push(SCSI_STATUS_SELECT_TRANSFER_SUCCESS);
} else {
// Makes very little sense, but the previous code did it and warzard seems to need it - XXX
- m_regs[CONTROL] |= CONTROL_EDI;
+// m_regs[CONTROL] |= CONTROL_EDI;
+ set_scsi_state(FINISHED);
@shattered
shattered / v9k-raw2img.pl
Last active October 1, 2020 19:44
victor 9000 image converter
#!/usr/bin/perl
use warnings;
use strict;
use vars qw(@spt $RAW $IMG $buf);
@spt =
(
19, 19, 19, 19,
@shattered
shattered / gist:6d38371216ee5bbb8df29df11307656d
Created June 21, 2018 21:11
experimental patch to HxC's experimental GCR encoder
Index: libhxcfe/trunk/sources/tracks/gcr_track.c
===================================================================
--- libhxcfe/trunk/sources/tracks/gcr_track.c (revision 1565)
+++ libhxcfe/trunk/sources/tracks/gcr_track.c (working copy)
@@ -111,10 +111,10 @@
nongcrcode=nongcrpart[l];
- if(!((nongcrcode>>shift)&0xF))
+ if(!((nongcrcode>>(4-shift))&0xF))
@shattered
shattered / gist:884003ae806fdaa450d8001a62140e2a
Created March 3, 2018 22:28
samdisk scan --agat a840-003.scp --no-diff --offsets
[a840-003.scp]
80 Cyls 2 Heads:
Warning: unknown MFM address mark (0040) at offset 419298 on cyl 1 head 1
Warning: unknown MFM address mark (954A) at offset 47875 on cyl 22 head 0
Warning: unknown MFM address mark (2040) at offset 48082 on cyl 22 head 0
Warning: unknown MFM address mark (954A) at offset 149097 on cyl 22 head 0
Warning: unknown MFM address mark (9540) at offset 47862 on cyl 23 head 0
Warning: unknown MFM address mark epilogue (00) at offset 250322 on cyl 22 head 0
Warning: unknown MFM address mark epilogue (50) at offset 47864 on cyl 22 head 1
Warning: unknown MFM address mark (9540) at offset 250314 on cyl 23 head 0
co = coroutine.create(function(scr)
local w = 0.25
local lf = 10
local cr = 13
function u(ch, t) emu.keypost(ch) emu.wait(t) end
function k(str, t) for c in str:gmatch"." do emu.keypost(c) emu.wait(t) end end
function d(t) emu.wait(t) end
@shattered
shattered / .clang-format
Created February 9, 2017 19:55
first cut of clang-format configuration for MAMEDEV (http://wiki.mamedev.org/index.php/MAME_Coding_Conventions)
AccessModifierOffset: -4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackParameters: false
@shattered
shattered / gist:29ed8a6d5452883d8532cc9928bc7b5f
Created August 10, 2016 05:55
mame/mess build wrapper for 'git bisect run'
#!/bin/bash
#
# build MESS driver, or all of MESS, for 'git bisect run', accounting
# for changes in build process.
#
gmakealways="-j7 NOWERROR=1 USE_QTDEBUG=0"
driver=$1
diff --git a/src/devices/bus/rs232/null_modem.cpp b/src/devices/bus/rs232/null_modem.cpp
index 4c5d741..a859577 100644
--- a/src/devices/bus/rs232/null_modem.cpp
+++ b/src/devices/bus/rs232/null_modem.cpp
@@ -15,7 +15,8 @@ null_modem_device::null_modem_device(const machine_config &mconfig, const char *
m_rs232_stopbits(*this, "RS232_STOPBITS"),
m_input_count(0),
m_input_index(0),
- m_timer_poll(nullptr)
+ m_timer_poll(nullptr),
@shattered
shattered / tstvm2.mac
Created June 28, 2016 19:29
Тест процессора КР1801ВМ2 для УКНЦ, Версия 0.3a, (c) dr.Titus 2012
;===================================================================================
;
; Тест процессора КР1801ВМ2 для УКНЦ
;
; Версия 0.3a
;
; (c) dr.Titus 2012
;
;===================================================================================
@shattered
shattered / more.vim
Created June 1, 2016 17:40
Less is More - A minimal color scheme. Derived from 'less' by Brian Nelson.
" vim color file
"
" Less is More - A minimal color scheme. Derived from 'less' by Brian Nelson.
"
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif