Commit Graph

931 Commits

Author SHA1 Message Date
Aaron Giles
4b7dd3cd0d Cleanups and version bump for 0.131. 2009-04-23 05:44:35 +00:00
Wilbert Pol
9d13bdc37a More fixes for the CPD and CPI instructions in the TLCS-900/H core. 2009-04-21 18:30:48 +00:00
Wilbert Pol
f99e4666b9 Fixed operation of TLCS-900/H CPD and CPI instructions. 2009-04-21 17:55:35 +00:00
Wilbert Pol
4f2a65da42 Added Toshiba TLCS-900/H cpu core. 2009-04-20 16:49:10 +00:00
Aaron Giles
3ad403ee61 Fixed XF flag. 2009-04-20 05:39:05 +00:00
Aaron Giles
c0e9a1a10c Fix MT 3065/3069 2009-04-11 16:36:21 +00:00
Fabio Priuli
a47d3f01fa Fixed CPU_GET_INFO issues spotted by -validate in MESS debug build 2009-04-11 14:06:24 +00:00
Aaron Giles
09aefa1379 Changed Z80 cycle table definitions to be per-device. Removed
old set_info constants for the tables; they are now set up via
the z80_set_cycle_tables function.
2009-04-04 22:43:56 +00:00
Curt Coder
f336a88493 Removed invalid email address. 2009-03-30 13:23:13 +00:00
Olivier Galibert
8901b0bd95 tms32025: Fix timings, hopefully 2009-03-30 12:13:34 +00:00
Aaron Giles
9c63c95043 Cleanups and version bump. 2009-03-28 22:10:55 +00:00
Olivier Galibert
945137c696 TMS320C25 fixes and enhancements:
- accept IRQs on IDLE
  - actually count irq processing and instruction fetching cycles
  - add support for external serial frame sync with internal
    triggering (aka TXM=1 and FSM=1).
2009-03-26 00:08:37 +00:00
davidhay
64d977ed46 crude 'good enough for naomi gd-rom' MMU implementation
save JVS eeprom settings.
2009-03-25 21:28:39 +00:00
Wilbert Pol
a35ef58b54 CPU cores are now enabled on a per cpu core family basis instead of per cpu core variant. As a result CPUDEFS is no longer needed in the makefile. 2009-03-25 19:39:41 +00:00
Angelo Salese
6b27889b99 Added a preliminary implementation for the SLEEP opcode in SH-4 cpu. This fixes Quiz Keitai Q Mode booting [Angelo Salese] 2009-03-24 14:00:22 +00:00
Luca Elia
c5da27ead9 Fixed pending IRQs handling in the TLCS-90 CPU core [Luca Elia]
New games added or promoted from NOT_WORKING status
---------------------------------------------------
Mahjong Vegas (unprotected set) [Luca Elia, Uki]
2009-03-23 21:26:46 +00:00
davidhay
663bc8a8cd fatalerror if the SH4 mmu is turned on.
looks like quite a few NaomiGDs need it.. Ikaruga, Border Down, Senko etc. etc.
2009-03-21 19:33:39 +00:00
Aaron Giles
bbcad98b5a Last-minute fix. 2009-03-19 07:44:48 +00:00
Aaron Giles
3b302a8bae Cleanups and version bump. 2009-03-19 07:28:58 +00:00
R. Belmont
5c8f9fb570 MIPS III: Update RA before executing the delay slot. 2009-03-19 02:34:15 +00:00
Aaron Giles
19a6f4d51b Compile fix. 2009-03-15 22:33:06 +00:00
Aaron Giles
46494694d1 CPU cores now compile cleanly. 2009-03-15 17:12:40 +00:00
R. Belmont
e2df23829c Add specific support for NEC VR4300/4310 CPUs
The 4300 was used on the N64 and Aleck64, and the 4310 on the IT Eagle boards.  COP0 is slightly non-standard on these chips.
2009-03-14 14:44:22 +00:00
Aaron Giles
32bc986ec0 Moved some of the CPU cores over to use get_safe_token like other devices.
Also cleaned them so they compile.
2009-03-12 16:54:49 +00:00
Aaron Giles
475762a3fd Sound cores compile cleanly. 2009-03-12 15:25:58 +00:00
Aaron Giles
eb539cce9d Many casts added to the core files, and various other tweaks
to make them compile as either C or C++.
2009-03-12 07:43:03 +00:00
smf-
8e2173e06e fixed disassembly of -$8000, it was showing up as -$0 2009-03-08 09:19:49 +00:00
Aaron Giles
43730cc591 Fixed bug that caused 64-bit PowerPC systems to fetch opcodes in the wrong order. 2009-03-07 23:18:36 +00:00
Aaron Giles
a97f308b83 Converted PowerPC SET_INFOs to direct calls. 2009-03-07 22:59:34 +00:00
Olivier Galibert
27fbe59291 tms57002: Add two missing instructions and hack up the coef update.
The real way coefficient updates are handled is a little too complex
for now, but the hack throttles the update speed to the real rate
given the way konami uses it (once per sync).  It's near impossible to
use it in a different way anyway.

Fixes mantis 2941 (at least for puzldama) and maybe 2953 (needs to
find the roms and test).
2009-03-07 19:41:14 +00:00
Aaron Giles
75f0ff10d1 Added function calls to replace the MIPS3 DRC's various CPU_SET_INFO
bits.

Fixed DCS2 speedup handler so it doesn't get lost during a memory
remap.
2009-03-07 08:54:03 +00:00
Aaron Giles
3b34b6b8b4 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, February 28, 2009 3:53 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static/const qualifiers

Hi mamedev,

Another round of static/const qualifier additions, plus a rename of 
has_addon_chip to snes_has_addon_chip.  Notably a number of z80ctc_interface 
are now const (devicification must have removed the cases where it was 
dynamically modified).  Notice that the READWRITExTOy macros declare two 
functions, so you can't make the 2nd function static.  Those macros should 
probably be reworked or removed.

~aa
2009-03-05 08:24:08 +00:00
Olivier Galibert
e2f25afebf tms57002 - don't abort on unimplemented instructions
Pop up a message instead, hopefully they'll still find their way in
mantis without breaking the game this time.
2009-03-04 18:01:11 +00:00
Olivier Galibert
9bcbadbd0a maketms: Free strings on exit.
This patch will make happier the environments that do not know that
"still reachable" and "leaked" are not the same thing and that exit()
is a _very_ good deallocator.
2009-03-04 16:43:58 +00:00
Aaron Giles
b259386789 Moved SH2 set info functions to direct calls. 2009-03-03 16:22:18 +00:00
Aaron Giles
1dcd75d039 Removed device types from device queries that use tags, under the
assumption that all device tags are unique. Specifically, the
following no longer need to provide a device type:

   AM_DEVREAD/WRITE
   DEVCB_DEVICE_HANDLER
   devtag_get_device
   devtag_reset
   device_list_find_by_tag

