Commit Graph

1129 Commits

Author SHA1 Message Date
Aaron Giles
019d919850 Hi Aaron,
I have done Intel 4004 implementation, here is a patch (it also
contain a POC driver for 4004 Nixie tube clock, that runs under MESS).

4004clk is artwork file, and roms file contain needed roms (just rename ZIP).

Regards,
Miodrag


> -----Original Message-----
> From: Micko [mailto:mmicko@gmail.com]
> Sent: Tuesday, August 04, 2009 8:11 AM
> To: Aaron Giles
> Subject: Intel 4004 core
> 
> Hi Aaron,
> 
> Here is a final version of CPU core for MAME submition.
> 
> Regards,
> Miodrag
2009-08-13 04:30:33 +00:00
R. Belmont
7e37c7fa9c Revert last check-in, I just realized that was actually correct (doh). 2009-08-12 03:46:58 +00:00
R. Belmont
ba1580bf7d SH2DRC: Fixed output register marking errors
Probably not harmful currently, but if the UML core ever gets more aggressive 
with optimization (e.g. if we spliced in something like LLVM as a code 
generator) it could've become an issue.
2009-08-12 03:39:01 +00:00
Roberto Zandona
cd932c1c27 looping: modified the cop420 rom region 2009-08-09 06:25:48 +00:00
Angelo Salese
8fade1f6dd Fixed buggy breakpoints in the g65816 cpu core. [Angelo Salese] 2009-08-07 11:38:06 +00:00
Aaron Giles
213c72af7f Cleanups and version bump. 2009-08-02 23:42:42 +00:00
Aaron Giles
1fc576e72f From: hoge hoge
Date: Sat, 25 Jul 2009 11:57:29 -0700
To: submit@mamedev.org<submit@mamedev.org>
Subject: 68k cpu reset eat cycles fix
Hello,

Attached is a diff for 0133 that fixes a bug related to eating cycles 
during 68k cpu reset. Previously, initial_cycles had a wrong value 
after reset, and if cycles were < 0, it'd always return 0, .. check 
the diff to see what I mean.

This change also happens to fix a scrolling bug in Fantasy Zone, 
introduced when that cycle eating thing was added.

