Commit Graph

1099 Commits

Author SHA1 Message Date
Aaron Giles
2d6453c98a Made the Z80 daisy chain aware of referencing device-specific devices.
Added preliminary LD-V1000 emulation. Not fully working yet, but mostly
there.

Cleaned up and normalized the three existing laserdisc emulations.
Removed obsolete code from the laserdisc core.
2008-10-09 05:31:15 +00:00
Couriersud
7494be5525 Removed speed hack - this would break the protection for lohtb2 2008-10-07 23:07:09 +00:00
Roberto Fresca
c6ec8026bc Fixed the i8051 AJMP opcode to take 2 bytes instead of 3.
Please also credit Grull Osgo.
2008-10-06 21:57:27 +00:00
Roberto Fresca
d3cc1b9742 Fixed timers in i8051 core. [Grull Osgo] 2008-10-06 21:36:30 +00:00
Aaron Giles
e9dd491777 Added correct overlay positioning, font, and behavior to PR-8210 emulation. 2008-10-06 08:34:48 +00:00
Aaron Giles
099373081e Added new functions for building device-relative tags. Changed machine
configuration builder to use these functions. Also changed the laserdisc
player devices to use them. Updated Z80 CTC/SIO code to assume that the
CPU provided for the clock is relative to the device that the CTC/SIO
belong to. Updated memory code to assume that regions and devices
referenced by the memory map are relative to the device the associated
CPU belongs to.
2008-10-03 16:29:33 +00:00
stephh
fc54f63a09 Removed unneeded keys by removing the constants.
Readded UI_ON_SCREEN_DISPLAY to be changed again in the "Inputs" menu as per Aaron's request.

A clean build is required and cfg/default.cfg has to be deleted !
2008-10-03 04:00:41 +00:00
Nathan Woods
17b9549fef Fixed broken prototypes 2008-10-03 03:27:37 +00:00
Aaron Giles
f90a19f2bc MSVC compiler error. 2008-10-02 15:05:46 +00:00
Aaron Giles
5123b07115 Cleanups and version bump. 2008-10-02 05:34:21 +00:00
Aaron Giles
cf63e2baa8 Fixed handling of interrupts when the CPU was in the STOP state. 2008-10-02 05:31:24 +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
4e9364ded5 Stupid compiler. 2008-10-01 17:12:04 +00:00
Aaron Giles
ce465cb509 Changed 68000 interrupts to only trigger during execution. This
means that multiple changes without any execution will be seen as
atomic. It also means that PULSE_LINE no longer works for signalling
IRQs.

Added checks in the debug build to catch people who try to use
PULSE_LINE for non-NMI and non-RESET input lines on CPUs that no
longer support direct interrupt generation. Over time expect this
list to increase.
2008-10-01 17:09:11 +00:00
Aaron Giles
34cd80a8e5 Added mechanism to generically specify input port tags in place of
machine/device handlers. Unfortunately, the implementation relies on
sentinel values to distinguish a port tag versus a pointer to function
code. However, since this is a very common situation, it will hopefully
be worth the slight grossness. New macros are defined in inptport.h:

   DEVICE8_PORT(name) - use this to specify the name of a port to read
     wherever a read8_device_func would normally be used

   MACHINE8_PORT(name) - same as DEVICE8_PORT except it can be used
     wherever a read8_machine_func would normally be used

   IS_HANDLER_PORT(ptr) - accepts a read8_device_func or read8_machine_func
     and determines if it is an actual function or a reference to a port;
     intended for use by devices that accept DEVICE8_PORT-style functions

   CALL_DEVICE8_READ(ptr,device,offset) - either calls through the given
     read8_device_func, or calls input_port_read with the appropriate
     tag, depending on the result of IS_HANDLER_PORT; intended for use 
     by devices that accept DEVICE8_PORT-style functions

   CALL_MACHINE8_READ(ptr,machine,offset) - same as CALL_DEVICE8_READ
     except for read8_machine_func

Note that in order for these to be useful, the consumer of the function
pointer must be enhanced to use the CALL_* macros above instead of directly
calling through the function. So far, only the 8255 PPI is set up to do
this, as part of the cleanup below. Also note that the sentinel value is
currently 4 consecutive 0 bytes; this may need to change in the future, in 
either length or value, so it is important to stick to the macros above.

8255 PPI interface cleanup:
 - added MDRV_PPI8255_ADD, MDRV_PPI8255_RECONFIG and
    MDRV_PPI8255_REMOVE macros; updated all drivers to use them
 - changed callbacks to device read/write handlers intead of
    machine read/write handlers; updated all drivers accordingly
 - normalized function and variable names to be lower_under
 - removed a number of redundant interfaces from the galaxian/
    scamble line of games

