Commit Graph

10 Commits

Author SHA1 Message Date
Aaron Giles
9407fecd2d Populated tag and static_config parts of fake CPU device. Removed 'config'
parameter from CPU_INIT. Modified CPU cores to pull config from the device
static_config.
2008-11-09 07:12:24 +00:00
Aaron Giles
2ba1a99283 Added macros for all CPU callbacks to ease future changes.
Updated all CPU cores to use them.
2008-11-08 09:20:43 +00:00
Aaron Giles
b44da3b748 WARNING: This is a significant change. If you are risk-averse and
working on something, hold off syncing.

Defined macros for core CPU functions: CPU_INIT, CPU_RESET, CPU_EXIT,
CPU_EXECUTE, along with macros for the name and for calling, in the
spirit of the devintrf.h macros. More will come later.

Changed init, reset, exit, and execute interfaces to be passed a
const device_config * object. This is a fake object for the moment,
but encapsulates the machine pointer and token. Eventually this will
be a real device.

Changed the CPU IRQ callbacks to a proper type, and added a device
parameter to them.

Updated all CPU cores to the new macros and parameters.

Note that this changes the way we "pointer"-ify cores. I'll send an
update shortly.
2008-11-06 18:42:37 +00:00
Phil Bennett
40520a87cd Fix MT 02140: "cube quest crashes mame when saving state" 2008-10-21 20:42:56 +00:00
Aaron Giles
adaaf55595 From: Matt Ownby [mailto:matt.ownby@gmail.com]
Sent: Fri 9/26/2008 10:15 AM
To: submit@mamedev.org
Cc: Philip Bennett
Subject: fix for Cube Quest Line CPU emulation
I found a bug in the emulation of the Cube Quest Line CPU.

Proof of bug:
After looking at .diff,
Assume 'ci' is 1, and assume 'r' and 's' are both 0xFFF 
(0xFFF equals -1, as these numbers are 12-bit signed).
The result should be mathematically equivalent to -1 - (-1) 
which is 0.
~0xFFF is 0xF000, so you'd have 0xF000 + 0x0FFF + 1 which equals 
0x10000 but since 'res' is 16-bits this is truncated to 0x0.  
'C' then becomes 0 and 'V' becomes 1 (as I recall).  The result of 
0 is correct, but the flags are wrong; V should be 0 and C should 
be 1.

Under my proposed fix, you'd have 0x000 + 0x0FFF + 1, which equals 
0x1000, so the lower 12 bits are 0 (correct) and C is 1 and V is 0 
(correct).

I discovered this bug while disassembling the line CPU's ROM.
2008-10-02 05:04:06 +00:00
Aaron Giles
0f3e79564d From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Sunday, September 21, 2008 10:45 AM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static qualifiers

Hi mamedev,

Another static function update from yours truly, almost entirely
affecting code added in the last few months to MAME.  The fixes are
the usual lot, changing enum definitions so they aren't declared,
decorating dead code/declarations with #if...#endif, and of course,
adding static where appropriate.  In addition, I fixed a bunch of
UNUSED_FUNCTON symbols to be spelled correctly (I didn't introduce
this).

~aa
2008-09-26 05:25:11 +00:00
Aaron Giles
b10a182054 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Even more reset/multisession cleanup

Hi mamedev,

These two patches try to reduce the amount of variable in .data, which
usually point to multisession/reset bugs or missing const qualifiers.
The first patch just adds const to a number of items, moving them from
.data to .rdata.  The second patch sets other items to zero (moving
them to .bss), adding reset/init code where appropriate.

~aa
2008-09-11 15:14:39 +00:00
Aaron Giles
05915406d0 Missing include. 2008-09-04 15:11:10 +00:00
Aaron Giles
0523e9feb7 Cleanups and version bump. 2008-08-19 07:31:55 +00:00
Aaron Giles
284b5a0d95 Added new generic laserdisc VIDEO_UPDATE handler to the laserdisc code.
This handler works for both disc-only games and those with overlays. 
For disc-only games, the base macro is sufficient. For games with 
overlays, an additional set of configuration macros are provided:

   MDRV_LASERDISC_OVERLAY - specifies update function, width, height,
      and bitmap format of the overlay
   MDRV_LASERDISC_OVERLAY_CLIP - specifies the visible area of the
      overlay bitmap
   MDRV_LASERDISC_OVERLAY_POSITION - specifies default x,y position
   MDRV_LASERDISC_OVERLAY_SCALE - specifies default x,y scale factors

The update function provided to MDRV_LASERDISC_OVERLAY is identical to
a normal VIDEO_UPDATE callback, so a standard one can be used. All
existing laserdisc drivers have been updated to support this new
rendering mechanism, removing much duplicated code.

Added the ability to configure the overlay position and scale 
parameters at runtime. Added OSD menus to control them. Added logic
to save/restore the data in the game's configuration file.

Added new macros MDRV_LASERDISC_SCREEN_ADD_NTSC and _PAL, which
defines a standard screen with the correct video timing characteristics
and update function for laserdiscs. Updated all drivers to use these
macros instead of defining their own screens.

Added DISK_REGIONS to all laserdisc drivers.

Added DISK_IMAGE_READONLY_OPTIONAL to support games (like Cube Quest)
where the disk is non-essential to the game's operation.

Fixed bug in identifying the custom sound driver for the laserdisc.

Updated ldverify to identify blank regions of the disc for post-
processing.

Fixed rendering 16bpp with alpha using bilinear filters (fixes
screenshots of laserdisc games with overlays).

Included support for parsing .gdi files in chdman. [ElSemi]

Added new driver for Cube Quest. This includes CPU cores for the three
bitslice processors, as well as laserdisc support for the hacked
laserdisc that was used to drive the games. 
[Philip Bennett, Joe Magiera, Warren Ondras]

Note that the SHA1/MD5 for the laserdisc will likely undergo at least
one more change before being finalized.
2008-08-18 04:31:08 +00:00