as well as several device interfaces that referenced other devices.

Also fixed assertion due to overflow in the recent sound fix.
2009-03-02 10:59:37 +00:00
Aaron Giles
e2757c60d2 Modified the makefile to support experimental optional C++
compilation:
 - new option CPP_COMPILE to trigger this (off by default)
 - split CFLAGS into common, C-only, and C++-only flags
 - when enabled, CPP_COMPILE causes 'pp' to be appended to 
    the target name

NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY 
YET. IT IS JUST AN EXPERIMENT.

Modified lib.mak to always build zlib/expat as C regardless 
of CPP_COMPILE.

Modified windows.mak to fix warnings with MAXOPT=1, and to 
leverage the new CFLAGs definitions.

Modified vconv.c to do appropriate conversions for new C++ 
options.

Updated sources so that libutil, libocore (Windows), and 
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.

Fixed a few more general obvious problems at random 
locations in the source:
 - device->class is now device->devclass
 - TYPES_COMPATIBLE uses typeid() when compiled for C++
 - some functions with reserved names ('xor' in particular)
    were renamed
 - nested enums and structs were pulled out into separate
    definitions (under C++ these would need to be scoped to
    be referenced)
 - TOKEN_VALUE cannot use .field=x initialization in C++ :(
2009-02-28 22:10:06 +00:00
Aaron Giles
864560d4af From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Monday, February 16, 2009 7:10 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add some missing static qualifiers

Hi mamedev,

This patch mostly adds missing static qualifiers, plus a few related header/name adjustments.  In particular, I tackled m68kmake.c and tmsmake.c which exposed a fair amount of dead code.

~aa
2009-02-26 08:52:27 +00:00
Aaron Giles
6ad69291a8 02930: cpu.mak typo and fix 2009-02-26 08:20:18 +00:00
Aaron Giles
cef6764910 Cleanups and version bump. 2009-02-17 15:31:20 +00:00
Aaron Giles
c1c2fc33b3 Changed aborts() to fatalerror() so they don't foul up the regression test runs. 2009-02-16 18:24:48 +00:00
Aaron Giles
5cb6bf00e9 Ok, this is The Big One.
Please note: regression testing is in progress, but the first round 
of glaring regressions have already been taken care of. That said, 
there is likely to be a host of regressions as a result of this 
change.

Also note: There are still a few rough edges in the interfaces. I
will try to clean them up systematically once the basic system is
working.

All sound chips are now proper devices.

Merged the sound chip interface into the device interface,
removing any differences (such as the whole ALIASing concept).

Modified every sound chip in the following ways:
 * updated to match the device interface
 * reduced read/write handlers down to the minimal number
 * added the use of get_safe_token() for ensuring correctness
 * other minor cleanup

Removed the custom sound device. The additional work to just make
custom sound cases into full devices is minimal, so I just converted
them all over to be actual devices.

Vastly simplified the sound interfaces, removing the ghastly
sndti_* business and moving everyone over to using tags for
sound identity. sndintrf, like cpuintrf, is now just a header
file with no implementation.

Modified each and every driver that references a sound chip:
 * all memory maps explicitly reference the targeted device via
    AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE
 * 16-bit and 32-bit accesses to 8-bit chips no longer use
    trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE
    macros
 * all references to sound chips are now done via tags
 * note that these changes are brute force, not optimal; in many
    cases drivers should grab pointers to devices in MACHINE_START
    and stash them away
2009-02-11 19:48:39 +00:00
Angelo Salese
790edbb11b Small bugfix for an SH-2 logging message. 2009-02-08 02:21:02 +00:00
Phil Bennett
991f93ce76 Revert _strdup back to strdup 2009-02-07 20:29:53 +00:00
Phil Bennett
e4f2c2494c Fixed MSVC build. 2009-02-07 18:50:40 +00:00
davidhay
845e4900b3 TMS57002 preliminary implementation [Olivier Galibert] 2009-02-06 22:50:40 +00:00
Angelo Salese
0df8d36d7c 02897: soldivid: Audio regression (David Haywood) 2009-02-04 17:08:31 +00:00
R. Belmont
1c5a8cb1bf Improve disassembly of R3000 code that uses the TLB or FPU 2009-02-02 00:48:36 +00:00
Luca Elia
ecd97d30ce Implemented a few more H8/3xx instructions, and added funcube to seta2.c [Luca Elia]
New games added or promoted from NOT_WORKING status
---------------------------------------------------
Funcube 2 [Luca Elia]
Funcube 4 [Luca Elia]
2009-01-28 19:44:29 +00:00
Phil Bennett
a016e312af New clones added
-----------------
Turbo Sub (prototype rev. TSC7) [Jay Gallagher]
2009-01-24 14:16:51 +00:00
R. Belmont
51b91e9692 Fix big endian compile/link. 2009-01-22 03:13:55 +00:00
Aaron Giles
aad099ad00 DRC frontends must do their own opcode fetching unfortunately. Updated all
DRC cores to do this. Also tweaked a few oddities in the SH2 DRC.
2009-01-18 00:39:40 +00:00
Aaron Giles
eb8366c740 Added new #define ENDIANNESS_NATIVE, which maps to either ENDIANNESS_LITTLE
or ENDIANNESS_BIG based on the LSB_FIRST definition. Unlink LSB_FIRST,
ENDIANNESS_NATIVE always exists and can be used in expressions without
invoking the preprocessor.

Added macro ENDIAN_VALUE_LE_BE() which selects one of two values based
on the endianness passed in. Also added NATIVE_ENDIAN_VALUE_LE_BE()
which calls ENDIAN_VALUE_LE_BE with ENDIANNESS_NATIVE.

Updated a number of drivers and call sites to use these macros in favor
of #ifdef LSB_FIRST.
2009-01-17 23:03:17 +00:00
Wilbert Pol
850b8d37ba Fixed cpu reset for upd78c06. 2009-01-17 16:36:34 +00:00
Wilbert Pol
dd4b5dbe5f Improved implementations for undocumented instructions 63, 67, 6f, 73, 77, 7b, 7f, 9c, 9e, ab, e3, e7, ef, f3, f7, fb, and ff in the n2a3 cpu core. 2009-01-17 10:13:13 +00:00
Aaron Giles
7f2e4e19be Cleanups and version bump. 2009-01-15 08:33:24 +00:00
Andrew Gardner
6ea9ca0589 Virtual Combat driver improvements. [Jason Eckhardt, Andrew Gardner]
* Graphics decoded, video improved, inputs mapped.

Intel i860 CPU core added. [Jason Eckhardt]


(The CPU core doesn't have accurate cycle counts for each opcode yet, but it'll have them soon.  I believe that is the main culprit behind the sync of the two i860s and the 68k being outta' whack.  You can still see the i860s do their thing and rasterize a voxel? groundplane and some simple polygon bad guys).
2009-01-15 04:40:57 +00:00
Aaron Giles
2a780fc07d From: Oliver Stoeneberg [mailto:oliverst@online.de]
Sent: Sunday, January 11, 2009 5:52 AM
To: submit@mamedev.org
Subject: unreachable code cleanup

This patch cleans up the usage of unreachable code (mostly 
unnecessary breaks after returns in switch - case). A few case of 
really unused code were also discovered. I marked thos with FIXME 
comments.
I based this cleanup on teh output of cppcheck. It does still missing 
a few cases of unreachable code, so there might be future patches to 
address more cases.
2009-01-14 06:10:30 +00:00
Aaron Giles
81fce8af37 From: Duke [mailto:startaq@gmail.com]
Sent: Friday, January 09, 2009 4:14 AM
To: submit@mamedev.org
Subject: Patch to remove useless INLINE defines

Hello,

this patch removes several occurrences of "#define INLINE" in CPU and
sound cores, which I assume are useless since the makefile already
defines this.

--Dirk
2009-01-14 06:00:48 +00:00
Aaron Giles
200b0a0159 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, January 03, 2009 10:20 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] static/const/include fixes

Hi mamedev,

Here's my aperiodic code cleanup patch for MAME, adding static/const
and adjusting header files.  In a few places I went a bit further.

1.  arm7core.[ch],segas24.[ch]: Rewrote some abuses of the HANDLER
macros to use _func types instead.
2.  m37710: Removed some long dead state save functions.
3.  spc700: Removed the interface declarations and functions.  Most of
it is handled by CPU_GET_INFO, some of it was no longer implemented,
and since pointerization it wasn't possible to call it externally
anyhow.
4. segac2: I removed the palette variables aliasing the megadrive ones
and just used the megadrive ones directly.
5. snes: All the obc1_, DSP1_, DSP2_ exports were made static.  I'd
avoided doing this previously for fear it might break MESS, but after
auditing I'm fairly certain this shouldn't cause problems.

~aa
2009-01-14 05:32:21 +00:00
Curt Coder
bd0d0269ff CDP1802 cpu core:
- improved register layout
- randomized register contents on initialization
2009-01-12 14:26:56 +00:00
Curt Coder
de81d24aab COP400 cpu core refactoring:
- added state table for the debugger
- grouped all cpu types under a single makefile entry
- removed duplicate code
2009-01-12 13:18:32 +00:00
Phil Bennett
b9d2549841 02805: turbosub, turbosba: Dropped lines in video output rendering
Added save state support.
2009-01-11 19:27:13 +00:00
Curt Coder
019b61e7af Converted the CDP1802 cpu core to use a state table. 2009-01-09 09:32:54 +00:00
Aaron Giles
835ace034d Cleanups and version bump. 2009-01-04 23:31:12 +00:00
Aaron Giles
ed893fe35c From: Robert [mailto:pac0446@bigpond.net.au]
Sent: Wednesday, December 31, 2008 6:39 PM
To: Mamedev submit
Subject: Fix for 1610 cpu

The cp1610 cpu crashes when it attempts to reset itself.

It gets the PULSE_LINE message.

A one-line fix to cp1610.h will fix the problem.
It has been tested on the intellivision mess driver.


Please change the line that says:

#define CP1610_RESET 2

to

#define CP1610_RESET INPUT_LINE_RESET



Thank you and Happy New Year.

- Robbbert
2009-01-04 23:01:29 +00:00
Aaron Giles
41879d052a Removed bogus port 4-7 definitions from MCS-48. Added i8243
implementation. Connected 8243 properly to monsterb and 
system 16a sound. Changed draw80pkr to connect the PROG
line like videopkr.
2009-01-04 03:35:12 +00:00
Aaron Giles
55afb292df Some minor MCS-48 cleanup. Added 8040/8050 variants. 2008-12-31 16:30:09 +00:00
Phil Bennett
2b9dc5ee31 Fix 02791: cafetime: Access Violation with -debug 2008-12-31 12:33:58 +00:00
Aaron Giles
379e2e1fdc PTR -> FCT naming for a few remaining items in CPU cores. [Duke, Aaron Giles] 2008-12-31 03:08:34 +00:00
Aaron Giles
200345b6da 02714: 3stooges: Speech works for a while, then starts going in and out of horrible noise and static
Interim fix, waiting until 0.129 is done before trying to sort out IRQ
handling for real.
2008-12-31 02:36:09 +00:00
Aaron Giles
3d7b496183 REP instructions with high interleave would never complete.
Also fixed cpu.mak dependencies for i286.
2008-12-30 22:00:54 +00:00
Aaron Giles
9d08f4fa9e 02768: mk3, mk3r20, mk3r10, mk3p40, umk3, umk3r10, umk3r11 : Roms incorrectly named as umk3 instead of mk3 + two versions of U2 SOUND ROM
(Also spacing cleanup in ppccom.h)
2008-12-30 16:41:18 +00:00
Aaron Giles
a7071bb8cb Hooked up PPC602 IBR. 2008-12-30 07:02:01 +00:00
Aaron Giles
c303794661 Hooked up DSA/ESA instructions for PowerPC 602 (as no-ops for now).
polystar gets a little farther but crashes when the sub cpu attempts
to enable interrupts.

Removed HAS_PPC* in favor of a single HAS_POWERPC, and a single
definition in cpu.mak for all PowerPC variants.
2008-12-30 06:54:17 +00:00
Aaron Giles
7b93ab2d26 02783: SMS-Based megatech.c sets: [debug] Access Violation with -debug
Disassembled PCs are now forcibly aligned to the minimum opcode size
and explicitly masked.

Also normalized the CPU cores to always do while (icount > 0), in order
to remove the kludge in cpuexec.c that caused us to overeat by 1 cycle to
accommodate those cores that there looping while (icount >= 0).
2008-12-30 01:18:26 +00:00
Aaron Giles
4c95c177a8 02785: a51site4: Interger Overflow with -debug 2008-12-30 00:42:19 +00:00
Aaron Giles
528d5b6528 Merged i8x41 (UPI-41) core into MCS-48 core:
* all code now lives in mcs48.c
 * rewrote disassembler as unified MCS-48/UPI-41 disassembler
 * changed UPI-41 interfaces to match MCS-48
 * added new master read/write interfaces for external access
 * unified interface to 8243 expander chip
 * converted tnzs and decocass to the new interfaces

DECO Cassette fixes/cleanups:
 * converted tape handling to a device
 * changed tape handling to use a timer callback
 * updated to work with new UPI-41 core
 * corrected clock speeds for all chips (esp. the 8041)
 * fixed very wrong CRC implementation (how did it ever work?)
 * corrected sound IRQ rate
 * corrected video timing

Burger Time hardware fixes:
 * corrected sound IRQ rate and handling
 * removed lnc audio reset hack
 * full audio memory maps based on schematics
 * corrected video timing
2008-12-30 00:24:06 +00:00
smf-
e819aa7556 changed divide to throw out negative numerators. 2008-12-28 22:37:26 +00:00
smf-
d0a5273861 Implemented GTE divider using reciprocal table derived by pSXAuthor, this should allow the results to be calculated as inaccurately as the real hardware. 2008-12-28 14:56:15 +00:00
Aaron Giles
ee9f02668c 02758: linking ldplayer fails
Cleaned up mcs48 to be dependent on a single makefile define, rather than
separate defines for each CPU which didn't really buy us anything in terms
of code size or performance.
2008-12-26 07:31:44 +00:00
Aaron Giles
2a4df134e0 02765: all naomi.c sets: Assertion 2008-12-26 07:16:09 +00:00
Aaron Giles
70f3194097 02770: aceattac: Interger Overflow
Cleaned up cycle handling in the 68k core.
2008-12-26 06:37:19 +00:00
Andrew Gardner
e7ec9c0df6 Adds extremely preliminary i860 disassembler and hooks it up to the vcombat driver. [Jason Eckhardt, Andrew Gardner]
(We're not even decoding args yet, but it's on its way).
2008-12-25 03:03:30 +00:00
Aaron Giles
aa161c426b Converted 68000 to state tables. 2008-12-24 09:11:03 +00:00
Wilbert Pol
da128743fb Changed the F3853 implementation into a device. 2008-12-23 20:14:57 +00:00
Aaron Giles
a70fdf00a1 CPU interface organization shuffle. The file cpuintrf.h now merely
describes the interface, but does not contain any implementation.
All remaining bits of implementation have been migrated either to
cpuexec.c or to debugcpu.c. Specifically, cpu_dasm() is now
debug_cpu_disassemble(), and cpu_set_dasm_override() is now
debug_cpu_set_dasm_override(). Also moved memory_address_physical()
to debug_cpu_translate(), since it was only ever used for
debugging.

Changed all CPU and sound cores to use memory_find_address_space()
instead of cpu_get_address_space(). The former is reliable even
during early initialization when the CPU cores generally need it.

Removed the dummy CPU core and cpuintrf.c.

Changed the core execution loop to directly call the execute
function instead of using the inline helper (which has been removed).
2008-12-22 17:35:27 +00:00
Phil Bennett
9f76d751c0 New games added or promoted from NOT_WORKING status
---------------------------------------------------
Turbo Sub (prototype rev. TSCA) [Phil Bennett]
Turbo Sub (prototype rev. TSC6) [Phil Bennett]
2008-12-22 13:19:01 +00:00
Aaron Giles
c0ca96b075 Cleanups and version bump. 2008-12-22 04:01:51 +00:00
Aaron Giles
8213a7af4f Rewrote 8080/8085 interrupt handling so that it makes sense.
Changed 8080/8085 callbacks to be specified in a config structure.
Converted 8080/8085 core to cpu_state_table.
Changed to a single HAS_808X define for both cores.
Fixed several drivers that used interrupts in odd ways.
Converted warpwarp driver to raw video parameters.
2008-12-22 03:18:03 +00:00
Andrew Gardner
44a99ed738 Rewrite of the Motorola DSP56k CPU core. (Andrew Gardner)
* Fixed flag calculation and sign extension for numerous ops.
* Added rnd, mpysuuu, and dmac ops.
* Fixed do loop behavior to skip empty loops.
* Added stack underflow exception handling.
2008-12-21 19:07:44 +00:00
Andrew Gardner
c17377e8a9 Fixed update_handler for the dsp56k and polygonet. [Andrew Gardner]
(The driver more or less works again.  And holy moly is this thing fast with my crazy interleave values!)
2008-12-21 08:21:34 +00:00
Wilbert Pol
8850e49309 Added running_machine parameters to the f3853 callbacks. 2008-12-20 19:10:31 +00:00
Aaron Giles
9be5d30f20 More cleanup. Added address-space-specific constants for the various
bus width and shift CPU interface constants. Changed all the cores
to use them.

Minor spacing cleanup in Z80, Z180, TMS34010, ADSP21xx cores.

Changed ADSP21xx cores to accept a configuration struct instead of
using set_info to specify serial port callbacks. Simplified the
ADSP21xx get/set info significantly. Removed support for only
including certain variants of the chips; they are now either all
supported or all unsupported.
2008-12-20 02:57:13 +00:00
Aaron Giles
165be1ee47 Z180 uses new cpu_state_table 2008-12-19 23:04:42 +00:00
Aaron Giles
d2d5def542 Oops, swapped import/export on the R register. 2008-12-19 22:29:14 +00:00
Aaron Giles
320097d9fe Renamed CPUINFO_PTR_* to CPUINFO_FCT_* for function get infos.
Changed Z80 over to the new cpu_state_table mechanism.
2008-12-19 22:26:25 +00:00
Aaron Giles
f36fc8641e This update is the below two patches, plus the remaining changes
necessary to remove 12 of the final 14 references to the global
Machine. The remaining 2 are in fatalerror() and logerror(), which
are both local to mame.c, so Machine is now fully static.

--

From: Atari Ace [mailto:atari_ace@verizon.net] 
Sent: Thursday, December 18, 2008 5:47 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Make Machine static followup

Hi mamedev,

This incremental patch to my last patch undoes the change that caches
the ppu2c0x videorom.  I changed the code back to how it behaved
originally, using an existing machine on the chip struct to eliminate
the one troublesome Machine reference.

~aa

--

From: Atari Ace [mailto:atari_ace@verizon.net] 
Sent: Thursday, December 18, 2008 2:54 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Make Machine static!

Hi mamedev,

This large patch completes the removal of the use of Machine
throughout MAME.  It does so primarily by adding machine, device or
space to various apis and modifying the callers, but for some
remaining cases it adds a new api, mame_get_running_machine(), which
will be called instead.  There are only 14 uses of this api currently,
and that number should drop over time.

There are a few changes of note:
1.  6821pia.c.  I attached machine to the 'device' structure.  I'm
working on converting this to a proper device, but that change isn't
ready.
2.  fddebug.c.  I added a proper header so that the apis won't get
accidentally converted to static again.
3.  scsi.c.  I added a machine to SCSIInstance.
4.  system16.c.  I modified sys16_patch_code to take an array of
patches.
4.  custom.h.  I added the owning sound device to the reset/stop
routines as well as the token.  Note that passing only the device
would require exposing the internals of custom_sound, as the token
passed is not the device token, but the token returned from the
CUSTOM_START routine.  Better ideas here are welcome.
4.  ppc2c0x.c.  To avoid changing more interfaces, the init routine
saves the videorom location rather than looks it up each time.

I tried to choose what I felt was the natural parameter for an api,
rather than always pass machine, but in some cases I used machine to
limit the number of additional changes.  Some additional cleanup here
is probably warranted, I'll look into that later once I'm recovered
from this two-week project.

~aa
2008-12-19 19:40:22 +00:00
Aaron Giles
42c9aeff39 Cleaned up device and sound interfaces to match the CPU
interfaces when handling strings. Namely, the generic
get_info functions allocate a temporary string and the
device in question copies its string to the target,
instead of assigning a const char *. Updated all device
and sound cores to operate this way.

Added the concept of a cpu_state_table, which is
supplied by the CPU cores and which describes all the
register state accessible to the debugger and other
subsystems. The format of the table is such that most
data can be simply fetched from memory without the
further involvement of the CPU core, including the 
display of common formats. Extensibility points are
available for custom display and for importing/exporting
the data to intermediate variables for more complicated
scenarios. Updated the ADSP21xx, TMS340x0, and i86 cores
to use this.

Removed the old debugger register list, which was never
used. Replaced it with using ordering from the
cpu_state_table.

Renamed REG_PC -> REG_GENPC, REG_SP -> REG_GENSP, and
REG_PREVIOUSPC -> REG_GENPCBASE. Updated a few spots
that were using these directly. Moved these definitions
into the end of the register area rather than leaving
them outside which put them in a weird range.
2008-12-19 06:46:17 +00:00
Aaron Giles
72b283a0d1 Removed index and clock parameters from CPU_INIT function. 2008-12-18 10:11:10 +00:00
Aaron Giles
aa7e2482e2 CPU header cleanups....
i86/i286/i386/nec/v30mz:
 * renamed i86.h -> i86priv.h
 * renamed i86intrf.h -> i86.h
 * consolidated i88intrf.h, i186intf.h, i188intf.h, etc into i86.h

m6805:
 * moved memory read/write macros out of public header

m37710:
 * moved memory read/write macros out of public header

spc700:
 * moved many structs/functions/macros out of public header

tms32010:
 * moved memory read/write macros out of public header

sm8500:
 * pointer-ified the core (apparently never had get/set context!)

g65816:
 * moved memory read/write macros out of public header

pic16c5x:
 * moved memory read/write macros out of public header

t11:
 * moved memory read/write macros out of public header
2008-12-18 09:38:12 +00:00
Aaron Giles
cf9fc58618 Made the concept of a "clock" native to devices. The clock is now
specified when the device is added, and the clock is available in
the device_config directly via device->clock. Updated all devices
that have a clock to specify it when adding the device, rather than
as part of their configuration. As part of this work, also created
device-specific _ADD and _REMOVE macros to simplify configuration.

Dfined a generic device execute function callback, though it
is not used yet. The long term plan is that any device with an 
execute callback will be scheduled along with the CPUs. Now that
CPUs are devices, their scheduling will be moved over to this
logic eventually.

Changed various NVRAM devices to fetch their default memory region
from the device->region rather than specifying it in the 
configuration.

Moved a number of CPUINFO_PTR_* constants to CPUINFO_FCT_*.

Fixed several drivers that manually created their own gfx_elements
to fill in the machine object, so they no longer crash.

Fixed incorrect CPU display on info screen (recently broken).

Moved device startup to *before* the DRIVER_INIT is called. This
is to allow the DRIVER_INIT to configure devices that have been
properly allocated. So far I don't see any negative effects, but
be on the lookout if something weird shows up.

Rewrote the device iteration logic to make use of the typenext
field and the newly-introduced classnext field for iterating more
efficiently through devices of a given type or class.

Fixed behavior of MDRV_CPU_REPLACE so it does not delete and then
re-add a CPU (causing the order to change).
2008-12-18 08:28:50 +00:00
Wilbert Pol
d9fbf0dba5 Removed unneeded segment base changes from the 80286 core. 2008-12-17 19:15:14 +00:00
Aaron Giles
e2ae5c7fa3 From: Atari Ace [atari_ace@verizon.net]
Sent: Tuesday, December 16, 2008 12:20 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Migrate CPU defines to cpu header files

Hi mamedev,

This patch migrates all the CPU definitions into the cpu header files.
The #defines and CPU_GET_INFO declarations were added by hand to the
cpu cores in the first patch, plus a few partly related fixes to the
non-DRC cores.  The second patch was produced by the attached script
which inserts all needed #includes, except for two that were added by
hand in the first patch.  The first patch also removed an extra define
of N2A03_DEFAULTCLOCK that would have caused problems with the second
patch.

~aa
2008-12-17 05:52:10 +00:00
Aaron Giles
5630547540 More device normalization:
cpu_get_info_* -> device_get_info_*
  cpu_set_info_* -> device_set_info_*
  cpu_reset      -> device_reset

Removed the cputype_get_* macros as they are not necessary.

Removed cpuintrf_init() which is no longer necessary.
2008-12-16 16:30:28 +00:00
Aaron Giles
98c40f06db Made CPUs into proper devices. CPUs are now added in the
machine configuration just as any other device, and the
standard CPU configuration is performed via the inline
configuration macros.

Change cpu_type from an enumeration into a pointer to the
CPU's get_info function, very similar to device behavior.
For now all CPUs are declared in cpuintrf.h, but 
eventually they should be declared in the CPU's header
file, and the driver should #include that header.

Added function cpu_get_type() to return the CPU type.

Changed several cpu_* functions into macros that call
through to the equivalent device_* function.

The device system now maintains a parallel list of devices
based on type, for faster iteration through all devices
of a given type.

Cleaned up code that looped over CPUs via the machine->cpu
array to now loop using the type-based device list.

Removed start/stop/reset/nvram functions from the 
device_config in favor of grabbing them as needed.

Cleaned up the generic interrupt_enable code to work with
CPU devices instead of numbers.

Mapped the devtag_* functions to device_* functions via
macros instead of parallel implementations.
2008-12-16 15:02:15 +00:00
Aaron Giles
54db8f077b Cleanups and version bump. 2008-12-15 01:46:32 +00:00
Aaron Giles
68bca19400 Fix all obvious regressions based on screenshots. 2008-12-15 00:55:07 +00:00
Aaron Giles
60b43c1d69 Removed hack for setting mcs51 serial callbacks. Updated micro3d to use
new functions. Fixes regression.
2008-12-14 23:47:30 +00:00
Couriersud
4ffa2901ce Fix raster effects in nbbatman - as far as I can judge.
I was not able to dig out information about the V33 prefetch
timing and the prefetch cache size. Anybody has more 
information?
2008-12-14 18:47:33 +00:00
Roberto Zandona
046ef441d9 i960: fixed nor opcode and added notor opcode 2008-12-14 16:55:49 +00:00
Aaron Giles
af1273c18d From: Atari Ace [atari_ace@verizon.net]
Sent: Friday, December 12, 2008 9:28 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] yet another small Machine cleanup