LD-V1000: added some (compile-time removed) information about the
ROM and memory map
2008-10-01 16:36:04 +00:00
Andrew Gardner
8515504a7b Added additional Motorola DSP56k reset behavior. (Andrew Gardner) 2008-10-01 04:24:46 +00:00
Aaron Giles
e3dd5224c0 Converted Z80 SIO to device. Updated drivers accordingly. 2008-09-30 05:29:59 +00:00
Aaron Giles
f4dc7a2f36 Converted Z80 CTC to a proper device. Updated all drivers.
Added new item to the interface which is the tag of a CPU
to take the base clock from. Are there any known cases
where the base clock does NOT come from the CPU directly?

Changed Z80 daisy chain interface to simply be a list of
devices in the chain. Interrupt callback functions are now
fetched via the standard device interface and referenced by
the daisy chain code.

Changed Z80 PIO interrupt callback to pass a device instead
of the machine. All device callbacks should provide the
device.
2008-09-29 17:20:58 +00:00
Aaron Giles
3355357ffc Simplified core deinterlacing logic based on availability of pre-
decoded VBI data. Added plumbing for allowing for overall brightness/
contrast/gamma corrections on laserdisc video. Fixed bug when combining
brightness values in the palette logic.
2008-09-29 09:23:22 +00:00
Aaron Giles
296347baab Plumbed machine parameters through the renderer. Removed need for
deprecat.h.

Changed render_texture_set_bitmap() to accept a palette object 
instead of a palette index. The renderer remains optimized for the 
system palette but will work if objects have their own palette as 
well.

Changed renderer to permit palettes for RGB and YUY textures. If
specified, these palettes specify a 32-entry (RGB15) or 256-entry
(others) lookup for applying additional brightness/contrast/gamma
on a per-texture basis.

Removed rescale notification. It never really worked that well and 
violated proper layering.

Renamed palette_set_brightness() to palette_set_pen_contrast() for 
clarity.

Changed palette objects to support global brightness/contrast/gamma
in addition to per-group and per-entry controls.
2008-09-29 08:02:58 +00:00
Wilbert Pol
08e57e7e28 Converted the z80pio implementation into a device. 2008-09-28 15:32:18 +00:00
stephh
e8896b0416 Removed unneeded keys :
- UI_ON_SCREEN_DISPLAY (there is now a "Slider Controls" menu)
  - UI_ADD_CHEAT, UI_DELETE_CHEAT, UI_SAVE_CHEAT, UI_WATCH_VALUE, UI_EDIT_CHEAT, UI_RELOAD_CHEAT (these keys belonged to the old cheat engine)

A clean build is required and cfg/default.cfg has to be deleted !
2008-09-28 14:56:17 +00:00
Aaron Giles
6c05b835a2 02442: -aviwrite produces faulty files 2008-09-27 22:48:52 +00:00
Aaron Giles
2a3301d0b9 Removed render_container_set_palette_alpha() hack. Now the alpha value
can be set directly in the palette entry and will be respected for
laserdisc overlays.
2008-09-27 22:05:30 +00:00
Nicola Salmoria
9ff6c5bb96 added pen_mask tile attribute to the tilemap system.
implemented dynamic tile & sprite bit depth in the Taito F3 driver.
02024: pbobble3, pbobble4, ringrage and clones: Color Regression
2008-09-27 17:30:17 +00:00
Aaron Giles
229d598989 Cleanups and version bump. 2008-09-26 13:42:51 +00:00
Aaron Giles
decc35b5f2 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Sent: Thursday, September 25, 2008 3:15 AM
To: submit@mamedev.org
Subject: using macros in UI message

This patch changes the message, that appears when no roms have been 
found, to use the macros instead of hard-coded strings
2008-09-26 05:32:29 +00:00
Aaron Giles
3d65b57f77 From: Micko [mailto:mmicko@gmail.com]
Sent: Tuesday, September 23, 2008 4:46 AM
To: Aaron Giles
Subject: 8080 bug

To fix this bug : http://mametesters.org/mantis/view.php?id=2322
 
a part of my code should be removed.
 
It seams that this feature I have added is only available on KP580BM80A (Russian clone of this processor).
 
So until I make a new patch (that support this clone processor)  please apply this to fix MAME drivers.
 
Thanks,
Miodrag
2008-09-26 05:27:00 +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
844dca9402 -listroms knows about device-specific ROMs now. 2008-09-26 05:00:14 +00:00
Aaron Giles
9b72b5abc4 Added 22VP931 emulation, which is mostly working. Communication works
fine and basic searching/playback/skipping is functional. Still a bit
glitchy.

Firefox improvements:
 - removed need for deprecat.h
 - memory map is complete from schematics
 - gutted laserdisc hacks in favor of actual laserdisc implementation
 - fixed all CPU and sound clocks
 
Removed old laserdsc.c implementation.

