Commit Graph

21182 Commits

Author SHA1 Message Date
Zsolt Vasvari
34b3ab9841 Added running_machine* to the CUSTOM_INPUT callback - updated drivers to use it 2008-03-03 05:17:57 +00:00
Zsolt Vasvari
62466dd08f - Added PORT_CHANGED macro which calls a callback if the given port changes.
Usage is very similar to PORT_CUSTOM.  See the Astro Invader driver for an example
- Removed input_port_set_changed_callback and converted all users to PORT_CHANGED
  The only difference between the old callback and the ones supplied by PORT_CHANGED is
  that values passed by PORT_CHANGED are normalized to start at bit 0, just like
  PORT_CUSTOM.
2008-03-03 04:10:51 +00:00
Aaron Giles
e31f9a6313 Normalized function pointer typedefs: they are now all
suffixed with _func. Did this throughout the core and
drivers I was familiar with.

Fixed gcc compiler error with recent render.c changes.
gcc does not like explicit (int) casts on float or
double functions. This is fracking annoying and stupid,
but there you have it.
2008-03-03 01:51:31 +00:00
Zsolt Vasvari
05702939cd Removed used srcnum from ccpuRegs
State saves more stuff -- wasn't 100% sure if they are all needed saved, but it appears they do.
2008-03-03 01:22:21 +00:00
Aaron Giles
8042e50f87 Added video_screen_get_time_until_vblank_end() and
video_screen_get_time_until_update().

Fixed CCPU and QB3 to no longer rely on cpu_scalebyfcount().
Fixed busted timing in the CCPU core. Changed watchdog to
count internally rather than using external watchdog support.
Altered CCPU to accept interrupt signals from the driver.
Updated clocks in the cinemat driver to be derived from the
clock crystal.
2008-03-03 01:02:16 +00:00
Zsolt Vasvari
713f03885f MC6845: Added support for the Commodore 6545-1 device type
Added support for the status register
Pops up message if display mode is not zero
some minor clean-ups
2008-03-02 23:25:35 +00:00
Couriersud
490713dea8 render.[ch]: change type of target_orientation in target_compute_visible_area to int for consistency with other calls. 2008-03-02 22:21:54 +00:00
Couriersud
c2a1232ea1 Rename dkngjnrb to dkongjre - Credit Mike Haaland 2008-03-02 20:13:20 +00:00
Brian Troha
7d4bfdf1f1 Corrects some documentation and rom names.
Minor whitespace clean up.
Slight reorganization to be consistent through out driver
2008-03-02 18:51:22 +00:00
Couriersud
e8c24a40d9 Changed z80dma to new device interface, updated mario.c and dkong.c to use new interface
* Illustrates how to keep existing memory read/write handlers
  This is slower than caching the device interface, but does not have an impact on
  devices accessed at a low frequency like in this case.