Greets,
hap
2009-08-02 21:37:45 +00:00
R. Belmont
3b09e634ac ARM7 updates:
- Preliminary PXA255 support, including Intel-specific CP14
- Hooked up TLB
2009-07-21 01:18:50 +00:00
Fabio Priuli
ced50d3810 Fixing assert in drivers using ARM9 CPU (e.g. 39in1) 2009-07-20 12:13:23 +00:00
Aaron Giles
0fdce58484 Cleanups and version bump. 2009-07-20 07:20:41 +00:00
Aaron Giles
66bddc00bc MT02916 2009-07-20 06:42:38 +00:00
R. Belmont
902ad0ce83 ARM7 update
- Added ARMv5TE instructions: QADD, QDADD, QSUB, QDSUB, SMLAxy, SMLALxy, SMULxy, SMULWy, and SMLAWy
- Fixed disassembly of CLZ
2009-07-19 03:13:17 +00:00
Curt Coder
b214d44851 CDP1802:
- fixed state code output and load mode
2009-07-17 11:27:16 +00:00
R. Belmont
7111f1aece ARM7: Add ARMv5+ CLZ instruction 2009-07-17 04:29:37 +00:00
Aaron Giles
e8a7b064c6 Apparently Intel's fast reciprocal is too low-res compared to the PowerPC's
fast reciprocal. Fixes glitches in scud.
2009-07-16 17:31:21 +00:00
Aaron Giles
560d8586be Added FP registers to PPC debugger interface.
Fixed copy/paste error in 64-bit backend that takes us from no 3D in scud to
glitchy 3D. (Hey, it's an improvement.)
2009-07-16 17:14:23 +00:00
Curt Coder
9956b7002f CDP1802:
- refactored the Q and DMA callbacks to use devcb
2009-07-16 12:19:43 +00:00
Aaron Giles
6519412d59 Cleanups and version bump. 2009-07-16 07:37:54 +00:00
R. Belmont
2ce6e69018 ARM7 updates [R. Belmont, Ryan Holtz]
- Prepped to support multiple architecture versions
- Added ARM9 CPU type (ARMv5TE)
- Added mostly-stubbed system coprocessor/MMU support
2009-07-16 05:09:35 +00:00
Aaron Giles
62c9a9d8cb Cleanups and version bump. 2009-07-10 03:10:17 +00:00
Brian Troha
95ce94fbfc Fixed a HD6309 core bug/typo in the divq_im opcode. [Romain Tisserand] 2009-07-09 23:08:05 +00:00
Aaron Giles
5201d52344 Expanded address maps from 3 to 4. Moved ADDRESS_SPACE_PROGRAM/DATA/IO
constants to cpuintrf, as those names are really only applicable to 
CPUs. Added new ADDRESS_MAP_0/1/2/3 constants to identify address maps 
more generically. 

Updated memory system to be more general about address map handling.
Added the concept of default address maps (in addition to the already
existing internal memory maps). The difference between internal and
default memory maps is that internal memory maps always override
everything (including user-specified maps), but default memory maps
simply provide a default that can be overridden.

Converted the okim6295 sound driver to use address maps for access.
By default, it defines a ROM address map that overlays its full
region. As a result, the validity checks require all okim6295 regions
to be at least 256k, unless you provide your own address map. Updated
all regions to meet this requirement.

Updated the atarijsa code to use a custom address space for its
okim6295 accesses (which are banked on the first half and static on
the second half), as an example of configuring a device with a
custom address space.

For now, attempts to use okim6295_set_bank_base() will still work,
though banking for the okim chips should be moved to custom address
maps in the drivers eventually. The first time okim6295_set_bank_base()
is called, it will install a banked memory handler over the region
and use memory_set_bankptr() to change the base on subsequent bank
switches.

Moved address map validity checks to be run for each device instead of
just each CPU.
2009-07-09 07:10:40 +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
R. Belmont
c79dfb05f3 ARM (26-bit): TST/TEQ should only update flags
This eliminates the need for patches in poizone/ertictac, all deco32 games 
still run (including hvysmsh), and it better matches the documentation.
2009-07-05 17:32:15 +00:00
Angelo Salese
66ff5a084a Added very basic SCC68070 implementation, currently is just a basic m68k with 32-bits of address lines.
The plan is to add the on-chip peripherals on the magicard.c driver then, when I get some consistency, hardwire it to the cpu core.

Please check this modification asap (should be fine, but I haven't compiled with a clean build)
2009-07-03 18:43:09 +00:00
Aaron Giles
e60576e96d Cleanups and version bump. 2009-07-02 07:52:54 +00:00
R. Belmont
f9cff0ed71 PPCDRC: Generate some FPSCR flags [Phil Bennett] 2009-07-02 05:48:07 +00:00
Aaron Giles
a896b459e0 From: Duke [mailto:startaq@gmail.com]
Sent: Monday, June 29, 2009 3:58 AM
To: submit@mamedev.org
Subject: Patch for i86.c to fix an assert

Hello,

attached is a small patch for i86.c that fixes an assert when the
80188 CPU is used.

--Dirk
2009-07-02 04:40:07 +00:00
R. Belmont
4d92bb5a12 One more FMULx fix. 2009-06-28 14:24:41 +00:00
Phil Bennett
3302f3c512 Really fix FMULx this time 2009-06-28 13:44:22 +00:00
Wilbert Pol
8bb520d0ec Some small tms0980 bug fixes. 2009-06-28 08:06:19 +00:00
R. Belmont
badb1141c4 PPCDRC: fix flags on STWCX and fix FMULS to use the correct registers 2009-06-28 04:59:14 +00:00
Angelo Salese
f656435cbc mc68hc11: fixed a register r/w to allow Skeet Shooter to put some gfxs 2009-06-27 14:06:40 +00:00
Angelo Salese
0b0d5876cb mc68hc11: fixed the I/O system by changing the has_io flag with a has_extended_io flag (switch between 0x40 and 0x100 I/O registers), the latter is used by the Taito JC HC11 CPU only at the current time. 2009-06-26 19:46:06 +00:00
Angelo Salese
77330f38ee mc68hc11: Fixed a bug with TAP opcode
Fixed internal RAM/internal I/O start-up state, and updated Hit Poker driver to use it like it should.
Taito JC driver seems unaffected by this change.

======================================================================================================

http://mamedev.emulab.it/kale/fast/files/memory_map.png
2009-06-26 19:22:46 +00:00
Angelo Salese
604e49b303 mc68hc11: added STX DIR, STY DIR opcodes 2009-06-26 18:41:04 +00:00
Wilbert Pol
75ce6af133 Added TMS0980 cpu core. 2009-06-26 17:49:45 +00:00
Aaron Giles
c8e552b3df Cleanups and version bump. 2009-06-25 08:21:41 +00:00
Aaron Giles
e692918b34 Added casts to ensure proper values are passed to the ctype.h functions.
[Juergen Buchmueller]
2009-06-25 08:04:39 +00:00
Angelo Salese
da2b0e3e8c Fixed breakpoints in the TMS9900 CPU core [Olivier Galibert] 2009-06-24 22:39:23 +00:00
Phil Bennett
6c791836fa Fixed PPCDRC incorrect instruction checksum order [Phil Bennett, R Belmont] 2009-06-24 17:31:17 +00:00
Angelo Salese
dc3b29f1b7 mc68hc11: added user-selectable configs, and hooked up in both drivers 2009-06-23 16:36:28 +00:00
Angelo Salese
30f95d2ce2 MC68HC11: Added STX INDX, STX INDY, STY INDY 2009-06-23 15:36:21 +00:00
Angelo Salese
28d0dcb67e mc68hc11: Added DEC INDX, DEC INDY, INC INDX, INC INDY, SBCA IMM, SBCB IMM, SUBA INDY, SUBB INDY, SUBA EXT, SUBB EXT, NEG EXT, NEG INDX, NEG INDY, SBA
Catched a silly bug with SUBA DIR
Made many fixes with Hit Poker, finally got something that isn't just text...
2009-06-22 23:33:36 +00:00
Angelo Salese
b0d558544f mc68hc11: Added SWI, WAI, STOP, RORA, RORB 2009-06-22 19:12:34 +00:00
Angelo Salese
e0473bb579 mc68hc11: Added LSRA, LSRB, DEC EXT, BLS, NEGA, NEGB, BHI 2009-06-21 23:19:14 +00:00
Angelo Salese
23d8a23308 Small bug-fix 2009-06-21 21:25:36 +00:00
Angelo Salese
d24aa76fdf mc68hc11: hooked up very basic IRQ support. 2009-06-21 21:15:02 +00:00
Angelo Salese
341cb728cd mc68hc11: Added BRCLR DIR, BRSET DIR, RTI, COMA, COMB, CLV [Angelo Salese]
Fixed gfx decoding in Hit Poker [David Haywood]
Made some logic fixes to Hit Poker, it now gets to a "Test IRQ" msg [Angelo Salese]
2009-06-21 20:23:12 +00:00
Angelo Salese
d2d36ebe02 mc68hc11: Added ROLA, ROLB, SUBD INDX, SUBD INDY, SBCA INDX, SBCA INDY, SBCB INDX, SBCB INDY, added basic hook-up for TEST opcode. 2009-06-21 14:54:33 +00:00
Angelo Salese
38cc1f2cc9 mc68hc11: Documented all the remaining missing opcodes, they are 91 out of 310. 2009-06-21 13:30:20 +00:00
Angelo Salese
70cb45d062 mc68hc11: Fixed a CPY IMM DASM bug, added BRCLR INDX, BRSET INDX, BCLR INDX, BSET INDX, CLC, NOP, SUBB DIR, SUBA DIR, SUBA INDX, SUBB INDX, SUBD IMM 2009-06-20 19:48:16 +00:00
Angelo Salese
8a3509b125 mc68hc11: Added LSRD, STX EXT, STY EXT, IDIV, CPY DIR, CPY EXT, CPY INDX, CPY INDY 2009-06-20 16:52:39 +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
Angelo Salese
41b154bf46 Fixed incorrect MUL number of cycles 2009-06-19 19:44:06 +00:00
Angelo Salese
f6943c73e9 mc68hc11: Added SEC & SEV.
Added some basic video emulation to Hit Poker, to let it show "9rror / 3hut 5own -achine"

=========================================================================================

http://mamedev.emulab.it/kale/fast/files/0013_1049739007.png
2009-06-19 19:14:27 +00:00
Angelo Salese
39a1c1804d mc68hc11: Added TBA, ASLA, ASLB, DECA, DECB, STY INDX, MUL, got to the point that it wants an irq. 2009-06-19 17:40:23 +00:00
Angelo Salese
d635ed70fb mc68hc11: Added SUBA IMM, SUBB IMM, INCB, INC EXT, CBA.
Fixed Hit Poker vram accessing.
2009-06-19 16:46:34 +00:00
Angelo Salese
318d6bfd3c mc68hc11: Added JMP INDX, JMP INDY, changed a reg_w assert to a logerror since this game writes 0xff to 0x00-0x3f I/O ports.
Fixed CMPA INDY wrong opcode bug.
2009-06-19 15:21:23 +00:00
Angelo Salese
e3fab21720 mc68hc11: added TXS, TYS, TSX, TSY 2009-06-19 14:54:40 +00:00
Angelo Salese
2fdf957bd5 mc68hc11: added BCC, BVC, BRN, BMI, BVS opcodes 2009-06-19 14:27:50 +00:00
Aaron Giles
cd8f2fb7ce From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Tuesday, June 16, 2009 7:09 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Pointerify minx cpu

Hi mamedev,

I noticed that the minx CPU was never pointerified.  It's only used by
MESS, which might be why it wasn't noticed.

~aa
2009-06-18 04:00:44 +00:00
Angelo Salese
5c25f1ce66 Implemented a new DECO CPU-16 opcode, used by Express Raider for V-BLANK bit and a bunch of liberate.c games for TILT bit.
Converted Express Raider to use the DECO CPU-16 core instead of the plain M6502. [Angelo Salese]
2009-06-15 20:53:42 +00:00
Angelo Salese
fe6c204d5c Fixed a DECO16 CPU core bug that was causing issues with Pro Bowling part of Pro Sports [Angelo Salese] 2009-06-14 23:48:14 +00:00
Angelo Salese
1c07ac88cc Disabled an heavy logerror msg. 2009-06-13 17:03:27 +00:00
R. Belmont
f94776a815 One more GCC 4.4 fix
How did this work before?
2009-06-10 21:52:08 +00:00
Aaron Giles
ef0a31ca13 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, June 07, 2009 9:54 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] "Regularize" some interfaces in MAME

Hi mamedev,

This patch adjusts the code in a few places to be more regular in it
object approach.  It recognizes five idioms.

1.  device_configs should be passed const.  dsp56k.h took a non-const
device_config for no particular reason, necessitating casting where
used.  A few other places cast to non-const, in most cases
unnecessarily.
2.  running_machines should be passed non-const.  A few places used
const in different ways on running_machines, instead of the idiomatic
non-const running_machine.
3.  Eliminate passing running_machine explicitly where it can be
computed.  esrip.c, m37710.c, sfbonus.c had cases where the machine
could easily be eliminated.
4.  Pass the object machine/config first.  In some cases this makes
the interface object oriented, in some cases it simply makes it more
idiomatic with the rest of MAME.
5.  Prefer (screen, bitmap, cliprect) to (machine, bitmap, cliprect).
Fully implementing this would be a large patch, this patch simply does
it for the one core 'device', tms9928a.c.
2009-06-08 06:24:21 +00:00
Aaron Giles
ce83de86a8 The other larger patch adds missing static and const qualifiers, and
fixes up some header files.  In particular, I adjusted const char
*DEVTEMPLATE_SOURCE = __FILE__ to const char DEVTEMPLATE_SOURCE[] =
__FILE__ which makes it actually const and saves a little memory.

[Atari Ace]
2009-06-08 05:43:50 +00:00
Brian Troha
e4df878bd1 fix error as pointed out by Laurent 2009-06-07 16:24:15 +00:00
Brian Troha
03945be4d0 Z80 fixes by "Marshmellow" in emails dated 3/8/2009 to Aaron and verified by Juergen.
Changes cycle counts in cc_xy[0x100] from 9 to 11 for:

0xDD2E 0xFD2E - LD IYL/IXL,n
0xDD26 0xFD26 - LD IYH/IXH,n

Also changes interrupt handling default case from:

z80->icount -= z80->cc_op[z80->PCD] + z80->cc_ex[z80->PCD];

to:

z80->icount -= z80->cc_op[z80->0xff] + z80->cc_ex[z80->0xff];
2009-06-07 15:49:22 +00:00
Olivier Galibert
3ea9b604ca Fix mantis 03013 by hooking strdup into mame's malloc [Atari Ace] 2009-06-07 15:12:07 +00:00
Ryan Holtz
159f54fb67 Fixed a minor typo in the SSEM debugging features. [MooglyGuy] 2009-06-06 19:50:33 +00:00
Aaron Giles
0eed019da7 Cleanups and version bump. 2009-06-04 15:33:42 +00:00
Ryan Holtz
799228d1b4 Corrected a major oversight in the instruction encoding of the SSEM core [MooglyGuy] 2009-06-02 02:18:44 +00:00
Ryan Holtz
7ef80f9393 Added CPU core for the Manchester Small-Scale Experimental Machine (SSEM) from 1948 [MooglyGuy] 2009-06-02 01:11:11 +00:00
Aaron Giles
ab7d486957 Cleanups and version bump. 2009-05-28 15:59:16 +00:00
Aaron Giles
57deed92e8 From: Oliver Stoeneberg [oliverst@online.de]
Sent: Sunday, May 24, 2009 4:11 AM
To: submit@mamedev.org
Subject: Compilation fix for ARM7 core

This fixes the compilation with ARM7_DEBUG_CORE. It was actually
found by Reijo Tomperi from the cppcheck team after I issued a bug
report.
2009-05-28 15:12:42 +00:00
Aaron Giles
0c0affd00e Replaced Namco 52xx sound simulation with emulation of the MCU.
Updated polepos and bosco drivers to use the new 52xx sound
emulation, wiring up the output through the discrete mixer that
Derrick had already plumbed but left disabled.

This required several MB88xx changes/fixes:
 - internal timer support now works; prescaler is guessed based
    on Pole Position sample playback frequency
 - external counter support works
 - a basic mechanism for reading serial input has been added; it
    is not sufficient for a full implementation, but good enough
    to sample the SI pin at startup
 - fixed TSTS/TSTV to clear their respective flags
 - fixed CI and CYI to compute imm-reg instead of reg-imm
 - added masking of the PA register upon RTI/RTS to prevent bogus
    PC values
2009-05-28 09:15:09 +00:00
Aaron Giles
27e2aac0fe Added internal memory maps and internal clock divider to the MB88xx
CPUs. Removed now-redundant memory maps from drivers and removed
explicitly-specified clock dividers.
2009-05-27 14:18:44 +00:00
Aaron Giles
8581fc7b28 CPUs actually take some time to reset. Changed the 68000/68010 to
eat an appropriate number of cycles after a reset.
2009-05-25 23:13:36 +00:00
Aaron Giles
446c154bb1 From: Oliver Stoeneberg [oliverst@online.de]
Sent: Friday, May 15, 2009 9:13 AM
To: submit@mamedev.org
Subject: Unused Variables - second try

This is a new version of the patch, that disables some unused
variables. It fixes some warnings, that came up in an optimized build
and adds a few more things.
2009-05-25 01:03:10 +00:00
R. Belmont
a59e2337ea H8 series MCU updates
- Implemented 8-bit timers and free-running counter for H8/3334
- Added bld #imm, @Rd instruction
- Improvements to interrupts and the serial ports
2009-05-18 03:55:28 +00:00
Wilbert Pol
bc5d8587c4 Moved the configuration of m6502-family callbacks to the cpu configuration. 2009-05-15 19:28:52 +00:00
Aaron Giles
4063eeeaca From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, May 10, 2009 5:41 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Static qualifier update

Hi mamedev,

Here's my periodic static qualifier patch for MAME, mostly adding
static to new code introduced over the past couple of months.

~aa
2009-05-15 05:24:32 +00:00
Wilbert Pol
7dc342691f fix typo 2009-05-14 16:28:09 +00:00
Aaron Giles
a909ca4b4a Fixed MCS-51 to not access RAM in wraparound fashion.
Hooked up Noboranka MCU (very different from the others).

New games working: Noboranka
2009-05-13 15:53:11 +00:00
Nathan Woods
4b092a9122 Readded read_vector callback 2009-05-13 02:53:12 +00:00
Aaron Giles
00c5f34211 MCS-51 fixes:
* jb int0,<self> loops are now broken out of if int0 comes and is taken
 * externally-clocked counters only count when enabled

System 1 changes:
 * hooked up 8751 properly
 * removed old 8751 hacks
 * shuffled Shooting Master sets

New Games Marked Working
------------------------
Choplifter (8751 315-5151)
Shooting Master (EVG, 8751 315-5159a)
2009-05-11 09:14:26 +00:00
Angelo Salese
9216688bb1 Added a work-around for the UART FIFO read only status register on the SH-4 to make Tetris Kiwamemichi happy to boot.
It crashes shortly after that like La Keyboard though (jumps to an unmapped address).
2009-05-09 19:18:36 +00:00
smf-
1443386e33 fixed visual studio 64 bit compile 2009-05-07 19:43:17 +00:00
Aaron Giles
673ca66750 Cleanups and version bump. 2009-05-07 15:46:14 +00:00
Aaron Giles
d72f98cb3c Fix MCS51 disassembler to work properly when there are two
memory arguments (the second would overwrite the first).
2009-05-07 13:59:46 +00:00
Ryan Holtz
29f46d4576 - Fixed display of the i8085's SP register when in the debugger. [MooglyGuy] 2009-05-06 15:19:41 +00:00
R. Belmont
4c4564753a H8: Better interrupt handling for the 8/16 bit H8s. 2009-05-03 14:53:17 +00:00
Aaron Giles
9eb86548bb Added missing casts and made other tweaks. The entire project
can now be optionally compiled with the C++ compiler (mingw g++
only for the moment; MSVC still has issues).
2009-04-27 09:18:17 +00:00
Aaron Giles
ad4910a8a8 Bulk change alert.
This update changes the way we handle memory allocation. Rather
than allocating in terms of bytes, allocations are now done in
terms of objects. This is done via new set of macros that replace
the malloc_or_die() macro:

  alloc_or_die(t) - allocate memory for an object of type 't'
  alloc_array_or_die(t,c) - allocate memory for an array of 'c' objects of type 't'
  alloc_clear_or_die(t) - same as alloc_or_die but memset's the memory to 0
  alloc_array_clear_or_die(t,c) - same as alloc_array_or_die but memset's the memory to 0

All original callers of malloc_or_die have been updated to call these
new macros. If you just need an array of bytes, you can use
alloc_array_or_die(UINT8, numbytes).

Made a similar change to the auto_* allocation macros. In addition,
added 'machine' as a required parameter to the auto-allocation macros,
as the resource pools will eventually be owned by the machine object.
The new macros are:

  auto_alloc(m,t) - allocate memory for an object of type 't'
  auto_alloc_array(m,t,c) - allocate memory for an array of 'c' objects of type 't'
  auto_alloc_clear(m,t) - allocate and memset
  auto_alloc_array_clear(m,t,c) - allocate and memset

All original calls or auto_malloc have been updated to use the new
macros. In addition, auto_realloc(), auto_strdup(), auto_astring_alloc(),
and auto_bitmap_alloc() have been updated to take a machine parameter.

Changed validity check allocations to not rely on auto_alloc* anymore
because they are not done in the context of a machine.

One final change that is included is the removal of SMH_BANKn macros.
Just use SMH_BANK(n) instead, which is what the previous macros mapped
to anyhow.
2009-04-26 23:54:37 +00:00
Wilbert Pol
3e9927b878 TLCS-900/H cpu core fixes:
- Reimplemented hdma
- Fixed bugs in the EX (mem), R instructions.
2009-04-25 16:47:22 +00:00
Aaron Giles
7b90e01659 Deprecated device_set_info. Almost all devices had a NULL or empty
function here. Remaining devices have been converted to have 
device-specific functions to do the same thing with proper type 
checking.

CPUs still have a set_info function but it is CPU-specific now and 
no longer piggybacks on the general device function.
2009-04-23 16:33:28 +00:00
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
Aaron Giles
98b88c617b Removed cpunum_get_active() calls from a number of CPU cores.
Normalized 6502 state variable to the generic 'cpustate' which
makes the macros work more cleanly.
2008-11-26 19:35:58 +00:00
Aaron Giles
e1f5ed6caf Pointer-ified the hyperstone core, and removed all activecpu refs. 2008-11-26 16:23:41 +00:00