Commit Graph

938 Commits

Author SHA1 Message Date
Zsolt Vasvari
725d2646fd Fix: 01512: beathead: Assertion
Fix: 01505: all vicdual.c drivers: Assertion
2008-03-14 12:46:13 +00:00
Zsolt Vasvari
e4a07ea688 Implements scanline based timer devices.
Converted Centipede, as an example.

To define a scanline timer, use something like this:

MDRV_TIMER_ADD("32V", SCANLINE, generate_interrupt)
MDRV_TIMER_SCANLINE("main", 0, 16)

The first number is the first scanline the timer will fire on, the 2nd number is the increment.
So in this case, the timer will fire on 0, 16, 32, ..., 224, 240, then wrap around
because the screen is defined as 256 lines high.
The current scanline is passed to the callback in its 'param' argument
2008-03-14 11:15:31 +00:00
Zsolt Vasvari
e42b02f565 Implements the periodic timer device functionality 2008-03-14 09:52:28 +00:00
Roberto Fresca
a7cf2c0493 - Completed the component list & PCB layout.
- Added technical references to register $63 (magicfly).
 - Switched crystal to new predefined format.
2008-03-14 06:44:51 +00:00
Aaron Giles
8fcd45cab1 Renamed *_vbl_cb to *_vblank_callback.
Fixed 01475: Screenless systems are broken because of a vblank callback.
We now create an artificial update mechanism when there are no screens.
2008-03-14 05:19:53 +00:00
Zsolt Vasvari
13f82f7331 Fix: 01496: all segae.c drivers: Crashing with Access Violation
This driver is creating bitmaps in DRIVER_INIT, which is not the best practice, and in fact, it broke as machine->primary_bitmap is not initalized yet.
2008-03-14 03:11:25 +00:00
Zsolt Vasvari
2f37f76c57 Fix: 01498: otwalls: Hangs before the game starts.
Caused by RansAckeR input port "simplifications."  I put it in quotes, because I think it makes the input port definitions completely unreadable.
2008-03-14 02:48:25 +00:00
Zsolt Vasvari
c0ca716e62 Added skeletion device interface for timers. Just wanted to get feedback.
- Where applicable, added a parallel set of timer functions that take a device_config instead of emu_timer:
	void timer_device_adjust_oneshot(const device_config *timer, attotime duration, INT32 param);
	void timer_device_adjust_periodic(const device_config *timer, attotime duration, INT32 param, attotime period);
	void timer_device_reset(const device_config *timer, attotime duration);
	int timer_device_enable(const device_config *timer, int enable);
	int timer_device_enabled(const device_config *timer);
	int timer_device_get_param(const device_config *timer);
	void *timer_device_get_param_ptr(const device_config *timer);
	attotime timer_device_timeelapsed(const device_config *timer);
	attotime timer_device_timeleft(const device_config *timer);
	attotime timer_device_starttime(const device_config *timer);
	attotime timer_device_firetime(const device_config *timer);

- Added MACHINE_CONFIG macros:
	MDRV_TIMER_ADD(_tag, _type, _callback)	/* type can only be PERIODIC right now (can scanline based later, or even NE555) */
	MDRV_TIMER_REMOVE(_tag)
	MDRV_TIMER_MODIFY(_tag)
	MDRV_TIMER_TYPE(_type)
	MDRV_TIMER_CALLBACK(_callback) 
	MDRV_TIMER_DURATION(_duration)
	MDRV_TIMER_PERIOD(_period)
	MDRV_TIMER_PARAM(_param)
	MDRV_TIMER_PTR(_ptr)

- Modified Space Encounters to create two timers and use those:

	MDRV_TIMER_ADD("STROBE_ON", PERIODIC, spcenctr_strobe_timer_callback)
	MDRV_TIMER_PARAM(TRUE)	/* indicates strobe ON */
	MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ))

	MDRV_TIMER_ADD("STROBE_OFF", PERIODIC, spcenctr_strobe_timer_callback)
	MDRV_TIMER_PARAM(FALSE)	/* indicates strobe OFF */
	MDRV_TIMER_DURATION(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ * 100 / SPCENCTR_DUTY_CYCLE))
	MDRV_TIMER_PERIOD(UINT64_ATTOTIME_IN_HZ(SPCENCTR_STROBE_FREQ))