2008-03-02 15:40:24 +00:00
Zsolt Vasvari
75a0723116 Gyruss: Tilemap conversion, sprite multiplexing done properly, driver clean-up 2008-03-02 15:17:13 +00:00
Zsolt Vasvari
1a0ccf8101 tp84: Replaces sprite multiplexing hack with video_screen_update_now() on sprite RAM write
General driver clean-up
tilemap.h:  Deletes no longer applicable comment
2008-03-02 13:26:10 +00:00
Zsolt Vasvari
2ddf3da8dd - Watchdog gets its own namespace for state saving
- Corrected some comments
2008-03-02 03:39:43 +00:00
Zsolt Vasvari
c7a0a7942f Moves watchdog processing logic into its own module 2008-03-02 03:32:54 +00:00
Zsolt Vasvari
56ad71eccf Some more #includes's removed 2008-03-02 02:50:21 +00:00
Zsolt Vasvari
9adda05850 Removes unneeded #includes 2008-03-02 02:43:26 +00:00
Zsolt Vasvari
807d71db76 Removes cpu_getcurrentframe() and replaces it with video_screen_get_frame_number(int scrnum)
Updates all callers
2008-03-02 02:38:20 +00:00
Couriersud
6ab989af82 Reverted change to options.c - not ready for release due to potential breakage of frontends. 2008-03-02 00:39:56 +00:00
Couriersud
7df031fb4f Rewrote some potentially compiler specific code:
* added ATTR_FORCE_INLINE to osdcomm.h
* added ATTR_NONNULL
* moved U64 S64 fram mamecore.h to osdcomm.h
* define SETJMP_GNUC_PROTECT() in osdcomm.h for use in ppc602, ppc603
2008-03-02 00:35:58 +00:00
Couriersud
492612b6c9 Various clean ups:
* remove more unreachable code
* identify more functions not being used
* Changed a number of global functions to being static
2008-03-01 16:54:52 +00:00
Nicola Salmoria
6dc290df31 (from Razoola) ddtojr1/ddtojr2 were swapped 2008-03-01 16:39:44 +00:00
Zsolt Vasvari
275d692874 Removed use of cpu_scalebyfcount() 2008-03-01 16:20:39 +00:00
Zsolt Vasvari
7198a00e65 - Moves all video timing logic from cpuexec.c to video.c
- Added a video_screen_register_vbl_cb() function for registering VBLANK callbanks
- Changed inptport.c and debugcpu.c to make use the VBLANK callbacks
- Added video_screen_get_time_until_vblank_start()
- CCPU and anything using cpu_scalebyfcount() are currently broken
- I did some fairly extensive testing, but this is a very signficant internal change,
  so some things may have broke
2008-03-01 15:50:12 +00:00
Couriersud
e90a92697c * Wrapped unused code in "#ifdef UNUSED_FUNCTION" 2008-03-01 11:29:29 +00:00
Couriersud
7ce83ee92b memory.c: removed further code never to be executed
* removed "return 0" from READWORD & READWORD16/32/64/MASKED since it is unreachable
2008-03-01 11:25:57 +00:00
Aaron Giles
b8a64773fd Added macros to define device functions. Updated existing devices
to use the macros.

Added the concept of device classes. Devices specify their class
in their get_info function. Classes can be used to walk through
devices at a more general level than their type. Functions have
been added to iterate through devices by class just as you can
by type.

Removed some unused fields from device_config.
2008-03-01 08:41:56 +00:00
Zsolt Vasvari
2fba8bdb8a - Removes a couple of unused items from the cpuexec_data structure
- Adds one more validty checks -- screenless drivers cannot have a VBLANK
2008-03-01 05:30:22 +00:00
Roberto Fresca
efabbae0b1 Changed parent/clone relationship to separate SSI Poker sets from Jackpot Joker Poker. 2008-03-01 04:49:35 +00:00
R. Belmont
cd802cf4d1 [AICA] Better (not perfect) slot monitoring. (kingshriek) 2008-03-01 03:28:18 +00:00
R. Belmont
753b8dbf32 [DC/NAOMI] Use defines instead of magic numbers for IRQ sources, add VBL-out. 2008-03-01 03:27:21 +00:00
Zsolt Vasvari
875ece67f6 - Implemented VSYNC height computation difference between the Motorola and the Rockwell devices
- Since the Commodore 40xx computers program an HSYNC width that extends past the end of
  the scanline, I am clamping it in lack of anything better to do.