Hi mamedev,

This patch modifies the tms34010.h, pc16552.h, and tms34061.h
interfaces to eliminate some more global Machine variables.  Six more
deprecat.h includes eliminated.

FYI, 128u5 had 523 deprecat.h includes and ~1400 Machine variables,
now were down to 374 and ~420 respectively, so progress is being made.

~aa
2008-12-14 08:15:01 +00:00
Aaron Giles
9acb30bcbe From: Micko [mailto:mmicko@gmail.com]
Sent: Saturday, December 13, 2008 2:15 AM
To: Aaron Giles
Subject: Re: Another 8080/85 change from me

Hi Arron,
 
Here is the patch.
 
Problem was in EI handling and not clearing of interrupt enable flag, as I did in previous. So now EI is done as in Z80 since it is working same way. I have tried a invaders clone having problem, now they work, also MESS machine for which I initialy did this works.
 
Hope this will be in u6.
 
Micko
2008-12-14 08:11:42 +00:00
Aaron Giles
e643a688b3 Fixed remaining crash regressions from recent changes. 2008-12-13 07:01:40 +00:00
Andrew Gardner
e1f9347f0d Pointer-ified the dsp56k cpu core. [Andrew Gardner]
(There are still a couple of global memory arrays that i've gotta' move into the cpu struct.  Will do that soonish.)
2008-12-12 16:18:42 +00:00
Curt Coder
63a5cd896a I8085
- added INTE and state word callbacks