2008-03-14 00:27:07 +00:00
Aaron Giles
a6b4a6ad50 Cleanups and version bump to 0.123u5. 2008-03-13 16:21:46 +00:00
Aaron Giles
4d5014585a From: Fabio Priuli
Subject: small fix to cpu.mak

Attached please find a small patch to include M68000 CPU only when you're 
compiling a build with the M68K. this is needed to e.g. compile tiny 
builds .
2008-03-13 15:45:39 +00:00
Aaron Giles
de3cfee6c6 src/mame/drivers/asuka.c:
Created MACHINE_START( asuka ) to configure cpu2 banks with memory_configure_bank(),

All drivers support save states, with the exception of cadash and clones, the background does not load properly.  I'm not familiar enough with taitoic.c to make that happen.
2008-03-13 15:44:43 +00:00
Aaron Giles
28ee84b180 From: RansAckeR
Subject: punchout.c inputs/dips

punchout.c:
-Simplified input definitions
-Improved dip switches
-Added dip locations

Note:
punchout and spnchout had an extra 5th PORT_START, was it correct to remove 
those?
If not just drop me a note and I'll resubmit the patch. 

--

From: RansAckeR
Subject: fix for 00593

'fix' for 00593 (patimono0120u3gra)

--

From: RansAckeR
Subject: 'fix' for 01478

01478: bullet: DIP switch info

--

From: RansAckeR
Subject: bankp.c & baraduke.c inputs/dips

bankp.c:
-Simplified input definitions
-Fixed bankp dip locations

baraduke.c:
-Simplified input definitions
-Added dip locations
2008-03-13 15:41:19 +00:00
Aaron Giles
1c684fe9f7 From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: Another weekend, another submission

This time, it's phase 2 of the Deal 'Em input changes (these work well 
with the default cabinet type, I need to do some conditional input work 
to fix them fully), and also a conversion to the resnet code. 
Unfortunately, this still doesn't fix the apparently needed transparency

(the apostrophe and Zenitone logo on the title screen should have a 
green background, and the black rectangle at the bottom should read 
(C)1987). I also tidied up the memory maps, but have been unable to 
reproduce the assert bug relating to VBLANKs, so I'm unsure as to 
whether I've fixed it or not.
2008-03-13 15:37:28 +00:00
Aaron Giles
3a082a644f From: notaz [mailto:notasas@gmail.com]
Subject: patch for SVP (Sega Virtua Processor) emulation

hello,

this patch adds support for Sega Virtua Processor, to run
Genesis/MegaDrive version of Virtua Racing, intended to be used by
MESS. It consists of a CPU core SSP1601, and updates in megadriv.c:
* SSP1601 replaces SSP1610, as it has been confirmed by Stiletto and
other sources that SVP actually contains SSP1601. The current SSP1610
is placeholder only (nearly completely unimplemented) anyway.
* Changes in megadriv.c add a new driver for Genesis/MegaDrive+SVP
combination, also add SVP memory controller logic and memory map.

The diff has already been reviewed by Reip and SSP1610 removal was one
of his suggestions (SSP1610 is not used by any drivers).
2008-03-13 15:35:17 +00:00
Aaron Giles
49c8a68835 From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: Raiden Fighters (Austria)

diff + romset enclosed
2008-03-13 15:30:53 +00:00
Aaron Giles
311669e24d From Mr. Do!
mame/drivers/qix.c:
+mame/layout/elecyoyo.lay:

Add Mr. Do's layout to crop corners in Electric Yo-Yo.
2008-03-13 15:29:29 +00:00
Aaron Giles
0277103558 Added some pieces that got missed when applying this patch.
From: Corrado Tomaselli
Subject: Frequencies diff

Changed/verified clocks on the following pcbs: 1943, Arkanoid, Action 
Holliwood GalsPanic, Ben Bero Beh, 1000 Miglia, Pit and Run, Prehistoric 
Isle, Rastan, Hotmind, Hardtimes, Stagger1 and Tiger Road

