Commit Graph

60148 Commits

Author SHA1 Message Date
smf-
e0dd06bbf4 remove typename which MSVC wanted, will try to find another way (nw) 2018-07-07 23:07:15 +01:00
AJR
dc43087ee5 devcb.h: Looks like GCC does require typename (nw) 2018-07-07 17:48:57 -04:00
AJR
c8f77c0d3d devcb.h: Further attempted GCC build fixing (nw) 2018-07-07 17:46:52 -04:00
AJR
2b802ba442 devcb.h: Attempted fix for GCC build (nw) 2018-07-07 17:36:51 -04:00
smf-
faac6a63e7 Fixes for building with Microsoft Visual Studio 2015. (nw) 2018-07-07 21:46:01 +01:00
AJR
779fb01911 mess.lua: Fix build (nw) 2018-07-07 15:12:35 -04:00
Stiletto
f0ea9963e3
add AppVeyor badge back to the readme.
add AppVeyor badge back to the readme.
2018-07-07 15:09:01 -04:00
balr0g
832ba8b8b2 Rename appveyor.yml 2018-07-07 14:22:59 -04:00
mooglyguy
cc4867d092 Disable debug prints, nw 2018-07-07 19:55:23 +02:00
mooglyguy
4134ea509b ps2sony: checkpoint, nw 2018-07-07 19:55:23 +02:00
Vas Crabb
28ffb7fb98 stupid helper (nw) 2018-07-08 00:48:57 +10:00
Vas Crabb
11b47cb003 remove more MCFG_ (nw) 2018-07-07 23:39:05 +10:00
smf-
b747b711bb fix building with clang 6.0.1 (nw) 2018-07-07 11:28:01 +01:00
Justin Kerk
32ee215a38 Remove -mbig-obj, which breaks the build on Windows clang and is not actually needed now that the emumem files have been split up (nw) 2018-07-07 02:07:13 -07:00
arbee
1c800e0b96 z80scc: Clear tranmitter interrupt if a written byte fills the FIFO. Fixes Apple IIgs problems without breaking Intergraph. [pmackinlay, R. Belmont] 2018-07-06 23:48:15 -04:00
Vas Crabb
27d0cb90ff (nw) well that was dumb - fix crashing ATA devices, slightly modernise some code 2018-07-07 09:37:57 +10:00
Vas Crabb
cecad654da remove more macros (nw) 2018-07-07 05:05:25 +10:00
Vas Crabb
c3fb11c2c9 devcb3
There are multiple issues with the current device callbacks:
* They always dispatch through a pointer-to-member
* Chained callbacks are a linked list so the branch unit can't predict the early
* There's a runtime decision made on the left/right shift direction
* There are runtime NULL checks on various objects
* Binding a lambda isn't practical
* Arbitrary transformations are not supported
* When chaining callbacks it isn't clear what the MCFG_DEVCB_ modifiers apply to
* It isn't possible to just append to a callback in derived configuration
* The macros need a magic, hidden local called devcb
* Moving code that uses the magic locals around is error-prone
* Writing the MCFG_ macros to make a device usable is a pain
* You can't discover applicable MCFG_ macros with intellisense
* Macros are not scoped
* Using an inappropriate macro isn't detected at compile time
* Lots of other things

This changeset overcomes the biggest obstacle to remving MCFG_ macros
altogether.  Essentially, to allow a devcb to be configured, call
.bind() and expose the result (a bind target for the callback).  Bind
target methods starting with "set" repace the current callbacks; methods
starting with "append" append to them.  You can't reconfigure a callback
after resolving it.  There's no need to use a macro matching the
handler signatures - use FUNC for everything.  Current device is implied
if no tag/finder is supplied (no need for explicit this).

Lambdas are supported, and the memory space and offset are optional.
These kinds of things work:
* .read_cb().set([this] () { return something; });
* .read_cb().set([this] (offs_t offset) { return ~offset; });
* .write_cb().set([this] (offs_t offset, u8 data) { m_array[offset] = data; });
* .write_cb().set([this] (int state) { some_var = state; });

Arbitrary transforms are allowed, and they can modify offset/mask for example:
* .read_cb().set(FUNC(my_state::handler)).transform([] (u8 data) { return bitswap<4>(data, 1, 3, 0, 2); });
* .read_cb().set(m_dev, FUNC(some_device::member)).transform([] (offs_t &offset, u8 data) { offset ^= 3; return data; });

It's possible to stack arbitrary transforms, at the cost of compile
time (the whole transform stack gets inlined at compile time).  Shifts
count as an arbitrary transform, but mask/exor does not.

Order of mask/shift/exor now matters.  Modifications are applied in the
specified order.  These are NOT EQUIVALENT:
* .read_cb().set(FUNC(my_state::handler)).mask(0x06).lshift(2);
* .read_cb().set(FUNC(my_state::handler)).lshift(2).mask(0x06);

The bit helper no longer reverses its behaviour for read callbacks, and
I/O ports are no longer aware of the field mask.  Binding a read
callback to no-op is not supported - specify a constant.  The GND and
VCC aliases have been removed intentionally - they're TTL-centric, and
were already being abused.