2008-03-01 02:40:27 +00:00
Zsolt Vasvari
09bf1cb3e4 Added mc6845->has_valid_parameters in mc6845_assert_light_pen_input, so that processing only happens
if the chip was correctly configured
2008-03-01 01:58:51 +00:00
Zsolt Vasvari
fe74a22163 - Uses a timer for latching the light pen address. Not that there was anything really wrong
with the previous way, but this is a bit more accurate.  I actually tested this.
- Added reset device function
- Better variable names
- More asserts
2008-03-01 01:56:35 +00:00
Couriersud
16547714e4 Fix compile issues introduced with r844 2008-03-01 01:47:47 +00:00
Couriersud
76847517a4 Identified code not used and marked with "#ifdef UNUSED_FUNCTION" 2008-03-01 01:34:43 +00:00
Couriersud
c5a4ffe291 memory.c: removed some code never to be executed
* removed "return 0" from READBYTE & READBYTE8 since it is unreachable
* removed comparisons of type FPTR < 0 and FPTR >= 0
2008-03-01 01:03:54 +00:00
Couriersud
7e15b2ff6f * MACHINE_DRIVER_EXTERN now requires a semicolon
* removed a number of extra semicolons
2008-03-01 00:17:58 +00:00
Couriersud
b0cf015703 Two discrete structs were not used:
* dkong walk using a jump struct 
* radarscp using a dkong 555 struct
2008-02-29 23:10:46 +00:00
R. Belmont
8bd8e97051 [SH4] Fixed refresh ticks value of 0, makes awbios not blow up the timer system. 2008-02-29 20:40:24 +00:00
Zsolt Vasvari
f126c9fc26 Most of this descriptions taken directly from an e-mail by Aaron:
- Define a new MDRV_CPU_VBLANK_INT_HACK() (ZV: defined in deprecat.h) which is a copy of the current MDRV_CPU_VBLANK_INT()
- Find all the places where VBLANK_INT is used with something other than 1 interrupt per frame and change it to the new macro
- Remove the "# per frame" parameter from the MDRV_SCREEN_VBLANK_INT() and add a screen tag in its place; updated all callers appropriately.
- ZV: Added some validation of the interrupt setup to validate.c 

The idea behind this is that using a VBLANK interrupt with more than one interrupt per frame in conceptually wrong.
The screen tag will allow us to move the interrupt timing code from cpuexec.c to video.c, where it really belongs.
2008-02-29 15:09:04 +00:00
Zsolt Vasvari
51a3a9eb01 Fixed taitoic regression
(Note to Haze: a little less crying and instead spending 2 minutes with a diff program would have been a lot more productive)
2008-02-29 04:23:37 +00:00
Zsolt Vasvari
f8cbcafd5e Replaces mame_bitmap with bitmap_t
Removes mame_bitmap
2008-02-29 04:01:09 +00:00
Zsolt Vasvari
a3aef48df5 - Converted Amiga based games to partial updating and proper scanline based timers
- Beginning of the clean-up of Space Guerilla - fixed rotation, some other stuff
- Removed tmpbitmap from some drivers
2008-02-29 01:42:25 +00:00
stephh
9d6f8060d6 "Input (this Game)" menu now handles conditional inputs.
See 'qcrayon2' in taito_f2.c driver (play with the last Dip Switch and look how inputs change).
2008-02-28 18:23:37 +00:00
Zsolt Vasvari
c1eddd0763 Adds mc6845_assert_light_pen_input. This latches the next character display address into the light pen latch. 2008-02-28 13:25:19 +00:00
Zsolt Vasvari
8cf42a706d Fixed incorrect comments 2008-02-28 10:05:12 +00:00
Zsolt Vasvari
22f1803388 Signals both the 0->1 and 1->0 transitions of the synching pins 2008-02-28 09:30:14 +00:00
Zsolt Vasvari
0516bab238 - MC6845 - Added HSYNC and VSYNC callbacks -- I actually tested this :)
- Added macros and typedefs for callback function types
- Updated all users for the new macros
2008-02-28 06:34:58 +00:00
Aaron Giles
b96aa2fb5c Spacing and version bump. 2008-02-28 06:20:19 +00:00
Aaron Giles
4741ad3a7e From: Robert [mailto:pac0446@bigpond.net.au]
Subject: A fix for the z80pio

Hi there,

Here is a one-line fix for the z80pio.

At the moment when the interrupt control word is sent (with interrupts
enabled), an interrupt occurs. In reality, interrupts are disabled until
the interrupt mask byte is sent.
2008-02-28 05:48:21 +00:00