N8080.c
- rewrote interrupt handling according to schematics
- added interrupt acknowledge
2008-12-12 10:37:25 +00:00
Aaron Giles
b400e7978b From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Thursday, December 11, 2008 6:52 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] deprecat.h cpu cleanup

Hi mamedev,

This patch purges the last few uses of deprecat.h from the cpu cores,
plus a handful of other Machine cases elsewhere that were found by
script inspection.

~aa

--

Hi mamedev,

This patch eliminates most uses of deprecat.h in the sound cores by
attaching the device to the state object and using it where
appropriate.  Given that all the cpu objects use this convention, and
three sound cores already do this, this seemed an appropriate
approach.

~aa
2008-12-12 06:11:15 +00:00
Quench
4ee312ca39 Pointer-ified the TMS32025 core. 2008-12-11 16:55:11 +00:00
Aaron Giles
7eaa676d90 Fixed compile error, and fixed crash when handling an exception when the
debugger is disabled.
2008-12-11 11:03:11 +00:00
Aaron Giles
04ae2d8bc7 Removed get context/set context calls from the CPU interface entirely.
Pointer-ified the TMS99xx core (missed that one!)
2008-12-11 10:21:52 +00:00
Aaron Giles
d87ef8f79b Here's the big one....
Added new function cpuexec_describe_context(machine) which can be
used in logerror() and other printf-style functions to return a
description of the current CPU/PC given only the machine. Changed
several dozen sites to use this instead of directly interrogating
the activecpu.