Other quirks have been preserved, including write logger only logging
when the data is non-zero (quite unhelpful in many of the cases where
it's used).  Legacy syntax is still supported for simple cases, but will
be phased out.  New devices should not have MCFG_ macros.

I don't think I've missed any fundamental issues, but if I've broken
something, let me know.
2018-07-07 02:40:29 +10:00
Patrick Mackinlay
5d9e33b786 nscsi: add support for CD-ROMs with 512-byte blocks (#3727)
* nscsi: add support for CD-ROMs with 512-byte blocks

Older UNIX workstations used SCSI CD-ROM drives with 512-byte logical blocks instead of the now standard 2048. This change makes the block size configurable, and adds logic to translate logical blocks to/from the underlying 2048 byte sectors as needed.

* add support for 512-byte logical blocks
* logmacro.h logging (turned on by default to retain current behaviour)
* added stub for "prevent/allow medium removal" command
* removed some unnecessary state
* minor fix for nscsi_hd "inquiry" command

* minor changes (nw)

* doh (nw)

* this too (nw)
2018-07-06 09:31:29 -04:00
Vas Crabb
ab0f99373d cleanup (nw) 2018-07-06 20:55:59 +10:00
Robbbert
7285b74fc6 (nw) Fixed the build.... hopefully 2018-07-06 20:21:08 +10:00
Patrick Mackinlay
06700b3c52 clipper: minor bugfix (nw) (#3731)
This enables SoftPC to run.
2018-07-06 11:11:13 +02:00
mooglyguy
f3ccd1f7f2 -ps2sony: Various DMA and SIF bug fixes, initial OSDSYS ELF transfers to IOP now, but EE and IOP hang immediately thereafter. nw 2018-07-05 19:04:50 +02:00
Ivan Vangelista
8fe31f857d mappy.cpp: timer_set removal (nw) 2018-07-05 17:07:20 +02:00
Ivan Vangelista
c709bebef0 jangou.cpp: slight improvements to luckygrl decryption (nw) 2018-07-05 16:59:00 +02:00
Ivan Vangelista
009d3f8b1c microtan: device_finder and other minor clean-ups (nw) 2018-07-05 16:54:17 +02:00
Patrick Mackinlay
7bee6e6f1e interpro: CLIX boots (on the ip2000) (#3730)
Too many changes to describe in detail. A rewrite of the interrupt and dma code in the ioga, and fixes to the cpu and mmu were the most important things.
2018-07-05 16:22:05 +02:00
Vas Crabb
d4e6275690 misc cleanup and stuff to make macro removal easier (nw) 2018-07-05 23:05:45 +10:00
ajrhacker
827fbdbc1e
Merge pull request #3728 from pmackinlay/ncr5390
ncr5390: dma fixes again (nw)
2018-07-05 07:59:12 -04:00
mooglyguy
cd4c3b694e ps2sony: Disable debug printing, nw 2018-07-05 13:32:59 +02:00
mooglyguy
9d509bd29c Fix divtlb crash, nw 2018-07-05 13:14:18 +02:00
mooglyguy
ba4f99c559 ps2sony: Added skeleton DMAC, INTC, and SIF devices, nw 2018-07-05 13:14:17 +02:00
Patrick Mackinlay
391f5c9f90 ncr5390: dma fixes again (nw)
After reversing myself on this several times before, I hope I've now finally got it right.
* function/bus complete should proceed when the fifo is empty, to allow devices to send less data than indicated in the transfer count
* raise drq when tcounter = 0 (meaning 65536 bytes)
2018-07-05 15:53:04 +07:00
AJR
790009096b apple2gs.cpp: A neater way of handling shared RAM (nw) 2018-07-04 23:32:29 -04:00
AJR
015d55d8f7 Fix validation of pippin (nw) 2018-07-04 23:27:32 -04:00
arbee
1bb565da36 apple2gs: more savestate fixups (nw) 2018-07-04 19:58:25 -04:00
arbee
dc654b8b0f es5503: fixed bad playback of synthLAB sampled-attack looped-sustain instruments [R. Belmont] 2018-07-04 16:59:04 -04:00
arbee
4cd311a25d apple2gs: fixed save state issues with new driver (nw) 2018-07-04 16:11:46 -04:00
Olivier Galibert
fe6851a2d5 68000: stop the cpu on recursive berr (nw) 2018-07-04 21:14:30 +02:00
arbee
3a482682cc apple2gs: fixed issues with Jam Session and ACS Demo Disk #2 [R. Belmont] 2018-07-04 12:09:50 -04:00
Olivier Galibert
5725df5542 *DUH* (nw) 2018-07-04 16:44:43 +02:00
Ivan Vangelista
8b9bf4ed75
goldstar.cpp: feverch has a 3rd SN76489 (nw) 2018-07-04 14:00:21 +02:00
AJR
f7e5fbdd2e mac.cpp, macpci.cpp: Eliminate machine().device (nw)
undrfire.h: Fix minor mistake (nw)
2018-07-04 07:54:22 -04:00
AJR
8190d3b13e megazone: Eliminate machine().device (nw) 2018-07-04 07:24:36 -04:00
Vas Crabb
5ba14be3b9 misc cleanup (nw) 2018-07-04 21:17:38 +10:00
Ivan Vangelista
9d1b5aa941
goldstar.cpp: fixed my typo, feverch doesn't have multiplexed inputs (nw) 2018-07-04 12:02:48 +02:00
Olivier Galibert
5d04fdd06a Ensure split accesses are always done in increasing addresses order (nw) 2018-07-04 10:07:40 +02:00
Robbbert
0ae1c2aaa5 (nw) fixed validation error 2018-07-04 17:57:55 +10:00
Robbbert
f3b71f071b (nw) protected is needed for derived classes 2018-07-04 17:30:09 +10:00
braintro
a227a38081 tatsumi.cpp: Fix minor commit issue (nw) 2018-07-03 23:08:17 -05:00