Commit Graph

29 Commits

Author SHA1 Message Date
Curt Coder
ada07d7415 cdp1802: devcb2. (nw) 2014-02-26 16:10:25 +00:00
Curt Coder
9e8a7f19b1 cdp1802: devcb for the state codes. (nw) 2014-02-25 22:24:52 +00:00
Curt Coder
846c70bee9 License tags. (nw) 2013-10-16 13:38:21 +00:00
Miodrag Milanovic
df6263652b did modern cpu cores as well (nw) 2013-06-21 19:22:25 +00:00
Curt Coder
725996afbd (MESS) Added skeleton driver for RCA COSMAC Microkit. [Bill Degnan, Curt Coder]
cosmac: Added the original CDP1801 CPU variant and rewrote the disassembler. [Curt Coder]
2013-05-11 10:24:25 +00:00
Oliver Stöneberg
a7390ec3c9 [COSMAC] R registers are supposed to contain random data on start-up (nw) 2013-03-10 21:25:08 +00:00
Oliver Stöneberg
f36544c50b fixed uninitialized members in src/emu/cpu/cosmac/cosmac.c (nw) 2013-03-09 09:32:34 +00:00
smf-
62ba32cb4f pass this instead of NULL and options instead of 0 in the class based cpu cores (nw) 2013-03-06 14:10:52 +00:00
Oliver Stöneberg
87a550835c fixed uninitialized variable in src/emu/cpu/cosmac/cosmac.c (nw) 2013-02-16 15:57:29 +00:00
Miodrag Milanovic
0e19f641d3 Cleanups and version bump 2013-01-11 07:32:46 +00:00
Curt Coder
dd8e213913 (MESS) comx35: FDC WIP. (nw) 2012-12-11 20:08:52 +00:00
Curt Coder
491d28aba0 cosmac: Added missing IRQ acknowledges. [Curt Coder] 2012-11-07 15:29:29 +00:00
Aaron Giles
621ac620ae Since nobody checks for NULLs anyway, make
device_memory_interface::space() assert against NULL and
return a reference, and pushed references throughout all 
address space usage in the system. Added a has_space() 
method to check for those rare case when it is ambiguous.
[Aaron Giles]

Also reinstated the generic space and added fatal error
handlers if anyone tries to actually read/write from it.
2012-09-19 19:48:09 +00:00
Oliver Stöneberg
9ef51b6bcd added missing \n to some fatalerror() calls (no whatsnew) 2012-09-07 19:46:27 +00:00
Angelo Salese
192c9e04f5 Clean-ups and version bump 2011-07-11 19:36:26 +00:00
Curt Coder
5bdbd34778 Fixed COSMAC CPU debugger PC. [Curt Coder] 2011-06-29 07:47:50 +00:00
Curt Coder
87aa62c30a Added missing COSMAC CPU configurations. (nw) 2011-05-22 09:12:31 +00:00
Aaron Giles
722631601e Reimplemented devcb using delegates and classes. Unified the logic
for identifying targets and simplified the code. [Aaron Giles]

I have some further ideas but this is a good midway point.
2011-05-02 03:32:58 +00:00
Aaron Giles
919913f118 Collapsed device_config and device_t into one class. Updated all
existing modern devices and the legacy wrappers to work in this
environment. This in general greatly simplifies writing a modern
device. [Aaron Giles]

General notes:
 * some more cleanup probably needs to happen behind this change,
   but I needed to get it in before the next device modernization 
   or import from MESS  :)

 * new template function device_creator which automatically defines
   the static function that creates the device; use this instead of
   creating a static_alloc_device_config function

 * added device_stop() method which is called at around the time
   the previous device_t's destructor was called; if you auto_free
   anything, do it here because the machine is gone when the 
   destructor is called

 * changed the static_set_* calls to pass a device_t & instead of
   a device_config *

 * for many devices, the static config structure member names over-
   lapped the device's names for devcb_* functions; in these cases
   the members in the interface were renamed to have a _cb suffix

 * changed the driver_enumerator to only cache 100 machine_configs
   because caching them all took a ton of memory; fortunately this
   implementation detail is completely hidden behind the 
   driver_enumerator interface

 * got rid of the macros for creating derived classes; doing it
   manually is now clean enough that it isn't worth hiding the
   details in a macro
2011-04-27 05:11:18 +00:00
Aaron Giles
fecfc465df Switch from m_machine to machine() everywhere. In some cases this
meant adding a machine() accessor but it's worth it for consistency.
This will allow future changes from reference to pointer to happen
transparently for devices. [Aaron Giles]

