Commit Graph

3881 Commits

Author SHA1 Message Date
Roberto Zandona
dcc258f634 added pal in arkgcbl 2008-12-20 12:53:47 +00:00
Aaron Giles
f32fa3b2e6 02745: all sets using autosave: Games using autosave segfault on startup 2008-12-20 07:39:19 +00:00
Aaron Giles
446f13607f Memory view fixes:
* Fixed bug that computed the wrong total size if the address
  space was a full 32 bits
* Improved display to show unmapped memory with *s
* Disabled enumeration of disk and 0-length regions
2008-12-20 07:25:39 +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
bc33516388 Oops, missed this file. 2008-12-20 00:06:49 +00:00
Aaron Giles
165be1ee47 Z180 uses new cpu_state_table 2008-12-19 23:04:42 +00:00
Aaron Giles
63a6f364f8 Fixed registers view to only show those entries valid for the
CPU type.
2008-12-19 22:34:19 +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
Andrew Gardner
3fdd1d460a Decoded some graphics and setup some RAM in the Virtual Combat driver. [Andrew Gardner] 2008-12-19 03:59:48 +00:00
Roberto Zandona
a382407df8 fixed proms in boobhack 2008-12-18 22:40:04 +00:00
Wilbert Pol
4830ff3e28 Some PIC8259 updates:
- Fixed operation of edge-triggered interrupts
- INT output line is now cleared when an IRQ is acknowledged
- Implemented basic OCW3 features
2008-12-18 20:23:45 +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
785b6a50c6 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Wednesday, December 17, 2008 9:03 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] STREAM_UPDATE update

Hi mamedev,

This patch modifies the parameters of the stream_update_func callback.
The first two patches go through and changes all the callbacks to use
a consistent set of parameters (the larger patch was mechanically
generated, the smaller second patch are hand edits where review or
compilation showed issues with the automatic conversion).  The third
patch then macroizes all the callbacks to STREAM_UPDATE, and was done
mechanically except for the change to streams.h.  The fourth patch
then adds device to the callback, and eliminates Machine in a handful
of callbacks by referencing the device.  deprecat.h -= 8.

~aa
2008-12-18 08:32:50 +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
Yasuhiro Ogawa
09f7e1e8d1 Finalizer update (by poUzVdb90):
- converted to tilemap
- added flipscreen
- changed sound chip name from SN76496 to SN76489A
2008-12-17 15:44:04 +00:00
Aaron Giles
2ed5fee4bb Fix compile error. 2008-12-17 15:15:21 +00:00
Aaron Giles
804860a75c Added the concept of device "owner", for devices owned by other devices.
Modified laserdisc players to walk back to their global device state
via the owner, rather than brute-force searching for the first instance
and hoping that is the right one.
2008-12-17 06:12:58 +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
R. Belmont
ab8b93e1d1 Improved 64-bit fix. 2008-12-17 05:42:57 +00:00
R. Belmont
84afc85712 Fix fatal pointer truncation on 64-bit builds. 2008-12-17 02:48:17 +00:00
Aaron Giles
4f266b6da4 Hi mamedev,
More deprecat.h cleanup in the core, notably changing the apis for
poly_alloc. I also made cpu_get_index_slow fatalerror on failure 
since no one is checking the return value.

deprecat.h -= 14, Machine -= ~55

~aa
2008-12-16 16:32:05 +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
Roberto Fresca
76e6a7abc4 Funworld.c improvements...
- Added new set: Jolly Card (italian, encrypted bootleg).
   No coins... Only remote credits. After nvram init, set the Payout DIP to 'manual'
   to allow the remote credits mode to work.
 - Created inputs from the scratch for jolycdib.
 - Updated technical notes.

New clones added
----------------
Jolly Card (italian, encrypted bootleg) [Roberto Fresca]
2008-12-15 07:31:18 +00:00
Aaron Giles
a1bd0a2a92 Removed old cherrym driver. 2008-12-15 05:52:19 +00:00
Aaron Giles
7808378272 Fixed duplicate driver. 2008-12-15 02:06:58 +00:00
Aaron Giles
54db8f077b Cleanups and version bump. 2008-12-15 01:46:32 +00:00
Aaron Giles
f65131343d Added proper artwork for the led in Gridiron Fight [David Haywood]
-----Messaggio originale-----
Da: David Haywood [mailto:neohaze@nildram.co.uk] 
Inviato: domenica 14 dicembre 2008 23.56
A: Angelo Salese
Oggetto: Gridiron update

Changed it from using a hack using the gfx rom to display the 'play 
number' to using the LEDs in the artwork system.
2008-12-15 01:12:26 +00:00
Aaron Giles
4ef83e02c3 This adds Jackie to the Champion Skill HW.
New games marked as GAME_NOT_WORKING
------------------------------------
Jackie [David Haywood]

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

(Personally I'm not really interested in this one at the moment (I'm not
enough keen with Champion Skill HW and its fancy I/O stuff), however it
should be slightly different memory map + different protection)