Added generic timer devices, which simply allocate a timer but don't
prime it. This is the preferred method for allocating timers, and may 
eventually be the only mechanism for doing so in the future.
2008-09-25 16:21:35 +00:00
Wilbert Pol
e4dc04a323 rescale_notifier() changed to always allow rescaling for screenless drivers. 2008-09-25 10:02:46 +00:00
Aaron Giles
fad77cb08e Fixed AF calculation in mcs48. 2008-09-24 15:54:13 +00:00
R. Belmont
8e3cd1573d 65816/377xx: fix disassembly of BRL [ShimaPong] 2008-09-24 03:25:11 +00:00
Aaron Giles
990ef98b53 02280: any set with multiple CPUs: Disassembler freezes when doing a Run on any CPU other than CPU 0 2008-09-22 06:06:23 +00:00
Andrew Gardner
49c8293fd9 Rewrite of the Motorola DSP56k disassembler. (Andrew Gardner)
(Same changelog as before - found another couple - not worth adding to whatsnew)
2008-09-19 02:49:18 +00:00
Andrew Gardner
66954044d1 Rewrite of the Motorola DSP56k disassembler. (Andrew Gardner)
* Fixes branch relative offset decoding.
2008-09-19 02:28:20 +00:00
Andrew Gardner
e5efb8a895 Rewrite of the Motorola DSP56k disassembler. (Andrew Gardner)
* Removes arbitrary opcode groupings in favor of flat decode model.
* Fixes a number of small issues with unknown opcodes.
* Added the final ALU parallel move ops.
2008-09-19 02:07:52 +00:00
Aaron Giles
7f819dbfef Cleanups and version bump. 2008-09-18 16:17:42 +00:00
Aaron Giles
5f597be8b1 From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Sent: Wednesday, September 17, 2008 10:31 PM
To: submit@mamedev.org
Subject: Shadow Force clocks

Verified cpu clocks and corrected/verified OKI M6295 frequencies and pin

7 status. Updated Xtal.h file
2008-09-18 16:09:58 +00:00
Aaron Giles
db3e968a6d CPU-internal regions now have priority again. Fixed mario by
installing a handler in the SOUND_START function.

02249: All Sets in zn.c: Game Hangs 
02248: All sets in m58.c: No sound in game 
02241: kncljoe, kncljoea: Missing AY-3-8910A sound effects. 
02240: All Sets in namcos12.c: Game Freeze 
02239: stunrun: No OKI6295 sound.
2008-09-18 15:54:25 +00:00
Aaron Giles
eab7222f92 Fix compile error. 2008-09-18 15:35:44 +00:00
Aaron Giles
1eb3c2d964 Changed requirements for laserdisc CHDs to require a new chunk of
metadata with pre-decoded frame information. Modified chdman to
automatically produce this for CHDs that are of the appropriate
parameters. To fix up existing CHDs, use chdman -fixavdata on the
CHD.

Modified the laserdisc core to leverage the pre-decoded frame
metadata, which is now required. This improves seek times when
searching and allows the player-specific emulation access to the
VBI data as soon as it would really be available. Changed update
callback timing to fire just before the first line of VBI data
would be read; at that point, the frame selection is assumed to
be committed. 

Converted PR-8210 emulation over to using the actual MCU from the
laserdisc player. This MCU controls low-level functions such as
slider position and laser on/off, and receives decoded vertical
blanking data in order to make decisions. Removed old HLE behavior.
Note that the overlay text is displayed via the UI; this is
temporary and will be fixed shortly.

Converted Simutrek-hacked laserdisc emulation to using the actual
MCU from the game, which in turn hands off commands to the PR-8210
MCU. This is still not 100% but is pretty close at this point and
achieves the correct behaviors in most cases.

Fixed Cube Quest overlay scaling to cover the whole screen.

Changed laserdisc video parameters to position the screen area at
the bottom rather than the top, since this corresponds more closely
to standard line numbering.

Extended the vbiparse code to support pack/unpack, and to more
fully document all the meanings of the VBI codes.

Updated ldplayer to support slow/fast forward movement, frame/chapter
display, and separate controls for scanning/stepping.

Added new built-in variable "frame" to the debugger.

Fixed device-based ROM loading to support loading ROMs from the
game's ZIP as well.
2008-09-18 15:17:42 +00:00
Phil Bennett
6ff2372d8c Namco NA-2: Use real C70 BIOS. Removed sound and input simulation code. Changed the NA-1/2 MCU type to M37702. 2008-09-14 17:51:01 +00:00
smf-
75e68187dc preliminary firefox emulation. 2008-09-13 07:58:39 +00:00
Aaron Giles
fc453dc652 Fixed crash when hitting watchpoints on static handlers. 2008-09-13 06:36:29 +00:00
Aaron Giles
aa2b6bd29a Cleanups and version bump. 2008-09-11 16:25:46 +00:00
Aaron Giles
ae2d1ed21a Ok, I submit. Maximum tag length is 15. Be good. 2008-09-11 16:04:35 +00:00
Aaron Giles
3d1dbafcc2 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: Machine -> machine

This is a big patch adding running_machine* parameters and using 
"machine" where available.
2008-09-11 15:57:52 +00:00
Aaron Giles
0b3ae8f72d C352 cleanups
Remove an unused volume table dating from before the volume was
    (correctly) implemented as linear.
    
    Add a tab where appropriate.
2008-09-11 15:38:20 +00:00