Changed/verified Oki pin 7 on the following pcbs: 1000 miglia, 
Galspanic, Action Holliwood, Hotmind, HardTimes, World Rally, Stagger1
2008-03-13 15:20:41 +00:00
Aaron Giles
e426f9e0b6 From: Mike Haaland
mame/drivers/superqix.c
mame/video/superqix.c

Changed vblank interrupts to 3 to fix screen drawing issues.
Use memory_configure_bank() to configure memory.
Added save states.
2008-03-13 15:10:56 +00:00
Aaron Giles
7edbaada44 Fix for 01429 (ddragon3 hang). [RansAckeR] 2008-03-13 15:09:20 +00:00
Aaron Giles
9d3f7f8680 From: Mariusz Wojcieszek
Attached is update for Merit hardware based on V9938 (CRT-250 and CRT-260 - meritm.c).

New playable games:

Pit Boss II
Super Pit Boss
Pit Boss Megastar
Megatouch IV
Megatouch IV Tournament Edition
Megatouch 6
2008-03-13 15:04:33 +00:00
Zsolt Vasvari
834d773f26 Fixes Bug ID: 01482: exprraid, exprrada, wexpress, wexpresb, wexpresc: Game doesn't start 2008-03-13 09:42:07 +00:00
Zsolt Vasvari
01b2003859 roberto zandona: fix sprite problem for gyruss: mantis 01480
By the way, the accent in roberto's last name gave CVS a fit

svn: Safe data 'From roberto zandon' was followed by non-ASCII byte 224: unable
to convert to/from UTF-8

This a bogus message -- you can certainly convert that character to UTF-8
2008-03-13 08:31:19 +00:00
Zsolt Vasvari
70eeb9ff23 - Removes the public screen_state object -- all access is via functions
- Removes screen[] object from running_machine
- Removed MAX_SCREENS constant -- there is no longer a hardcoded upper bound
2008-03-13 08:25:21 +00:00
Aaron Giles
dbd6e5e93e Fixed 68000 prefetching operation.
Changed slapstic management to always install an opbase handler to more
aggressively catch code executing in the slapstic region. Updated all
drivers to separate the slapstic region of ROM into a different ROM
section from the fixed ROM.
2008-03-13 08:09:58 +00:00
Aaron Giles
6454c32b9f Fixed 01436 (esb: Insert a coin, start a game and it will reset by itself after few seconds). 2008-03-12 15:01:53 +00:00
Zsolt Vasvari
9626c879db video_screen_get_vblank() was also incorrect for games with MDRV_SCREEN_VBLANK_TIME, this could easily explain a bunch of changed screenshots. 2008-03-12 12:19:43 +00:00
Zsolt Vasvari
4bd4eceb06 Forgot to state save a variable 2008-03-12 11:47:57 +00:00
Zsolt Vasvari
839e3f073c Fixed VBLANK end time computation -- it wasn't taking into account games that use MDRV_SCREEN_VBLANK_TIME
Aaron, could you please double check what I did?
2008-03-12 11:43:31 +00:00
Zsolt Vasvari
4eecf5199d Removes "global" VBLANK callback hack 2008-03-12 11:06:29 +00:00
Zsolt Vasvari
19b68f421f Next batch of machine->screen[] removal 2008-03-12 10:47:20 +00:00
Zsolt Vasvari
7ec1537d22 - Fixed case when there is no interface given
- Changed C6545-1 description from "Commodore' to "MOS Technology"
2008-03-12 08:29:33 +00:00
Aaron Giles
d5561a8e75 Removed cpu_scalebyfcount().
Changed input ports to register a frame callback, which is
called immediately after throttling and updating. This is the
proper "sync point" between emulated time and real time. Moved
all analog and digital port processing into a central place
here. Added tracking of time since the previous frame update
and use that as an estimate for the time of the current frame.
This is used to scale analog ports without the use of
cpu_scalebyfcount(). This is not perfect in the case where
frame rates are dynamic (vector games), but works well for
other cases.