roms/current/j/jackie.zip
2008-12-15 01:08:32 +00:00
Aaron Giles
1f54995066 -Merged goldstar.c & cmaster.c drivers
-Converted the Reels video to Tilemaps [David Haywood]

New clones
----------
(New?) Cherry Bonus III [David Haywood]
Cherry Bonus III [David Haywood]

New non-working
---------------
Cherry Master (Corsica, v8.01) [David Haywood]
Cherry Master 91? [David Haywood]

-----Messaggio originale-----
Da: David Haywood [mailto:neohaze@nildram.co.uk] 
Inviato: domenica 14 dicembre 2008 22.20
A: Angelo Salese
Oggetto: Gold Star update

I converted the Reels video to Tilemaps
merged cmaster.c with this, since it's basically the same thing, but 
with some changes..  made a few improvements to that.

also added another cherry master set, might be "cherry master '91" but 
it's probably running on an extended version of the hardware as it has 
extra roms etc.

it's still rather messy..   seems this game / hardware was used for the 
base of a lot of hacks, and it's really hard to know what the originals 
were...

------------------------------------------------------------------------

the cherry bonus 3 sets seem to be the same game as goldstar ....

again these were just random messy sets on f205v's pcb with no proper info,
no proms etc. ... ncb3 boots, and does show a dyna logo .  cb3 seems to be
encrypted.
2008-12-15 01:05:48 +00:00
Aaron Giles
6b4efba253 Queen [David Haywood]
This adds the "Queen" game into a driver (a.k.a. the 2002 PC-era game)
(roms are already on the ftp,I believe)

-----Messaggio originale-----
Da: David Haywood [mailto:neohaze@nildram.co.uk] 
Inviato: venerdi 12 dicembre 2008 0.05
A: Angelo Salese
Oggetto: Queen Skeleton..

Didn't think the queen was dead yet, but here is her skeleton ...
2008-12-15 00:58:31 +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
Aaron Giles
04fbf4f825 Removed unnecessary masking in disassembly view.
Changed console subview computations to leave the registers portion
fixed.
2008-12-14 21:34:02 +00:00
Brian Troha
eb83e4e9b8 Change parent/clone relationship to MAME standards (by request ;-) 2008-12-14 20:18:05 +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
Angelo Salese
0a5ed5cca3 (...and fixed a mcu incorrect clock speed while testing that bug) 2008-12-14 16:17:25 +00:00
Angelo Salese
0508c76687 Fixed subtle communication bug with Jangou Lady 2008-12-14 16:11:33 +00:00
Angelo Salese
4a35cb2d18 Added Jangou Lady to the Jangou driver. [David Haywood,Angelo Salese,Phil Bennett]
New games added or promoted from NOT_WORKING status
---------------------------------------------------
Jangou Lady [David Haywood,Angelo Salese,Phil Bennett]
2008-12-14 15:35:02 +00:00
Roberto Zandona
10560d6018 m90: removed wrong info about riskchal
cb2001: updated decryption table
2008-12-14 10:01:01 +00:00
Aaron Giles
21831461f2 Fix a couple of regressions. 2008-12-14 09:03:15 +00:00
Aaron Giles
a7db377c87 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, December 13, 2008 5:07 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add machine to allocgfx

Hi mamedev,

This patch eliminates the #include "deprecat.h" from drawgfx.h.  It
does so in a fashion similar to my recent tilemap patch, adding the
machine pointer to gfx_element, changing allocgfx to take a machine,
and then adjusting the internals to use the machine field as needed.
The changes outside of drawgfx.[ch] were done with the attached
script.

~aa
2008-12-14 08:45:12 +00:00
Aaron Giles
9830575ad0 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, December 13, 2008 1:34 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add machine parameter to tilemap_create()

Hi mamdev,

This set of patches eliminates the #include "deprecat.h" from
tilemap.c.  The main change is to require callers of tilemap_create to
provide a machine pointer.  This pointer is then attached to the
tilemap and used when needed inside tilemap.c.

The first patch simply adds running_machine *machine to some driver
functions that will soon need them.  The second patch makes the needed
changes to tilemap.[ch].  The (large) third patch adds machine to all
the tilemap_create calls, and was generated entirely by the attached
script.

~aa
2008-12-14 08:34:41 +00:00
Aaron Giles
98b3cf37e7 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, December 13, 2008 6:58 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] additional sound core deprecat.h removal

Hi mamedev,

This patch removes most of the remaining deprecat.h includes in the
sound cores.  deprecat.h -= 8.

~aa

--

From: Atari Ace [mailto:atari_ace@verizon.net] 
Sent: Saturday, December 13, 2008 10:14 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] final sound core deprecat.h cleanup

Hi mamedev,

This patch removes the last three deprecat.h includes from the sound
cores.

~aa
2008-12-14 08:20:09 +00:00