Commit Graph

10 Commits

Author SHA1 Message Date
Fabio Priuli
42e9ddf60d added save states to the following CPU: apexc, asap, avr8, cp1610, dsp32 and f8 [Fabio Priuli] 2010-04-27 09:09:41 +00:00
Aaron Giles
a91446eaca Cleanups and version bump. 2010-03-25 13:18:38 +00:00
Ryan Holtz
5d5ec72024 Slightly fixed interrupt handling and added SBIC and MUL opcodes to the Atmel AVR8 core. [Harmony]
Added FJMP/JMPF opcode to the SunPlus u'nSP core. [Segher, Harmony]

Performed an initial code cleanup pass on the N64 rendering code to make use of booleans and inline variable instantiation, and removed a number of unused variables that were exposed as a result of the latter. [Harmony]
2010-03-11 06:49:53 +00:00
Aaron Giles
1a2c20441f Remove some aliases between CPUINFO_ and DEVINFO_ to help clarify
usage.

Also converted a few more places to use the new accessors.
2010-01-21 06:05:57 +00:00
Aaron Giles
e738b79785 Correct a long-standing design flaw: device configuration state
is now separate from runtime device state. I have larger plans
for devices, so there is some temporary scaffolding to hold
everything together, but this first step does separate things
out.

There is a new class 'running_device' which represents the
state of a live device. A list of these running_devices sits
in machine->devicelist and is created when a running_machine
is instantiated.

To access the configuration state, use device->baseconfig()
which returns a reference to the configuration.

The list of running_devices in machine->devicelist has a 1:1
correspondance with the list of device configurations in
machine->config->devicelist, and most navigation options work
equally on either (scanning by class, type, etc.)

For the most part, drivers will now deal with running_device
objects instead of const device_config objects. In fact, in
order to do this patch, I did the following global search &
replace:

  const device_config -> running_device
  device->static_config -> device->baseconfig().static_config
  device->inline_config -> device->baseconfig().inline_config

and then fixed up the compiler errors that fell out.

Some specifics:

  Removed device_get_info_* functions and replaced them with
  methods called get_config_*.
  
  Added methods for get_runtime_* to access runtime state from
  the running_device.
  
  DEVICE_GET_INFO callbacks are only passed a device_config *.
  This means they have no access to the token or runtime state
  at all. For most cases this is fine.
  
  Added new DEVICE_GET_RUNTIME_INFO callback that is passed
  the running_device for accessing data that is live at runtime.
  In the future this will go away to make room for a cleaner
  mechanism.
  
  Cleaned up the handoff of memory regions from the memory
  subsystem to the devices.
2010-01-18 09:34:43 +00:00
Aaron Giles
470f843262 Within src/emu, basic conversions:
devtag_get_device ... machine->device()
  memory_find_address_space ... device->space()
2010-01-12 06:54:57 +00:00
Aaron Giles
4498faacd9 First round of an attempted cleanup of header files in the system.
- Created new central header "emu.h"; this should be included
    by pretty much any driver or device as the first include. This
    file in turn includes pretty much everything a driver or device
    will need, minus any other devices it references. Note that
    emu.h should *never* be included by another header file.
 - Updated all files in the core (src/emu) to use emu.h.
 - Removed a ton of redundant and poorly-tracked header includes
    from within other header files.
 - Temporarily changed driver.h to map to emu.h until we update
    files outside of the core.

Added class wrapper around tagmap so it can be directly included
and accessed within objects that need it. Updated all users to
embed tagmap objects and changed them to call through the class.

Added nicer functions for finding devices, ports, and regions in
a machine:

   machine->device("tag") -- return the named device, or NULL
   machine->port("tag") -- return the named port, or NULL
   machine->region("tag"[, &length[, &flags]]) -- return the
      named region and optionally its length and flags
      
Made the device tag an astring. This required touching a lot of 
code that printed the device to explicitly fetch the C-string
from it. (Thank you gcc for flagging that issue!)
2010-01-10 00:29:26 +00:00
Ryan Holtz
b54790792a Fixed numerous opcodes in the AVR8 core [Harmony]
Fixed a register naming issue in the MIPS core [Harmony]
Numerous SuperFX updates: [Harmony]
 - Hooked up RAM and ROM buffering
 - Inlined several more functions
 - Removed debug spew
 - Added the ability to define an external IRQ line callback, and hooked it up to the 65C816
 - Fixed flag calculation for HIB opcode
 - Hooked SuperFX chip up to the SNES machine driver
2009-09-03 23:53:43 +00:00
Aaron Giles
2577a0b22d Another step. Moved the address-space related get_info constants
to devintrf (including endianness). Removed space array from the
CPU class header. Made the memory system much more device-neutral.
Various other cleanups along the way.
2009-07-08 16:20:01 +00:00
Ryan Holtz
c2965b8335 Added extremely rudimentary Atmel 8-bit AVR CPU core, missing most opcodes and any attempt at proper cycle counts. [MooglyGuy] 2009-06-20 12:13:48 +00:00