Further cleanup of memory header and code.
2008-03-12 05:13:03 +00:00
Nathan Woods
61b009597e Fixing MESS-specific category tokenization 2008-03-12 01:58:49 +00:00
Zsolt Vasvari
86b798b37a - More machine->screen removal
- Hooked up swapped videoram in Karnov properly -- same idea as Burger Time
2008-03-11 16:16:30 +00:00
Zsolt Vasvari
706d9f408f Restores the previous toggling behavior 2008-03-11 10:05:45 +00:00
Zsolt Vasvari
77a58d253c - First batch of machine->screen[] access has been removed
- Added video_screen_auto_bitmap_alloc(screen) -- it is just a shorthand for 
  auto_bitmap_alloc(video_screen_get_width(screen), video_screen_get_height(screen), video_screen_get_format(screen))
  which is a common operation
- The Dynax/Don Den Lover games now do their updating in VIDEO_UPDATE instead of VIDEO_EOF.  This semmed to
  have fixed the palette problems
- Went through some of these drivers and changed Machine to machine
2008-03-11 08:37:05 +00:00
Nicola Salmoria
bf88dd74e3 fix loading mixer settings when the driver default value is calculated. Cannot use == to compare float with the loaded value in this case. 2008-03-11 08:28:47 +00:00
R. Belmont
542b489706 [MultiPCM] Saturate on clip and fix envelope discontinuity. (ElSemi) 2008-03-11 02:54:27 +00:00
Zsolt Vasvari
5397db0615 Moves crosshair code from video.c into its own module
Simplifies crosshair logic and makes it screen device based
2008-03-11 02:41:24 +00:00
Zsolt Vasvari
2a8f0936fd Adds some new varieties: MC6845-1, H46505, HD6845 and SY6545-1 2008-03-11 01:34:44 +00:00
Aaron Giles
c4cfa7bde4 Compilation fixes for my last checkin (sorry). 2008-03-10 16:22:01 +00:00
Aaron Giles
8006568b87 More WIP cleanup of memory.*
Made address versus byte offsets explicit throughout.
Removed some unused parameters.
Consolidated initialization process.
Removed maximum memory block count.
Centralized bank management.
Added masked handlers and change_pc to the accessors.
Added memory_get_accessors() to return a pointer to the accessors
   for a given address space/databus width/endian configuration.

More to come.
2008-03-10 16:00:26 +00:00
Zsolt Vasvari
d146f7dabc Removes the scrnum parameter from VIDEO_UPDATE, updates all drivers to use the screen device instead.
render.c now uses screen devices
2008-03-10 14:30:21 +00:00
Nathan Woods
470e72b351 MESS-specific fix 2008-03-10 13:16:23 +00:00
Nathan Woods
43c2c2a002 Changed how the PowerPC MMU is enabled at compile time, to cut down on the
amount of unused functions in MAME.
2008-03-10 13:10:44 +00:00
Zsolt Vasvari
2a8c73cc45 All video_screen_*_scrnum functions have been removed. Next step is to remove the scrnum from VIDEO_UPDATE 2008-03-10 06:39:20 +00:00
Zsolt Vasvari
6e3be05912 Makes atarigen and tms34061 handle based 2008-03-10 05:12:49 +00:00
Aaron Giles
0862cce453 Replaced the following macros (SMH == static memory handler)
MRA*_BANK*/MRA*_BANK* -> SMH_BANK*
   MRA*_RAM/MRA*_ROM     -> SMH_RAM
   MRA*_ROM/MWA*_ROM     -> SMH_ROM
   MRA*_NOP/MWA*_NOP     -> SMH_NOP
   MRA*_UNMAP/MWA*_UNMAP -> SMH_UNMAP

This removes the silly need for a bunch of redundant constants
with faux type definitions that didn't buy anything.

Moved some memory system constants into memory.c.
2008-03-10 02:29:15 +00:00
Zsolt Vasvari
198f401cf5 Changes TMS34010 to take a screen tag instead of the screen number
Everything appears to work, except X The Ball, which sets horz the resolution twice as wide as it should -- no clue why
2008-03-10 02:16:06 +00:00
Zsolt Vasvari
9b3ac2606e Voodoo now takes a device_config for the screen
Added video_screen_get_visible_area()
2008-03-10 00:39:20 +00:00