Removed all other uses of activecpu throughout the system. Removed
activecpu from the machine structure to prevent future abuse.

Removed cpu_push_context() and cpu_pop_context(), and all call
sites.

Voodoo devices now require a CPU to be defined in the configuration
in order to know whom to steal cycles from or stall when FIFOs get
full. Updated all voodoo users to specify one.

CPD1869 devices now also require a CPU to be defined in the
configuration, in order to know which CPU's registers to fetch.
Updated all cdp1869 users to specify one.

Many other small changes to make this all work.
2008-12-11 09:40:22 +00:00
Quench
922ea8052f Pointer-ified the PIC16C5x core. 2008-12-11 06:52:59 +00:00
Quench
51ea0b3e29 Pointer-ified the TMS32010 core. 2008-12-11 06:29:44 +00:00
Aaron Giles
bf7875e7ee Pointer-ified the sc61860 core. 2008-12-10 18:37:47 +00:00
Aaron Giles
dcdfd96f1a Pointer-ified the saturn core. 2008-12-10 18:24:50 +00:00
Aaron Giles
864cc4513b Pointer-ified the PDP1 core. 2008-12-10 18:04:15 +00:00
Aaron Giles
ebaf684f2e Enabled all CPU cores/variants. Fixed compile issue revealed as a result. 2008-12-10 17:55:49 +00:00
Aaron Giles
540f1eefb4 Pointer-ified the lr35902 core. 2008-12-10 17:50:50 +00:00
Aaron Giles
5f39c19227 Fix compile error. 2008-12-10 17:41:30 +00:00
Aaron Giles
258b16c5d1 Pointer-ified the lh5801 core. 2008-12-10 17:40:54 +00:00
Aaron Giles
92602c58d5 Pointer-ified the cp1610 core. 2008-12-10 17:29:27 +00:00
Aaron Giles
b0136c9952 Pointer-ified the MC68HC11 core. 2008-12-10 17:16:04 +00:00
Aaron Giles
eadc13bd94 Pointer-ified the TMS32051 core. 2008-12-10 17:06:51 +00:00
Aaron Giles
29d3c3c033 Pointer-ified the upd7810 core. 2008-12-10 16:52:52 +00:00
Aaron Giles
9824c667e4 Pointer-ified the sh4 core. 2008-12-10 16:40:57 +00:00
Aaron Giles
b5705a5322 Pointer-ified the sh2drc. 2008-12-10 16:07:34 +00:00
Aaron Giles
8b670ddddd Pointer-ified the tms7000 core. 2008-12-10 14:55:39 +00:00
Aaron Giles
8aea6e2b4f s/cpustate->([ch])/filename.\1/ 2008-12-10 14:37:44 +00:00
Wilbert Pol
de1c2646c2 Added missing address space lookups. 2008-12-10 09:00:14 +00:00
Aaron Giles
b98c709380 Pointer-ified the mb86233 core. 2008-12-10 06:15:38 +00:00
Aaron Giles
0dcdc62b8d Pointer-ified the MB88 core. 2008-12-10 06:07:41 +00:00
Aaron Giles
bb8b6609b6 Pointer-ified the RSP core. 2008-12-10 06:04:18 +00:00
Aaron Giles
942a56edb9 Pointer-ified the apexc core (whatever that is :) 2008-12-10 05:51:37 +00:00
Aaron Giles
b99f7aef26 Pointer-ified the 8085 core. 2008-12-10 05:47:19 +00:00
Aaron Giles
9de8dad60d Pointer-ified the alpha-8201 2008-12-10 05:29:29 +00:00
Aaron Giles
36d63663d3 Pointer-ified the i386. 2008-12-10 05:14:09 +00:00
Aaron Giles
89e14c632f Pointer-ified the i86/i286 cores.
Removed unused v20/v30 implementation.
2008-12-09 15:39:20 +00:00
Aaron Giles
12415fcdcb Pointer-ified the cubeqst CPUs. 2008-12-09 14:49:16 +00:00
Aaron Giles
b319755f9e Added wrappers for ADSP21xx callbacks. Added device parameters to them.
Updated IRQ setters to use generic_pulse_irq_line().
2008-12-09 07:13:21 +00:00
Aaron Giles
13bdc84fff Compile fix. 2008-12-09 06:50:18 +00:00
Aaron Giles
ec8caea251 Completed pointer-izing the 6502 cores. Removed h6280 SET_CONTEXT calls. 2008-12-09 06:36:30 +00:00
Aaron Giles
b164c8a260 From: Atari Ace [atari_ace@verizon.net]
Sent: Monday, December 08, 2008 6:21 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Pointerify f8/tlcs90 cores

