Commit Graph

44 Commits

Author SHA1 Message Date
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
Patrick Mackinlay
12f3b9f8a7 interpro: lle keyboard working (#3608)
* interpro: lle keyboard working

* lle keyboard working, mapping incomplete
* slow down cpu, fixes keyboard boot and graphic glitching
* remove unnecessary reset suspend/timer
* 6700/6800 eprom confirmed to match 2700/2800
* fix line clipping crash and remove noisy logging

* interpro: don't use UCHAR_MAMEKEY (nw)
2018-05-25 13:40:59 -04:00
Patrick Mackinlay
57e1642983 clipper: two more instructions (nw)
Implemented two compare and delayed branch instructions based on observed use in system software. No documentation has been found for these and other C400 instructions.
2018-05-09 10:56:04 +07:00
Patrick Mackinlay
e50bff084d interpro: minor changes (nw)
* debugger address translation
* documentation edits
2018-04-12 23:00:42 +10:00
Patrick Mackinlay
20c7f769e1 clipper: minor improvements (nw) (#3400)
* clipper: minor improvements (nw)

* save all state
* improve multiply instructions, add condition codes
* fix register pair load/store
* clean up pc handling
* switch to C++ cast syntax, other minor formatting

* clipper: oops (nw)

* clipper: double oops (nw)
2018-03-30 15:17:17 -04:00
Vas Crabb
010155a3c5 Reshuffle some stuff:
* Move around the debugger hooks to get a small but measurable performance increase
* Remove emucore from external tools
* Improve performance of DSP16 interpreter a little by generating six variants of execution loop
2018-03-28 05:25:15 +11:00
Vas Crabb
8142f24c43 don't pass so many naked pointers around (nw) 2018-03-25 01:44:45 +11:00
Patrick Mackinlay
421d6dd2cc interpro: various improvements
Many changes, most notable end result is the ability to boot the "blue screen" rebuild floppy, and nearly booting CLIX (hangs trying to mount the filesystems).

Summary of changes:
* added a softlist
* refactored cpu/mmu memory access
* added alignment faults
* implemented most c400 instructions
* fixed wait instruction
* corrections to interpro driver
* removed broken forced interrupt handling
* added support for dma virtual addressing
2018-02-27 17:54:29 +07:00
Patrick Mackinlay
3c36e304ed interpro: cpu and mmu improvements
* implemented most clipper cpu and mmu exceptions
* completed c300 instructions, adjusted for c400
* improved cammu dynamic translation and added faults
* refactored c300 cammu into separate instruction/data instances
* configurable ioga and sr bus memory access
2017-11-27 13:48:33 +07:00
Olivier Galibert
6caef2579a dvdisasm: Overhaul [O. Galibert]
Disassemblers are now independant classes.  Not only the code is
cleaner, but unidasm has access to all the cpu cores again.  The
interface to the disassembly method has changed from byte buffers to
objects that give a result to read methods.  This also adds support
for lfsr and/or paged PCs.
2017-11-26 17:41:27 +01:00
Patrick Mackinlay
3873ba65ad clipper: no unions (nw) 2017-11-17 17:11:57 +07:00
Patrick Mackinlay
b1e0fad856 clipper: floating point improvements
* switched to softfloat for fp
* implemented fp macro instructions
* implemented fp exceptions and rounding
2017-11-17 15:17:51 +07:00
AJR
c6b2edfa89 Explicitly allow floating point values for state registers
Note that the internal debugger's expression interpreter is not set up to handle floating point values at all, so they remain disabled there.
2017-10-13 07:24:48 -04:00
AJR
f2dac42df3 Temporarily remove floating-point state registration (nw) 2017-10-13 04:39:59 -04:00
Patrick Mackinlay
8a692c3628 clipper: interrupt handling fixes
* improve interrupt vector handling
* fix C300 interrupt entry and stack frame
* fix pushw where source register is same as stack register
* switch to logmacro.h logging
2017-09-05 17:45:17 +07:00
Patrick Mackinlay
fcd7667008 clipper: popw fix (nw) 2017-07-20 00:17:53 +10:00
Vas Crabb
536b2153d9 make device_memory_interface slightly less of a special case, use a typedef to avoid nested templates everywhere (nw) 2017-07-10 19:35:07 +10:00
Olivier Galibert
cbbbd07484 dimemory: Lift the cap on the number of address spaces per device [O. Galibert] 2017-07-03 08:03:57 +02:00
Patrick Mackinlay
98c5240869 minor fixes 2017-06-20 19:04:27 +07:00
Patrick Mackinlay
4da908aae7 added cpu id support 2017-06-07 13:28:19 +07:00
Patrick Mackinlay
cece32b2b8 fix some log messages 2017-05-23 18:47:30 +07:00
Vas Crabb
0f0d39ef81 Move static data out of devices into the device types. This is a significant change, so please pay attention.
The core changes are:
* Short name, full name and source file are no longer members of device_t, they are part of the device type
* MACHINE_COFIG_START no longer needs a driver class
* MACHINE_CONFIG_DERIVED_CLASS is no longer necessary
* Specify the state class you want in the GAME/COMP/CONS line
* The compiler will work out the base class where the driver init member is declared
* There is one static device type object per driver rather than one per machine configuration

Use DECLARE_DEVICE_TYPE or DECLARE_DEVICE_TYPE_NS to declare device type.
* DECLARE_DEVICE_TYPE forward-declares teh device type and class, and declares extern object finders.
* DECLARE_DEVICE_TYPE_NS is for devices classes in namespaces - it doesn't forward-declare the device type.

Use  DEFINE_DEVICE_TYPE or DEFINE_DEVICE_TYPE_NS to define device types.
* These macros declare storage for the static data, and instantiate the device type and device finder templates.

The rest of the changes are mostly just moving stuff out of headers that shouldn't be there, renaming stuff for consistency, and scoping stuff down where appropriate.

Things I've actually messed with substantially:
* More descriptive names for a lot of devices
* Untangled the fantasy sound from the driver state, which necessitates breaking up sound/flip writes
* Changed DECO BSMT2000 ready callback into a device delegate
* Untangled Microprose 3D noise from driver state
* Used object finders for CoCo multipak, KC85 D002, and Irem sound subdevices
* Started to get TI-99 stuff out of the TI-990 directory and arrange bus devices properly
* Started to break out common parts of Samsung ARM SoC devices
* Turned some of FM, SID, SCSP DSP, EPIC12 and Voodoo cores into something resmbling C++
* Tried to make Z180 table allocation/setup a bit safer
* Converted generic keyboard/terminal to not use WRITE8 - space/offset aren't relevant
* Dynamically allocate generic terminal buffer so derived devices (e.g. teleprinter) can specify size
* Imporved encapsulation of Z80DART channels
* Refactored the SPC7110 bit table generator loop to make it more readable
* Added wrappers for SNES PPU operations so members can be made protected
* Factored out some boilerplate for YM chips with PSG
* toaplan2 gfx
* stic/intv resolution
* Video System video
* Out Run/Y-board sprite alignment
* GIC video hookup
* Amstrad CPC ROM box members
* IQ151 ROM cart region
* MSX cart IRQ callback resolution time
* SMS passthrough control devices starting subslots

I've smoke-tested several drivers, but I've probably missed something.  Things I've missed will likely blow up spectacularly with failure to bind errors and the like.  Let me know if there's more subtle breakage (could have happened in FM or Voodoo).

And can everyone please, please try to keep stuff clean.  In particular, please stop polluting the global namespace.  Keep things out of headers that don't need to be there, and use things that can be scoped down rather than macros.
It feels like an uphill battle trying to get this stuff under control while more of it's added.
2017-05-14 21:44:11 +10:00
Vas Crabb
e0ee20fbd4 fix some device validation errors, also fix uninitialised members in some devices using constructor delegation (nw) 2017-03-03 23:32:59 +11:00
Vas Crabb
6c23897483 Self-registering devices prep:
* Make device_creator a variable template and get rid of the ampersands
* Remove screen.h and speaker.h from emu.h and add where necessary
* Centralise instantiations of screen and speaker finder templates
* Add/standardise #include guards in many hearers
* Remove many redundant #includes
* Order #includesr to help catch headers that can't be #included alone

(nw) This changes #include order to be prefix, unit header if applicable
then other stuff roughly in order from most dependent to least dependent
library.  This helps catch headers that don't #include things that they
use.
2017-02-27 22:57:14 +11:00
Vas Crabb
8f15315a52 srcclean (nw) 2017-02-19 11:40:55 +11:00
arbee
dc374ba4b6 clipper: portableize compile, reenable ip2800 driver (nw) 2017-01-24 21:40:14 -05:00
Patrick Mackinlay
24dba19f8c tidy up for pull request 2017-01-24 20:19:26 +07:00
Patrick Mackinlay
4ae52c2441 split instruction/data, fix unaligned insn fetch 2017-01-18 01:16:18 +08:00
Patrick Mackinlay
6c77efba69 fix instruction fetch alignment 2017-01-17 17:39:12 +08:00
Patrick Mackinlay
10ac8f7093 preparation for tlb/mmu support 2017-01-16 17:55:23 +08:00
Patrick Mackinlay
afba2ca5fb improved condition codes, removed bitfields 2017-01-13 14:34:59 +07:00
Patrick Mackinlay
f203422869 improved register handling 2017-01-12 13:33:30 +07:00
Patrick Mackinlay
6e0ca72023 arithmetic shift flags 2017-01-12 11:54:29 +07:00
Patrick Mackinlay
b31e3f8c13 fixed logical shifts, removed unneeded int32_t casts 2017-01-11 19:01:50 +07:00
Patrick Mackinlay
a6fff3dbb9 implement condition codes for rot and shl 2017-01-11 14:22:58 +07:00
Patrick Mackinlay
e8c260c9ba tidy up bitfield naming 2017-01-09 11:17:13 +07:00
Patrick Mackinlay
c8f4403de6 more interrupt handling improvements 2017-01-04 15:15:29 +07:00
Patrick Mackinlay
4ebd7f9bd8 improved nmi/irq handling 2017-01-04 09:35:30 +07:00
Patrick Mackinlay
f22f226f5e soft reset, mac address, rtc fixes 2016-12-28 21:08:11 +07:00
Patrick Mackinlay
1180dcfc36 fix for default parameter values 2016-12-28 15:38:25 +07:00
Patrick Mackinlay
8b3a5e77b7 improved exception handling, more condition code work 2016-12-28 15:32:23 +07:00
Patrick Mackinlay
218cd0355c instruction decoding and condition code improvements 2016-12-28 13:02:48 +07:00
Patrick Mackinlay
380463f54a general tidy up, added some additional instructions 2016-12-27 19:52:38 +07:00
Patrick Mackinlay
f4f7d659a1 initial commit 2016-12-27 11:24:33 +07:00