Simple S&R:
m_machine( *[^ (!=;])
machine()\1
2011-04-18 20:06:43 +00:00
Aaron Giles
2ad5072023 BIG update.
Remove redundant machine items from address_space and device_t.
Neither machine nor m_machine are directly accessible anymore.
Instead a new getter machine() is available which returns a
machine reference. So:

  space->machine->xxx   ==>  space->machine().xxx
  device->machine->yyy  ==>  device->machine().yyy

Globally changed all running_machine pointers to running_machine
references. Any function/method that takes a running_machine takes
it as a required parameter (1 or 2 exceptions). Being consistent
here gets rid of a lot of odd &machine or *machine, but it does
mean a very large bulk change across the project.

Structs which have a running_machine * now have that variable
renamed to m_machine, and now have a shiny new machine() method
that works like the space and device methods above. Since most of
these are things that should eventually be devices anyway, consider
this a step in that direction.

98% of the update was done with regex searches. The changes are
architected such that the compiler will catch the remaining
errors:

// find things that use an embedded machine directly and replace
// with a machine() getter call
S: ->machine->
R: ->machine\(\)\.

// do the same if via a reference
S: \.machine->
R: \.machine\(\)\.

// convert function parameters to running_machine &
S: running_machine \*machine([^;])
R: running_machine \&machine\1

// replace machine-> with machine.
S: machine->
R: machine\.

// replace &machine() with machine()
S: \&([()->a-z0-9_]+machine\(\))
R: \1

// sanity check: look for this used as a cast
(running_machine &)
// and change to this:
*(running_machine *)
2011-03-29 15:50:04 +00:00
Aaron Giles
202d7680a4 Created new enum type address_spacenum for specifying an address
space by index. Update functions and methods that accepted an
address space index to take an address_spacenum instead. Note that
this means you can't use a raw integer in ADDRESS_SPACE macros, so
instead of 0 use the enumerated AS_0.

Standardized the project on the shortened constants AS_* over the
older ADDRESS_SPACE_*. Removed the latter to prevent confusion.
Also centralized the location of these definitions to memory.h.
2011-03-27 07:37:24 +00:00
Miodrag Milanovic
fd5b5140a5 Removed short name as parameter from device_config this way it is not mandatory any more.
Most of files is rolled back to previous state. (no whatsnew)
2011-02-11 10:10:39 +00:00
Miodrag Milanovic
601056b130 - Added shortname to devices in order to make ROM loading per device possible. [Miodrag Milanovic]
- Updated all devices containing ROM regions to have short names and all modern devices too
- Created new validation to check existence of short name if device contain ROM region defined
2011-02-10 19:08:37 +00:00
Aaron Giles
c7ff741eb9 Define new macro ALLOW_SAVE_TYPE which can be used to declare enums as
valid save types on a case-by-case basis.

Updated the cosmac CPU core to do this for its mode and state enums,
which were previously failing.
2011-02-10 07:25:44 +00:00
Aaron Giles
a38c67f27b Get rid of state_save_register_device_* macros in favor of direct
calls on the device object.

Regex used:

state_save_register_device_item( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)

state_save_register_device_item_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)

state_save_register_device_item_2d_array( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\6\),\5\4\7\)

state_save_register_device_item_bitmap( *)\(( *)([^,]+), *([^,]+),( *)([^ )]+)( *)\)
\3->save_item\1\(\2NAME\(\*\6\),\5\4\7\)

state_save_register_device_item_pointer( *)\(( *)([^,]+), *([^,]+),( *)([^,]+), *([^ )]+)( *)\)
\3->save_pointer\1\(\2NAME\(\6\),\5\7,\5\4\8\)

this->save_
save_

(save_item[^;]+), *0( *)\);
\1\2\);

(save_pointer[^;]+), *0( *)\);
\1\2\);
2011-02-09 05:51:04 +00:00
Aaron Giles
3ae00656d4 Cleanups and version bump. 2010-10-21 06:01:17 +00:00
Curt Coder
aa8bd5fbd3 Refactored the CDP1869 chip into a C++ device. [Curt Coder] 2010-10-19 13:03:57 +00:00
Curt Coder
3c3f26a66f Converted the RCA CDP1802 CPU into a C++ device. Refactored cidelsa.c to use the new RCA COSMAC CPU. [Curt Coder] 2010-10-18 12:13:58 +00:00