Hi mamedev,

Two more cores converted to pointers.  f8 was very straightforward,
tlcs90 had some extra state that needed to be merged into the register
struct, and needed adjustments to its timers and read/write handlers
which might warrant some scrutiny by the experts.

~aa
2008-12-09 06:26:02 +00:00
Aaron Giles
901d4fc796 Updated z8000 tables [Juergen Buchmueller] 2008-12-09 06:24:15 +00:00
Aaron Giles
eb43d34725 Re-routed empty get/set context calls to the dummy CPU's, and removed them
from the CPU cores.

Disabled the use of PULSE_LINE for any input lines except NMI and RESET.
Added a helper function generic_pulse_irq_line() for doing a single-cycle
assert/deassert for those few drivers remaining that were trying to use
PULSE_LINE directly.
2008-12-09 06:21:15 +00:00
Andrew Gardner
183b7c9de7 Pointer-ified the h6280 cpu core. [Andrew Gardner]
(Next is the dsp56k)
2008-12-09 05:25:35 +00:00
Aaron Giles
4eb774a033 Minor cleanup for empty SET_CONTEXT handlers. 2008-12-09 04:13:29 +00:00
Wilbert Pol
abb8a04a10 Pointer-ified the PDP1/TX0 core. 2008-12-08 21:49:26 +00:00
Aaron Giles
9369daac34 Fix disassembler compile. 2008-12-08 16:02:40 +00:00
Aaron Giles
0ba81aad17 Pointer-ified the V30MZ core. Untested as nobody is using it. 2008-12-08 11:03:40 +00:00
Aaron Giles
c33c60485b Pointer-ified the V810 core.
Added OG's z8000 fix.
2008-12-08 10:44:00 +00:00
Aaron Giles
fb25927452 Pointer-ified the Z180 core.
Fixed compile issue with the Z8000 disassembler.
2008-12-08 09:40:44 +00:00
Aaron Giles
d4e2eb2472 Pointer-ified the Z8000 core. 2008-12-08 08:41:51 +00:00
Curt Coder
b4470a0bd7 [M6800] Removed the extraneous cpu_pop_context(). 2008-12-08 08:19:37 +00:00
Aaron Giles
b24198a1cd Hi mamedev,
This is a reworked/expanded version of the patch I sent yesterday.
This one is split into three parts:

1.  This introduces function macros for SAMPLES_START,
CUSTOM_{START,STOP,RESET}, and ANTIC_RENDERER.
2.  This introduces running_machine *machine throughout MAME.
Principally it adds running_machine *machine = Machine to the top of
functions, but in some static functions the parameter is added
directly.  Some similar changes in 99xxcore.h, v9938.c, v9938mod.c,
galaxold.c, psx.c, taito_l.c are also made to eliminate Machine
params.  No global API is changed.
3.  This changes the APIs introduced in the first part to pass device
or space as appropriate.  A few similar changes in some other global
apis are made as well.

The net result of this sequence of patches is to remove 40% of the
Machine references and 27 deprecat.h includes.

~aa
2008-12-08 06:53:40 +00:00
Aaron Giles
60febeb3d9 Pointer-ified the v60 core. 2008-12-08 06:35:28 +00:00
Aaron Giles
f0849513d0 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, December 07, 2008 1:48 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Pointerify sharc core

Hi mamedev,

The attached patch pointerifies the sharc core.  If this has already
been done, no great loss, it only took about an hour and a half to do
this.

~aa
2008-12-08 05:07:54 +00:00
Aaron Giles
65f9ee3d3a From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, December 07, 2008 9:43 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Introduce KONAMI_SETLINES_CALLBACK

Hi mamedev,

Aaron indicated the KONAMI_SETLINES_CALLBACK change from my previous
patch overlapped with work already committed but was otherwise a
desired change, so this patch submits just that change relative to the
committed work.

~aa
2008-12-08 05:03:46 +00:00
Nathan Woods
bb2061763c Updates from MESS 2008-12-08 03:53:26 +00:00
Andrew Gardner
96d40d8969 PPointer-ified the arm. [Andrew Gardner]
(Next cpu I'll look at is the H6280.)
2008-12-07 17:57:18 +00:00
Aaron Giles
872ec20658 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, December 06, 2008 4:52 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Deprecat.h cleanup

Hi mamedev,

This patch changes some global Machine references to use machine,
device->machine, ... instead, and removes any unneeded #include
"deprecat.h" lines as well (about 10% of them in fact).  It was
generated using the attached script, and then reverting some cases
where it was overzealous.

~aa
2008-12-07 14:51:36 +00:00
Aaron Giles
c5f3e70c14 Made the PCI bus a device. The bus is declared in the machine
config, and the devices attached to it are enumerated there.
Eventually, the PCI config read/write functions should be moved 
to well-known functions within the device, but for now they are
kept separate.

activecpu -= 138
2008-12-07 06:14:33 +00:00
Aaron Giles
63f26b610b Pointer-ified the konami CPU core. Changed setlines callback to
pass a device. Updated and de-deprecat-ed the drivers that used
it. Fixed interrupt handling to follow more recent behavior
expectations (no PULSE_LINE on non-NMI lines).
2008-12-06 21:24:38 +00:00
Aaron Giles
c023001a86 Pointer-ified the PPC DRC. 2008-12-06 20:18:05 +00:00
Aaron Giles
554f86eb65 Pointer-ified the mips3drc. 2008-12-06 19:55:22 +00:00
Andrew Gardner
490880419a Pointer-ified the m6805. [Andrew Gardner]
(Used cpustate naming convention.  Moved iCount into state struct.)
(Tested with arkanoid, bootleg bubble bobble, etc.)
(Next cpu I'll look at is the ARM.)
2008-12-06 19:47:14 +00:00
Aaron Giles
7f9c6cb81f Pointer-ified the DSP32 core. 2008-12-06 19:28:48 +00:00
Aaron Giles
d92a2e0c4e Cleanups/version bump/added missing drivers. 2008-12-06 17:54:42 +00:00
Aaron Giles
fbdff39c21 Fix compile errors. 2008-12-06 17:15:23 +00:00
Aaron Giles
389b25c281 02638: various cpu cores don't compile anymore
(mostly fixed before)
2008-12-06 17:09:02 +00:00
Aaron Giles
282c1db110 activecpu_count -= 133
Removed mostly silly uses of activecpu from the CPU cores.
2008-12-06 16:56:22 +00:00
Aaron Giles
d8e17c4e86 Removed cpunum_get_active().
Main important change is that IDE controllers with bus mastering (DMA)
need to specify the target address space in the IDE device configuration.
2008-12-06 06:40:40 +00:00
Aaron Giles
12f71dac82 m68_state -> cpustate 2008-12-05 15:17:40 +00:00
Nathan Woods
3125b5e60e Removed unused variables 2008-12-05 12:08:49 +00:00
Aaron Giles
3c6eacc96f Changed save state system to accept machine parameters where
appropriate, and to keep all global variables hanging off the
machine structure. Once again, this means all state registration
call sites have been touched:

  - state_save_register_global* now takes a machine parameter
  - state_save_register_item* now takes a machine parameter
  - added new state_save_register_device_item* which now uses
     the device name and tag to generate the base name

Extended the fake sound devices to have more populated fields.
Modified sound cores to use tags from the devices and simplified
the start function.

Renumbered CPU and sound get/set info constants to align with
the device constants, and shared values where they were perfectly
aligned.

Set the type field in the fake device_configs for CPU and sound
chips to a get_info stub which calls through to the CPU and sound
specific get_info functions. This means the device_get_info()
functions work for CPU and sound cores, even in their fake state.

Changed device information getters from device_info() to
device_get_info() to match the CPU and sound macros.
2008-12-05 08:00:13 +00:00
Aaron Giles
35dfc8bad2 From: Micko [mailto:mmicko@gmail.com]
Sent: Tuesday, December 02, 2008 10:14 AM
To: Aaron Giles
Subject: Another 8080/85 change from me

Hi Aaron,
 
I have noticed that there are some problems in interrupt handling in 8080 implementation. Thing is that there are some cases that made a problem while implementing one 
computer emulation. Thing is that there is same computer with Z80 and 8080 cpu and ROM's are same, but interrupts were not triggered. So I have searched and found 
two problems fixed with this patch.
1. previous implementation cleared interrupt enable bit on interrupt trigger which is wrong since interrupts should stay enabled 
2. serve interrupt number was not cleared after interrupt is executed, so if same one is triggered it will not be catched.
 
I have tested with 8080 MESS drivers, and picked some of MAME drivers using 8080 and 8085, and there were no bad things found.
 
Regards,
Micko
2008-12-04 10:48:35 +00:00
Aaron Giles
2c3a713213 Minor comment fix. 2008-12-04 10:06:25 +00:00
Aaron Giles
9dd0f760aa 02673: All Sets with HuC6280 as Audio Device (PCE-Based titles): Fatal Error after OK 2008-12-04 10:04:22 +00:00
Aaron Giles
85b961f5af CPU_IS_LE -> ENDIANNESS_LITTLE
CPU_IS_BE -> ENDIANNESS_BIG

Also fixed help for step over/in to specify correct keys.
2008-12-04 06:08:32 +00:00
Andrew Gardner
d801cf44b3 Moves empty brackets to the same line as CPU_(GET|SET)_CONTEXT calls.
This makes it easy to grep the CPU code to figure out which cores still need pointer-ification.
2008-11-30 16:25:09 +00:00
smf-
2bede4d1ce Makes sure uint is defined. 2008-11-29 08:32:58 +00:00
R. Belmont
cdd72b00bd ARM7 updates
- Pointer-ified ARM7 core
- Added disassembler and execution support for ARMv5 LDRD/STRD instructions.
  39in1 now makes it until it needs the MMU.
2008-11-29 02:59:53 +00:00
R. Belmont
fdc7c5b358 Pointer-ified the SPC700. 2008-11-28 23:29:21 +00:00
R. Belmont
1962ffeaf9 Pointer-ified the 65816. 2008-11-28 22:43:37 +00:00
Nathan Woods
00cf5ec718 F3853 changes from MESS 2008-11-28 00:14:22 +00:00
Aaron Giles
0142411b98 Move cpunum_get_active() removal. 2008-11-27 05:22:51 +00:00
Curt Coder
c35dcd695c Normalized CDP1802 state variables to 'cpustate'. 2008-11-26 20:54:18 +00:00
Aaron Giles
0df0ba2bc4 Removed more cpunum_get_active(). 2008-11-26 20:07:20 +00:00
Aaron Giles
c2ca1ef0cb PowerPC DRC no longer references active CPU. 2008-11-26 19:49:42 +00:00
Aaron Giles
5cfad18a84 Normalized m37710 local CPU state pointers to to 'cpustate'.
Removed need for cpunum in the timers.
2008-11-26 19:42:33 +00:00
Aaron Giles
593e334f08 Normalized mcs48 state variables to 'cpustate'. 2008-11-26 19:39:12 +00:00