Commit Graph

12444 Commits

Author SHA1 Message Date
Aaron Giles
aad4c81ac4 Pulled remaining vestiges of old-style colortables:
* PALETTE_INIT no longer has a colortable parameter
 * removed game_colortable and remapped_colortable from machine_config
 * updated a few stragglers that still referenced these fields
 * removed tile_draw_colortable from tilemap.c

(From Zsolt): Added support for the new colortable object in the palette viewer

Changed the input port tokens to use a union instead of casting everything to FPTR.
In the future, C99-enabled compilers will be able to achieve type safety with
designated initializers.
2008-02-19 17:52:21 +00:00
Zsolt Vasvari
3d8658108f - Added video_screen_update_now(int scrnum) to force a screen update up to the current beam position
- Changed Qix driver to use this function
2008-02-19 12:27:00 +00:00
Aaron Giles
f391dd8ed4 From: KO Myung-Hun [mailto:komh@chollian.net]
Subject: _mul_32x32_hi() and _mulu_32x32_hi() patch

Hi/2.

I've attached patches to fix validation fail of '_mul_32x32_hi()' and
'_mulu_32x32_hi()' inline function when compiled GCC v3.3.5 with I686
optimization in according to advice of 'Vas Crabb'
2008-02-19 09:27:39 +00:00
Aaron Giles
08c3ff61e0 From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: Various little changes from the last month

I've been meaning to send these in for ages, but the day job has been 
insane for a while now, so it's been hard to keep these up to date.

Firstly, I've fixed a few corner cases I've noticed in the 6840 
emulation based on running the MPU4 test ROMs, and added the ability to 
dynamically alter the external clock frequencies in game (since these 
pins can be connected to other timing devices in a daisy chain, this may
well prove handy for speech chips and the like).

The 6850 core has also been changed to allow dynamic RX and TX clock 
alteration, to at least try to remove a few of the MPU4 timing problems 
(the ACIA clocks are triggered by the output pin of one of the 6840 
timers, so the clock rate will vary according to what has been 
programmed into the counter, rather than a fixed value).

MPU4 has been changed to document the Video board a bit better, and to 
change a game name to match what is actually on the marquee. Other names
have changed, to better describe the program nature (AMLD versions are 
legally speaking not SWPs, as there is no capacity for payout, so AMLD 
SWP is an oxymoron).

Lastly, since I was smoketesting 6840ptm using cchasm anyway, I've added
some documentation of the Cosmic Chasm crystals, and merged the memory
maps.
2008-02-19 09:26:23 +00:00
Aaron Giles
3accee936b New module: devintrf.c/.h. Implements a generic device interface similar
to the sound and CPU interfaces. This is still a bit WIP, but works at
a fundamental level. Currently the only example of usage is in qix.c for
the MC6845 CRTC.

New module: mconfig.c/.h. Moved all machine_config and MDRV_* macros here, 
out of driver.c/.h. Added MDRV macros for adding/removing/configuring
devices.

qix.c: Moved video part of machine driver to video/qix.c. Added MC6845
as a device in the machine driver. Removed explicit MC6845 initialization
from VIDEO_START in favor of simply retrieving the token from the device
interface code.

mc6845.c: Updated all callbacks to pass the mc6845_t * object. Updated
all drivers accordingly. Added a minimal device interface.

Deprecated the following constants because global constants that pretend
to document things but which are only guesses are dumb:

  - DEFAULT_60HZ_VBLANK_DURATION
  - DEFAULT_30HZ_VBLANK_DURATION
  - DEFAULT_REAL_60HZ_VBLANK_DURATION
  - DEFAULT_REAL_30HZ_VBLANK_DURATION
  - DEFAULT_60HZ_3S_VBLANK_WATCHDOG
  - DEFAULT_30HZ_3S_VBLANK_WATCHDOG

Updated all drivers to explicitly specify the equivalent bogus times.
Added comments for the "REAL" VBLANK durations to indicate that they are
not accurate.
2008-02-19 08:49:59 +00:00
Zsolt Vasvari
0bfe7ee72d Removes MDRV_COLORTABLE_LENGTH macro -- no longer used 2008-02-19 04:03:24 +00:00
Aaron Giles
109bb332f0 The term "driver" is way overloaded in the system.
machine->drv is now machine->config.
Sorry.
2008-02-18 06:08:39 +00:00
Aaron Giles
3e34860ccc Removed expand_machine_driver().
Replaced with machine_config_alloc() and machine_config_free().
Updated all call sites.
Normalized info.c style and simplified some of the code.
2008-02-18 05:58:18 +00:00
R. Belmont
277daffe04 [AICA] Fixed error introduced in last change. 2008-02-18 04:18:50 +00:00
R. Belmont
edc2bfebf0 [AICA] Fix sample address mask to follow passed-in RAM size. Music in Toy Fighter is much improved. 2008-02-18 03:51:13 +00:00
Zsolt Vasvari
3d5cdeaf8c From Atari Ace:
Hi mamedev,

Here's my periodic batch of code cleanups.  The usual batch of adding static/const plus some include fixes.  In addition, I reverted some of the changes to build.mak from u1 which made some MSVC builds fail, and adjusted/optimized an m10.c gfx_layout.  I also added some missing cores to cpuintrf.c, sndintrf.c and added some missing #if's to 5220intf.c.

~aa
2008-02-18 01:30:05 +00:00
R. Belmont
964f7a8429 [ARM7] Fixed unaligned 32-bit reads. 2008-02-17 21:57:27 +00:00
Aaron Giles
19b1a10219 Cleanups to make MSVC happy. 2008-02-17 21:28:33 +00:00
R. Belmont
8877f5321b [NAOMI] Added and hooked up AICA (sound chip). Naomi boot sounds now play.
Since it's an SCSPx2 with ADPCM instead of FM it's already feature-complete except filter envelopes.

A bug in the ARM7 core causes incorrect pan/level values to be computed in e.g. the Naomi SOUND TEST menu (I've also been seeing this in DSF playback).  This is not a defect in the AICA.

Please credit ElSemi, Deunan Knute, kingshriek, and myself.
2008-02-17 18:28:36 +00:00
davidhay
b469de6db7 changed IREM cpu decryption to be 'real-time' (it's a feature of the CPU)
moved decryption table setup to 'config' struct for the CPU.

added latest tables from robiza, making Risky Challenge playable, promoted it to working

told CPU core to not decrypt code after brkn instruction, enabling it again on iret, allowing me to remove several 'don't decrypt range' hacks in robiza's code.

updated all drivers accordingly.

currently the disassembly is a bit weird now, this will need looking at.
2008-02-17 16:05:10 +00:00
Laurent Desnogues
c552f36c5b cosmetics 2008-02-17 15:57:47 +00:00
Zsolt Vasvari
2eb626efdd - Added colortable_palette_get_size()
- Added some more asserts
2008-02-17 08:45:19 +00:00
Zsolt Vasvari
76f9761667 Comment changes from Guru 2008-02-17 02:02:59 +00:00
Laurent Desnogues
4839044063 cosmetics 2008-02-16 16:35:07 +00:00
Nathan Woods
0d5c41af1d Added missing #include 2008-02-15 13:30:01 +00:00
Aaron Giles
85345b2210 Cleaned up silly comments 2008-02-15 07:04:25 +00:00
Zsolt Vasvari
8715109eb4 - Color table removal
- Reorganization/minor clean-up of Mad Alien driver
2008-02-15 05:43:05 +00:00
Yasuhiro Ogawa
7f9e52699c added comment on HD46505 2008-02-13 15:09:46 +00:00
Aaron Giles
072b71602b Cleanups and version bump for 0.123u1. 2008-02-13 08:54:29 +00:00
Zsolt Vasvari
9e974e6ac1 Added equivalency note about the Synertek SY6545-1 version 2008-02-12 22:15:57 +00:00
Zsolt Vasvari
404a61653d Using this interesting document as a reference:
http://www.6502.org/users/andre/hwinfo/crtc/diffs.html

- allows reading registers 12 and 13
- reading write-only registers return 0
- updated comments in header
- added copyright since there was none
2008-02-12 20:58:40 +00:00
Zsolt Vasvari
a35f6aba82 Renames M6845 to MC6845 2008-02-12 20:31:55 +00:00
Zsolt Vasvari
d3cc7e0dd4 Renames CRTC6845 to M6845 2008-02-12 12:48:58 +00:00
Zsolt Vasvari
e12664a5ae - Changed the crtc6845 to be handle based -- adjusted all drivers
- Changed qix.c to RGB32 mode and made its videoram_w do the partial updating instead of a per scanline timer
2008-02-12 12:33:10 +00:00
Zsolt Vasvari
72dc0af97c Removes no longer used TRANSPARENCY_COLOR. Clean compile required. 2008-02-11 03:05:29 +00:00
Laurent Desnogues
e49ffe3289 - ARM ldm/stm ignore lower bits of the address
- most of the exceptions force the I bit
- ignore some flag bits in the CPSR
2008-02-10 14:41:31 +00:00
Laurent Desnogues
49b20d49da - Thumb ASR Rd,Rs: correct carry computation
- Thumb ldmia/stmia: correct value for writeback when the writeback reg is in the list
2008-02-10 12:24:05 +00:00
Laurent Desnogues
dc5647fedf - correct mode at reset (it's always 0b1....)
- HandlePSRTransfer: remove wrong code, correct detection of privileged mode
- correct carry output for ROR
2008-02-09 22:26:39 +00:00
R. Belmont
834d608456 Naomi/DC updates:
Samuele Zannoli:
- Add SH4 I/O ports
- Connected the 93C46 of the naomi and the x76f100 of the rom board and filled them with dummy data to satisfy the BIOS
- Implemented some of the JVS transfers that will be needed to use the controls
- Implemented ROM board DMA
- Set proper NAOMI RAM sizes (32 MB main, 8 MB for AICA)
- Improved PVR-TA graphics emulation

Deunan Knute:
- Set proper ARM7 clock.  (Yes, it's really that slow!)
2008-02-09 21:36:41 +00:00
Nathan Woods
f6d059db68 Readded the ability to pass absolute paths to mame_schedule_save() and
mame_schedule_load()
2008-02-09 20:23:20 +00:00
Aaron Giles
abdb58671b Split timer_adjust() into timer_adjust_oneshot() and timer_adjust_periodic().
Updated all call sites.
Fixed recent build breaks.
2008-02-06 15:33:04 +00:00
Aaron Giles
72dbde5ef6 From: Barry Rodewald [mailto:bsr@xnet.co.nz]
Subject: INP fix for 0.123

Hi,
Here's a quick fix for MAME 0.123, correcting the initial detection of 
extended INP files.

Thanks,
Barry Rodewald
2008-02-05 17:23:24 +00:00
Aaron Giles
4db5afa87e From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] CPU/SOUND independence fixes

Hi mamedev,

Here's some updates to the CPU/SOUND cores to improve build
independence.  While I was at it, I rescued the M65CE02 core from
bitrot hell (perhaps m65ce02.[ch] should just be deleted), and fixed
some MESS cores that were broken by the deprecat.h changes.
2008-02-05 17:21:27 +00:00
Aaron Giles
ec872c6178 From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: Frequencies verifications

I corrected the clocks on the following pcbs: Formation Z, MagMax, 
SlapFight and Tiger Heli
Changed Oki m6295 pin 7 to "high" on Toki and Blood Bros
2008-02-05 17:04:29 +00:00
Aaron Giles
85038b85d2 Last minute minor tweaks from 0.123 tag. 2008-02-05 09:33:35 +00:00
Zsolt Vasvari
79605aa3da Removed 'type' parameter from tilemap_create 2008-02-05 08:20:52 +00:00
Aaron Giles
72fbb6a0c4 Fixed watchdogs when not explicitly specified. 2008-02-05 07:45:17 +00:00
Zsolt Vasvari
662f44ede3 Removed TILEMAP_TRANSPARENT_COLOR tilemap type. The tilemap type is no longer used for anything. 2008-02-05 05:31:23 +00:00
Zsolt Vasvari
190247c1fb Removes no longer neccessary check as drawgfxzoom support all remaining transparency modes 2008-02-04 09:33:16 +00:00
Zsolt Vasvari
1426e5865f Removed TRANSPARENCY_BLEND_RAW transparancy mode. Needs a recompile just to be on the safe side. 2008-02-04 09:27:44 +00:00
Zsolt Vasvari
4ba36433ee - Reworked/refactored S2636 emulator
- Updated all S2636 users for the new interface
- Removed color tables from all games
2008-02-04 08:44:24 +00:00
Nathan Woods
38ac9dbdcc Fixing #include order in sid.c 2008-02-04 00:02:55 +00:00
Aaron Giles
198d7d10ca Minor typo wreaks major havoc. Story at 11. 2008-02-03 21:27:10 +00:00
R. Belmont
34ab94a982 [ARM7] Fixed PSR transfers. 2008-02-03 21:20:45 +00:00
Brian Troha
4591ddffca reverting back... doesn't work for clean compiles
don't know why...
2008-02-03 20:19:22 +00:00
Brian Troha
eb68d4312d update OSC clock define with xtal.h definition 2008-02-03 19:55:25 +00:00
Brian Troha
766c4903a9 better info reguarding the Z180 & HD74180 2008-02-03 19:03:59 +00:00
Andrew Gardner
163bb74a8f Fixes error:
pool_object_add (via src/emu/debug/debugcmt.c:107): Attempted to add a NULL object of size 0

This was happening when mame_debug_init was being called with 0 CPUs (eg. when starting MAME from the command line without a ROMset specified).
2008-02-03 09:14:51 +00:00
Brian Troha
aa3592dd4d Fixed year typo ;-p 2008-02-03 06:28:39 +00:00
Brian Troha
268655a7e9 added features from data sheet (documentation) 2008-02-03 06:24:58 +00:00
Brian Troha
cb99dc9132 adds documentation from data sheet. 2008-02-03 06:17:22 +00:00
Brian Troha
0a00c4bc10 Adds a little info about available Z180 models with speed and compatible chips 2008-02-03 06:02:17 +00:00
Aaron Giles
662dea1a21 Cleanups/version bump. 2008-02-03 05:23:32 +00:00
Aaron Giles
4c5cebc661 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix some comments

Hi mamedev,

The following patch updates the initialization comments at the top of
mame.c and corrects/adds a few filename declarations at the top of a
handful of files.

~aa
2008-02-03 00:56:06 +00:00
Aaron Giles
2409522389 Some more debugger fixes.
Added AM_WRITEONLY as a shortcut for AM_WRITE(MWAx_RAM).

Cleaned up Kangaroo driver:
 * documented MB8841 (needs to be decapped to get code)
 * proper video timing
 * full memory maps
 * simplified and more accurate video logic
2008-02-03 00:52:20 +00:00
Luca Elia
fbe8745472 - New game: Puzzlet (NOT_WORKING)
- Added some instructions to the H8/30xx CPU:
  or.l ERs, ERd
  rotl/shal.l ERd
  not.l/neg.l ERd
  exts.w Rd
  sub/or/xor.l #Imm:32, ERd
  bset/bnot/bclr.b Rn, @ERd
  bst/bist.b #Imm:3, @ERd
  bnot.b #Imm:3, @ERd

- Added H8/3007 & H8/3044 variants with their memory maps.
  Preliminary implementation of the H8/3007 timers.
  (a make clean is required)

P.S.
I've moved the docs we have in docs/cpu/H8-30xx and added a couple more.
Roms are in roms/current/p/puzzlet.zip
2008-02-02 22:36:24 +00:00
Aaron Giles
aa16ee779d Changed debugger-related code to be based off a new makefile define (DEBUGGER) which sets
a new compile-time define (ENABLE_DEBUGGER). This means that MAME_DEBUG no longer means
"enable debugger", it simply enables debugging features such as assertions and debug code
in drivers.

Also removed the various levels of opbase protection in memory.h and always just turned 
on full bounds checking.

Fixed build break due to missing ampoker.lay -> ampoker2.lay renaming.
2008-02-02 08:57:39 +00:00
Zsolt Vasvari
2df389a77d Added missing Lock-On crystal 2008-02-02 04:03:37 +00:00
Phil Bennett
6696fe197c * Improved Lock-On by a fair bit and added an alternate set.
* Added POLL input handling to the NEC V20/V30 core.
2008-02-02 02:19:24 +00:00
Zsolt Vasvari
7489a81c2f Emulates the 3 vs 4-bit difference between the MC3417 and MC3418 variants 2008-01-31 10:22:30 +00:00
Zsolt Vasvari
f65f3077b0 - Fixes reset crashes in all Z180 games. Not sure if there is a bug ID for this
- Removed the various busy loop and non-exact optimzations from the Z180 core
2008-01-31 02:27:44 +00:00
Zsolt Vasvari
242b08c930 Readded accidentaly deleted line -- sorry about that 2008-01-31 01:00:45 +00:00
Zsolt Vasvari
887823ae97 - Added 73.728MHz crystal to xtal.h
- Added clock #define's to 20pacgal.c
- Minor formatting clean-up
2008-01-31 00:50:52 +00:00
Aaron Giles
ebb34351e4 Take advantage of attotime_div. 2008-01-30 17:44:14 +00:00
Aaron Giles
d90d36b49f Added stream_get_sample_rate(), stream_get_time(), and stream_get_sample_period().
These functions are not really tested yet -- make sure they give reasonable results when first used!
Updated streams.h header to latest core style.
2008-01-30 17:18:29 +00:00
Aaron Giles
4a312b9176 Added new option VIDEO_UPDATE_SCANLINE, which cases VIDEO_UPDATE to be called for every visible scanline.
Removed manual implementation of this in timeplt, in favor of using the new flag.
There are probably many more drivers that can leverage this.
2008-01-30 16:34:29 +00:00
Aaron Giles
19dc5dba41 Moved cpu_getiloops() and cpu_scalebyfcount() to deprecat.h.
Added #include "deprecat.h" where necessary to make this happen.
Cleaned up cpuexec.c/.h to latest core style.
Cleaned up implementation of extended INP header in inptport.c.
Removed external access to cycles_currently_ran().
Replaced use of cycles_currently_ran() in v9938 code with mame_rand(), since that is effectively the same thing. :)
2008-01-29 23:27:24 +00:00
R. Belmont
dfccbbc479 Further improvements to SCSP FM (kingshriek). 2008-01-29 21:36:02 +00:00
Aaron Giles
dbf80b011c Removed distinction between *_gettotalcycles() and *_gettotalcycles64().
All functions now return 64-bit results.
Updated all call sites appropriately.
2008-01-29 19:35:27 +00:00
Aaron Giles
381fe1f9b8 From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: AGEMAME upstream patches for u8/0.123

I thought I'd push a few minor coding improvements in now, while I still

have something resembling free time.

Firstly, I've made a few changes to the 6840 interrupt handling, to be 
more like that in the 6821 driver, and to hopefully reduce the IRQ 
swamping that could occur using the old setup. In the process, I've 
added the 6840 IRQ handler to the wire-OR in the MPU4 driver, as that's 
what the schematic shows (there's just one track for each interrupt 
class, all the way down the PCB to the cartridge loading point). Since I

was looking at that, I made MPU4 games that didn't use a CRT as 
screenless as they can get at present, and altered the logging options 
to avoid a redefinition issue if you wanted the core and driver portions

to log at different levels.

Scorpion 2 has also been altered to match the MPU4 coding style, where 
proper handlers re now included for the stepper motor data, which can 
then be expanded on in AGEMAME.
2008-01-29 16:40:41 +00:00
Aaron Giles
839029d302 From: Dirk Best
the latest changes in MAME 0.122u7 broke the screenless systems in
MESS. The attached patch fixes this.
2008-01-29 16:37:58 +00:00
Aaron Giles
f394a31d0e Cleaned up Time Pilot sound board implementation:
* full memory maps
 * partial machine driver removes need for replicating filtering logic
 * updated all relevant drivers

Cleaned up Time Pilot and Tutankham drivers:
 * correct clocks where possible
 * merged memory maps
 * fully decoded memory maps
 * replaced hacky sprite rendering in Time Pilot with partial updates
 * save state support
 * removed Power Surge kludge, replaced with unmapped handler control
 * Tutankham runs at 60fps, with IRQs every other frame
 * Proper IRQ ack in Tutankham
2008-01-29 02:14:44 +00:00
Zsolt Vasvari
354acd5f1b - Removed TRANSPARENCY_NONE_RAW, TRANSPARENCY_PENS_RAW and TRANSPARENCY_PEN_TABLE_RAW as they were no
longer used.  Source needs to be recompiled because of the changed enum.

- Changed copybitmap and copyscrollbitmap:

  There are now 2 versions of each, one without and with transparency:

  void copybitmap(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy, int sx,int sy,const rectangle *clip);
  void copybitmap_trans(mame_bitmap *dest,mame_bitmap *src,int flipx,int flipy, int sx,int sy,const rectangle *clip, pen_t transparent_pen);
  void copyscrollbitmap(mame_bitmap *dest,mame_bitmap *src, nt rows,const int *rowscroll,int cols,const int *colscroll, const rectangle *clip);
  void copyscrollbitmap_trans(mame_bitmap *dest,mame_bitmap *src, int rows,const int *rowscroll,int cols,const int *colscroll, const rectangle *clip, pen_t transparent_pen);

  The version without _trans is the equivalent of the old TRANSPARENCY_NONE,  The *_trans version is the equivalent
  of the old TRANSPARENCY_PEN.  The old TRANSPARENCY_COLOR mode is done via calling *_trans version and passing in
  the pen that has been looked up via machine->pens[].
  So for example, copybitmap(..., TRANSPARENCY_COLOR, 0) becomes
  copybitmap_trans(..., machine->pens[0])

- Changed all drivers to the new calls.  Suprising how few drivers still use these functions.
  Most have still not been converted to tilemaps, or they are still writing to a tmpbitmap
  which gets copied over to the real bitmap in VIDEO_UPDATE.

- Changed machine->screen[0].visarea to 'cliprect' where appropriate.
2008-01-28 13:02:04 +00:00
Couriersud
06cf28a0e6 build environment:
* added checks for CROSS_BUILD=1 to omit building m68kmake.exe, verinfo.exe, png2bdc.exe and file2str
* enables building mame using mingw on linux
2008-01-27 20:19:32 +00:00
Zsolt Vasvari
10b4ed5a2d Removes TRANSPARENCY_BLEND completely and TRANSPARENCY_BLEND_RAW as an option to copybitmap. Source tree needs to be recompiled as the transparancy mode enum has changed. 2008-01-27 07:48:31 +00:00
Zsolt Vasvari
f3f249af3f Fixed compilation when X86_MIPS3_DRC is not defined 2008-01-25 23:55:28 +00:00
Jim Stolis
6c582352b6 Corrected previous timer fix to use more accurate IE SFRs. 2008-01-25 22:14:46 +00:00
Couriersud
b56271d5c9 ppc.c:
* Fixes DEBUG=1 build - adds include deprecat.h
2008-01-25 21:42:28 +00:00
Zsolt Vasvari
b4cc7b0021 Removes TRANSPARENCY_NONE case from copybitmap_core, which can never happen 2008-01-25 16:35:16 +00:00
Zsolt Vasvari
596635241a - Removes copybitmap_remap and copyscrollbitmap_remap, neither which was used by anybody
- Removes some obsolete commented out code
- Fixed up some comments
2008-01-25 16:22:26 +00:00
Zsolt Vasvari
4930b2dbfd - Added deprecat.h that contains some deprecated/discouraged contructs (see below)
The idea is to create extra work if a driver wants to use these and hopefully
  gives an incentive to look for an alternate solution
- Added #include of deprecat.h that rely on these contructs
- Removed a bunch of unneccassary #include's from these files
2008-01-25 09:30:43 +00:00
Aaron Giles
877b75ad75 Cleanups and version bump to 0.122u7. 2008-01-25 06:17:54 +00:00
Aaron Giles
2b0c136968 From: Wilbert Pol [mailto:w.pol@tiscali.nl]
Subject: z80gb cpu core patch

Changes:
- Small timing fixes when leaving HALT state.
- Fixed bug in retrieving Z80GB_SPEED pseudo register.

--

From: Wilbert Pol [mailto:wilbert@jdg.info] 
Subject: Re: timer_set_global_time patch

This patch for the z80gb cpu core also fixes my problems without the  
need to recode a lot of things:
- Split the execution of an instruction into separate fetch and  
execute phase.
2008-01-25 02:59:21 +00:00
Zsolt Vasvari
b460e5cf43 Fix for broken xtal.h 2008-01-24 15:35:44 +00:00
Aaron Giles
ae72e423a6 From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: other frequencies verified

Corrected Diet gogo h6280 clock so that it behaves correctly with
Charles Macdonald fix to the cpu core.
Verified anc corrected frequencies and pin 7 okim6295 on the following
games:
The new zealand story (3 z80 version), Trio The punch, Vandyke,
paradise.c games, Downtown, Shaolin's Road and Twins.
Updated Xtal.h with 1.056mhz resonator from Trio the punch
2008-01-24 14:29:06 +00:00
Aaron Giles
444d77b838 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix C4305 warnings, other MSVC tweaks

Hi mamedev,

This patch is a bit of a potpourri.  It is the result of enabling most
of the suppressed warnings when using MSVC compilers and seeing what
issues arose with different compilers (I used 70,71,80,90).  Two of
the warnings were judged to be useful to enable and methodically fix.
Some issues spotted by the other warnings were also fixed.

1. Fixed issues flagged by MSVC warning C4305 (type truncation).
Almost all of these are harmless double->float narrowing in
initializers, but one warning spotlighted a bug in segasyse.c, where
code to use a higher sprite number had no effect due to the
insufficient range of UINT8.
2. Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a
function which is missing an argument list).  There are no cases of
this warning currently, and if there were they would most certainly be
bugs.  This also allowed the warning suppression lists to be remerged
for VS7 and VS2005.
3. Decoupled intrinsic support decisions from PTR64 in eivc.h.
4. Fixed some VS7-specific issues (OPTIMIZE=0 at least compiles now).
That compiler doesn't support "long long" or "ll" (rsp.c/dkong.c).
5. Added a missing case statement in sm8500d.c.  Noticed while
reviewing dead code warnings.
6. Replaced a number of static constants with an enum in sidenvel.h.
This is unrelated to the rest of this patch, but it was overdue to be
done.
2008-01-24 14:24:59 +00:00
Aaron Giles
f446536f18 Minor spacing and clock cleanup. 2008-01-24 14:16:13 +00:00
Zsolt Vasvari
3815ec44e1 - Changed cpunum_set_input_line* functions to take running_machine as an argument
- Added that fix the arm7dasm, otherwise I couldn't compile the code
2008-01-24 14:14:21 +00:00
Zsolt Vasvari
f7c5c67e2e First in a series of updates to remove the use of the global Machine from as many places as possible 2008-01-24 09:12:03 +00:00
Zsolt Vasvari
c1af761bef Sorry, broke Wolfpack -- one line fix 2008-01-24 06:27:25 +00:00
Zsolt Vasvari
4ab04517cb - Changed S14001A emulator to allow setting the clock frequency instead of the clock multiplier. This is how the real chip works
- Changed the Berzerk driver to set the S14001A clock as per the schematics.  This proves that the schematics are correct and the comment suggesting the contrary can be removed.
2008-01-24 06:18:30 +00:00
Ryan Holtz
a67e5be6db Credit to SGINut.
Changes:
- ARM7: Added support for the BLX opcode in THUMB mode.
2008-01-24 04:10:40 +00:00
Zsolt Vasvari
feb32d305f - Uses its own debug flag instead of MAME_DEBUG
- An hard errors, do fatalerror instead of returning 0
2008-01-24 00:56:22 +00:00
Zsolt Vasvari
15e2918401 Changed all other video_*, sound_*, etc. calls to use macros 2008-01-22 06:22:39 +00:00
Zsolt Vasvari
817b3526f9 Added a _CALL variant to all prototype macros. The use of these should make it easier to change the signiture of these function 2008-01-22 02:55:04 +00:00
Ryan Holtz
0960ad9d7b Note: Removing the static qualifier on vi_width is necessary for PIN64 captures to work. I'm not submitting my changes for PIN64 yet, but leaving it as non-static means one less thing I need to manually merge to get PIN64 working in whenever I update my tree.
- Final pass on single-stepping behavior [SGINut]
- Corrected VRCP element lookup [SGINut]
- Corrected unaligned DMA behavior [Ville Linde] (Ville, do you mind that I submit this?)
2008-01-22 02:11:24 +00:00
Zsolt Vasvari
2c63c6e3d4 Reversing previous submission. The AY8910 has so many ways it can be hooked, that it doesn't really make sense to designate any one as "natural" 2008-01-22 02:02:09 +00:00
Zsolt Vasvari
1a17348787 - Added read/write handlers for the "natural" hook-ups of an AY-8910 chip
- Modified a couple of drivers to use the new handlers
- Added crystals for NYNY and Red Alert
2008-01-22 01:19:59 +00:00
Jim Stolis
b6a82f1762 Fixed timers from firing when not enabled. Checking TCON alone is not enough to invoke timers. Added IE SFR flags in conditional. 2008-01-21 22:27:44 +00:00
Nicola Salmoria
b0e569464a fixed VRCP instruction to match the real hardware results 2008-01-21 21:41:33 +00:00
Zsolt Vasvari
13b727a2c3 This updates makes the text displayed by the various UI sliders more intelligent. Basically, it will only print an index for an item if there are multiple of a given type 2008-01-21 12:38:53 +00:00
Zsolt Vasvari
3f1caeac76 Tidied up variable and function naming 2008-01-21 09:02:17 +00:00
Zsolt Vasvari
892153bd09 - Fixed saving callbacks across a reset
- Added 'pull' callback for the SID pin.  This is needed by the Red Alert voice board
2008-01-21 08:58:19 +00:00
Zsolt Vasvari
adcf70548a - Added MC3417 and MC3418 variants
- Changed Mouse Trap to use MC3417
2008-01-21 03:36:21 +00:00
Aaron Giles
ba63d916a3 Fixed default memory view width for CPUs with >byte-sized minimum
Made menu updating dynamic at click time, fixing issues with incorrect checkmarks
2008-01-21 00:29:29 +00:00
Couriersud
f8ddfc19fa sound:
* added MDRV_SOUND_ROUTE_EX to specify target input channel
* added input id to route struct
discrete sound:
* fixed DISCRETE_INPUT_STREAM
* added input channel # to DISCRETE_INPUT_STREAM
2008-01-20 22:38:21 +00:00
Nicola Salmoria
3caf91c713 - MAMEtesters bugs fixed: ninjakd2_0111u3gra, mnight0102gre
- cleaned up and merged ninjakd2, mnight and omegaf drivers into a single driver
- added flip screen support to all games
- fixed sprite overdraw mode:
  - ninjakd2 congratulations screen (e.g. stage 3) shows japanese characters which were previously missing
  - in ninjakd2, at the beginning of a level items are visible during the initial fade in. I'm not sure if this is correct but the other effects wouldn't work otherwise
  - in mnight attract mode, when the big ship is firing the other sprites no longer leave trails
  - in mnight at the end of a level the screen is slowly filled with balls and then slowly cleared to begin the following level. Same effect in the death sequence during attract mode.
- added proper computation of sprites to be drawn taking into account double size sprites. This fixes sticking shots in mnight without need for a hack.
- lowered ninjakd2 PCM playback rate to 13020 (from 16000). This seems to sound better and is a round division from one of the master clocks.
- removed ROM patch that was used to avoid the input protection in omegaf, added a rough but effective protection simulation.
- corrected some dip switches
- hooked up sound cpu reset line
- simplified ROM loading for the older games swizzling address lines in driver init.
2008-01-20 15:17:23 +00:00
Zsolt Vasvari
34a413510d - Added the ability to the HC55516 emulator to take an external osciallator
- Updated Mouse Trap to use the new interface
2008-01-20 15:05:31 +00:00
R. Belmont
a5b1a9d238 Fixed minor issue with timers B&C expiring. 2008-01-20 01:19:02 +00:00
Couriersud
729fa5efc6 memory.h:
* fixes AM_SIZE_MEMBER macro
2008-01-20 00:28:27 +00:00
R. Belmont
797d75363b Preserve fractional part of sample offset when looping, fixes remaining pitch stability problems. 2008-01-19 17:10:10 +00:00
Nicola Salmoria
e5b2e1f8ee added tilemap_get_scrollx / tilemap_get_scrolly 2008-01-19 15:02:18 +00:00
Aaron Giles
eef3b17f7e (From Atari Ace)
> This one line fix addresses the crash reported in newui0118u4ora. I
> think most of the other issues reported in the bug are fixed by this
> as well, but I didn't test this thoroughly. Perhaps we should close
> the bug and have the testers file a new bug if remaining issues are
> found.
2008-01-19 04:34:16 +00:00
Aaron Giles
5387f8bf52 Fixed compilation problems introduced with last change. 2008-01-18 23:45:54 +00:00
Couriersud
0c44c5388b tms5110.c
* added all known variants of the tms5110 as proper chips
* updated dkong, cvs and scramble to use new chips
2008-01-18 22:57:47 +00:00
Aaron Giles
5baa045d9d Marked HD6309 as divide-by-4 internally.
Updated drivers accordingly.
Major cleanup to the ddragon driver:
 - improved video and interrupt timing
 - consolidated common memory maps and input ports
 - added save state support
 - correct clocks
2008-01-18 20:37:32 +00:00
Aaron Giles
806a3de01c Made detection of dynamic attempts to install ROM/RAM handlers more aggressive.
Previous checks would not catch modifications in DRIVER_INIT or MACHINE_START calls.
Also changed one of the cheat calls back to using more generic switch detection so they can be triggered via joysticks.
2008-01-18 19:34:54 +00:00
Zsolt Vasvari
94e64171ca - Removed no longer applicable assert from VIDEO_START(generic)
- Removed VIDEO_START(generic) from drivers that didn't need it.  This leaves about 8 drivers with it.
2008-01-18 16:45:06 +00:00
Zsolt Vasvari
32f25eb010 Removes all palette_X_r functions 2008-01-18 16:21:47 +00:00
Nathan Woods
cb29c57606 Sync with MESS 2008-01-18 12:39:13 +00:00
Ryan Holtz
b9fe1e4bcf On-the-DL credit: "SGINut"
Changes:
- Re-fixed RSP single-step activation behavior
- Reading the RSP PC returns only the least significant 12 bits
- Fixed flag behavior when read out via CFC2
2008-01-18 04:33:13 +00:00
Ryan Holtz
51939cee8d On-the-DL credit: "SGINut"
Oh God, why Nintendo, why?  Why make the RSP immediately stop when the main CPU sets single-stepping, but have the RSP execute one instruction before entering single-stepping mode when it sets it on itself?  "You manaics!  Damn you!  God damn you all to hell!"

Changes:
- Initialize RSP registers to 0 in lieu of mame_rand
- Re-fix RSP single-stepping mode when set by a CPU other than the RSP
2008-01-18 02:16:19 +00:00
Couriersud
0e8b1735bc i8085.c:
* 8085 has an internal clock divider by 2. Changed i8085.c to reflect this for I8085. I8080 still at 1.
Games using I8085:
* Changed clock to reflect internal clock divider now in i8085.c
* Added some FIXME: comments where clocks for I8085 are outside specs
2008-01-17 21:20:53 +00:00
Aaron Giles
8c4ccedaff Added internal divider on m680* series CPUs (except the original m6800).
Updated clocks on all games using them to remove the explicit divider.
2008-01-17 17:14:45 +00:00
Aaron Giles
2299164694 Pushed CUSTOM_INPUT macro to all users.
Changed TMS0285 -> TMC0285.
Spacing cleanups for 0.122u6.
Version bump to 0.122u6.
2008-01-17 16:06:09 +00:00
Ryan Holtz
41b5d4ffd5 On-the-DL credit: "SGINut"
Quite possibly the most useless RSP change I'll ever make, given that no game should ever be affected by these changes.  But, eh, accuracy.  Apparently only the accumulator registers are initialized to a non-random value on power-on, and apparently the RSP executes exactly one instruction before kicking over into single-step mode when it's set in the status register.

- Fixed accumulator state on powerup by testing against real hardware
- Fixed single-step behavior by testing against real hardware
2008-01-17 04:23:02 +00:00
Zsolt Vasvari
1d2106f417 Corrected copy-paste error in comment 2008-01-17 00:09:06 +00:00
Aaron Giles
907d9df8f1 Fixed up LAI games to working status.
Added CUSTOM_INPUT macro for defining input port callbacks.
2008-01-16 16:27:43 +00:00
smf-
819dd27efc Changed the clocks to reflect the actual frequency that is supplied to the chips, because the clock is divided in the CPU package.
I have changed the divide in the CPU core to 4, so apart from system 10 & 12 the speed should remain the same as before.
2008-01-16 08:16:32 +00:00
Couriersud
5f244fffa0 * fix regression on T1 counter mode as reported by Zsolt 2008-01-16 00:18:53 +00:00
davidhay
5cce8356e8 (from Ernesto Corvi / ElSemi)
fix do_ret() based on comparison of ElSemi's core and the MAME core
2008-01-15 21:41:54 +00:00
smf-
0b0153c45e First pass at fixing the cpu clock speeds on the playstation based hardware.
The system 10 & 12 clock speeds have been raised as they run on an upgraded chipset.
All clocks are currently set to divide by 2 externally, I don't know if this is correct.
The clock is also divided internally as we have no wait states, incorrect dma timing, no gpu timing, no dma bus stealing and no gte timing.
2008-01-15 13:19:39 +00:00
Aaron Giles
a3f186b44b Added clocks to the MCR sound boards and some of the MCR games.
Added TMS5220 variants TMS5200 and TMS0285 as proper chips.
Changed MCR squawk & talk to use the TMS5200 as documented.
2008-01-15 09:31:57 +00:00
Aaron Giles
ddca20f72a Cleaned up leland clocks a little.
Fixed alleymas0119u3gre (with a pointer from RansAckeR)
Added missing multipliers to the h8 and i960 cores.
Made the i186 divide-by-2 clock internal.
2008-01-15 08:29:13 +00:00
Zsolt Vasvari
3459571adc 9.987MHz crystal for Crazy Balloon 2008-01-15 03:41:59 +00:00
Charles MacDonald
dc02f2fc33 Fixed HuC6280 low-speed mode so it uses 4 cycles instead of 3. 2008-01-14 18:27:50 +00:00
Aaron Giles
ea7fc1a5e9 (From Atari Ace)
Some more static qualifiers for MAME, mostly on recent new/changed
code, but also on some arrays declared in functions I noticed.
2008-01-14 17:39:44 +00:00
Aaron Giles
98950f517d (From Corrado Tomaselli)
Verified and changed cpu frequencies and oki m6295 pin 7 on the 
following pcbs:

Asuka&Asuka, Cadash, Equites h/w games and sound board, F1GP, Super 
Formula, Gladiator, Ping Pong king, Great Swordsman, Irem m52 sound 
board, Tropical Angel, Explosive Breakers, Magical Crystal, Mad Gear, 
Roller Aces, Chinese Hero, Simpsons, Golfing Greats, Time Pilot 84.

Updated Xtal.h to use new OSC values found on Great swordman, Gladiator 
h/w and Equites sound board.

Updated informations in Equites.c for the sound board
2008-01-14 17:18:29 +00:00
Laurent Desnogues
c000a7a284 cpuintrf_init: use the machine parameter instead of the Machine global variable 2008-01-14 16:07:33 +00:00
Zsolt Vasvari
4ddf534a33 Removed videoram_r, colorram_r, spriteram_r, spriteram16_r and spriteram16_w from video/generic.c and changed all games to use (possibly shared) RAM 2008-01-14 12:31:06 +00:00
Zsolt Vasvari
2912a535dd - Removed dirtybuffer from video/generic.c and all drivers still using it. Good riddance...
- Removed videoram_w, colorram_w and spriteram_w and changed all drivers using it to access RAM directly.  Still kept the _r function as some old style drivers are relying on them for mirroring support.  Will investigate and address those next
2008-01-14 09:49:11 +00:00
Aaron Giles
9931a8708e Minor clock cleanup in tickee.c. 2008-01-14 03:28:33 +00:00
Zsolt Vasvari
5c94f973b4 Const-ified tlc34076_get_pens 2008-01-14 03:15:42 +00:00
Zsolt Vasvari
171060dca7 - Changed TLC34076 and games using it to RGB32
- Removed global Machine variable where possible
2008-01-14 02:38:35 +00:00
Aaron Giles
fe41f9bd01 Added CPUINFO_INT_CLOCK_MULTIPLIER to support CPU clock multipliers.
Updated all CPU cores to return a CPUINFO_INT_CLOCK_MULTIPLIER of 1.

Changed the core to actually respect both CPUINFO_INT_CLOCK_MULTIPLIER and CPUINFO_INT_CLOCK_DIVIDER.

Updated a number of drivers to use cpunum_get_clock() instead of Machine->drv->cpu[x].clock.

***** Raw input clock speeds should now be specified for all CPUs in the MACHINE_DRIVER. *****

Removed explicit divisors from all drivers using the following CPU types, 
which were already specifying non-1 values for CPUINFO_INT_CLOCK_DIVIDER:
 * COP4x0
 * I8039/8048 families
 * M68(7)05, HD63705
 * M6809E
 * PIC16C5X
 * TMS32010
 * TMS340x0

In a few cases, it appears that the divisor was not being used, so I guessed in those cases whether or not
the specified clock speed was raw.
2008-01-14 00:42:14 +00:00
R. Belmont
34abe94416 Removed unnecessary check that could cause hangs in grdforce (kingshriek) 2008-01-13 16:08:11 +00:00
Couriersud
31b8c14a71 i8039.c:
* hooked up EA line for M58715
mario.c:
* fixed portA startup value
* documented hardware changes to use a I8039 on a mario board
2008-01-13 13:34:34 +00:00
Zsolt Vasvari
120a6070e8 Fixes victory137b4gre and victory37b16gre
src/mame/audio/berzerk.c
    - Added sh_reset

src/mame/audio/exidy.c
src/mame/includes/exidy.h
    - Added reset functionality
    - Moved Victory hardware routines here

src/mame/drivers/victory.c
    - Some clean-up, mirrored memory map for audio CPU

src/mame/video/victory.c
    - Simplified code by removing complicated
      dirty tracking.  Now VIDEO_UPDATE is
      called on every frame, further simplifing
      code

src/mame/drivers/exidy.c
    - Mirrored memory map for audio CPU
    - Added sh_reset

src/emu/machine/6821pia.c
src/emu/machine/6821pia.h
    - Added orthogonal accessors
    - Removed hacky update_shared_irq_handler(), now the same
      IRQ callback maybe called multiple times, but this shouldn't 
      be a problem
    - IRQ lines are cleared on a reset

src/emu/sound/tms5220.c
    - Disabled code that set the Buffer Empty flag after a stop
      frame.  This fixes Victory.  This might be the incorrect fix
      but the old code wasn't working either.
2008-01-13 06:14:20 +00:00
Aaron Giles
f44732e5af Added XTAL clocks to zaxxon.c.
Cleaned up jaguar driver:
 * proper video timing, configured by the chipset
 * 32-bit rendering, removing 16bpp hacks
 * support for borders
 * proper object processor timing, including multiple passes per line
 * added R3041 as a clone of the R3000
 * fixed XTALs based on documentation
2008-01-13 01:15:32 +00:00
Couriersud
190e262fb3 i8039.c/mario.c:
* fixed movd instructions
* add MB8884 and M58715 cpu types
* moved timer hack to M58715
* added ram_mask for internal ram access
* added R.A11 as 'M' to dasm flags
* added EA "IO" port
* mario now uses M58715 as sound cpu
2008-01-12 22:10:02 +00:00
R. Belmont
292b44af10 And no logging :) 2008-01-12 06:04:20 +00:00
R. Belmont
61714cd5a7 64-bit GCC fixes 2008-01-12 06:03:09 +00:00
Aaron Giles
a62870621a It's the end of uitext.c as we know it (and I feel fine) 2008-01-12 03:32:30 +00:00
Aaron Giles
73d0923d7f Cleanups for 0.122u5. 2008-01-11 15:22:56 +00:00
Aaron Giles
f8f4dad549 (From Chad)
Allows 64 bit mame compiles to read 32 bit inps, and also make 64 
bit mame compiles make 32 bit compatible inps.
2008-01-11 06:38:33 +00:00
Aaron Giles
fd5b288fd3 (From Dave Dribin)
Here's a patch that fixes compile errors when compiling a C++ source file including "render.h"
and "palette.h".  C++ (at least g++) does not like typedef's for an enum coming before the actual enum.
2008-01-11 06:32:16 +00:00
Aaron Giles
c96a3b766a (From AtariAce)
While investigating alternate gfx layout schemes, I stumbled across
the fact that some drivers are allocating graphics with one layout and
then decoding them with another (!).  There's no guarantee this will
work, but for the drivers that do so (all Konami games), the layouts
are similar enough that it does.  A related potential bug is that many
drivers are decoding using the layout provided to allocgfx, not the
layout attached the element returned from allocgfx.  If the element
had scaling applied to it, this would be incorrect, but since scaling
is rare these are also benign.  It would also be a problem if the
layout data had a different internal representation (which is
something I'm experimenting with), so to reduce the possibility of
coding errors and allow for future changes, I'd like to remove the
layout parameter from decodechar.

So here's two patches, the first fixes the affected Konami drivers to
allocate and decode using the same layouts.  It changes the notion of
plane_order and bpp in the functions somewhat to let the start
routines select the appropriate layout, but acceptably so IMHO (I can
clean this up further if there are loud objections).  The second patch
then removes the layout parameter from all the decodechar() calls.

I also reviewed MESS to see if it had similar problems and didn't find
any.
2008-01-11 06:31:19 +00:00
Aaron Giles
8240d56dd9 Added support for outputting 64-bit target addresses. 2008-01-10 18:14:50 +00:00
Aaron Giles
c09a3df1e9 System 2 driver cleanup.
Proper video timing.
Full memory maps.
Save state support.
Removed 720 sound CPU hack in favor of prepopulated EEPROM like the other games.
2008-01-10 17:57:26 +00:00
Zsolt Vasvari
4260f4f8ab Fixed disassembly of Flag Out bit
Fixed incorrect argument order in OUT instruction
Corrected spacing
2008-01-10 04:47:58 +00:00
Zsolt Vasvari
19205daeb0 Fixed the disassembly of the Sense bit 2008-01-10 03:07:17 +00:00
Aaron Giles
29f2a7862a Wow. I can't believe I got away for months without saving RBP.
Should fix linux crashes with 64-bit DRC.
2008-01-09 06:35:07 +00:00
Aaron Giles
90e0297191 (From Corrado Tomaselli)
Changed and verified frequencies on Ikari Warriors h/w, Tnk3, Hyper Sports, Jackal and S.A.R
Updated xtal.h to support the 13.4mhz crystal found on Ikari warriors and TNK3 h/w

Verified and corrected a lot of frequencies and oki6295 pin 7 on pcbs:
Double Dribble, Chequered Flag, Diet gogo, Boulderdash, Sly Spy, Psycho 
Nics Oscar, Captain Silver, Magical Cat Adventure, Raiden, Superman, 
Twin Hawk, Vimana, Ghox, Dogyunn, truxton2, Pipi and Bibis, Fix Eight 
and Money Money

They were all verified with frequency counter, even the strangest ones 
are right.
2008-01-09 05:27:45 +00:00
Aaron Giles
8fc9bc85e4 Yet another attempt to fix the MIPS 64-bit Linux crash. 2008-01-08 07:48:36 +00:00
Aaron Giles
a211ba264b (From Atari Ace)
Small fix to the gfxlayout cleanups included in u4.
2008-01-08 03:06:02 +00:00
Aaron Giles
990bc873d6 (From AtariAce)
Added machine and cpunum parameters to INTERRUPT_GEN callbacks.
Fixed several places that were not using INTERRUPT_GEN or OPBASE_HANDLER macros.
2008-01-08 03:05:19 +00:00
Aaron Giles
bce2fa84b4 Cleanups and version bump to 0.122u4. 2008-01-07 17:14:05 +00:00
Aaron Giles
ae478066d7 Changed atarijsa sound implementation to auto-detect CPU and input port.
Cleaned up atarijsa memory maps.
Added save state support to atarirle, and cleaned it up a bit.
Added save state support to atarig1 driver.
Fixed pitfight0109u2gre
2008-01-07 17:07:19 +00:00
Zsolt Vasvari
531aea4a38 This essentially rewrites the CVS system video code. This fixes wallst071gre. Also fixed the S2650 registry window display. 2008-01-07 10:43:55 +00:00
Aaron Giles
9d3cf20f84 Fixed bug that caused us to use a bogus address for the entry point. 2008-01-07 06:05:23 +00:00
Zsolt Vasvari
5a081cf2a1 Removed ancient "dirty" optimizations from CVS/S2656 and related drivers. This fixes at least spacefrt096u1gre 2008-01-07 04:25:21 +00:00
Aaron Giles
2d844fe392 Turned down the aggression on the "don't reconfigure screen" kludge in the TMS34010 core.
Fixes stonebal0117u2gre.
Also fixed minor cosmetic bug in last Williams sound update.
2008-01-07 03:29:59 +00:00
Aaron Giles
891fd96895 (From Oliver Stoneberg)
Added missing debugger commands to the help.
2008-01-07 02:54:59 +00:00
Aaron Giles
0ce44c7911 ElSemi -> Miguel Angel Horna in copyright notices 2008-01-06 16:58:33 +00:00
Aaron Giles
dae5e71408 (Thanks to MooglyGuy for the pointer)
Removed hack in setting the timer in the MIPS core, which caused missed timers on the aleck64 games.
Fixed icount management in the RSP core which caused it to report negative cycle counts.
Fixes aleck64_0120red and mtetrisc0115u1red.
2008-01-06 07:10:12 +00:00
Aaron Giles
f5db74cc82 (from Wilbert Pol)
This patch fixes the following issue in the 6522 emulation:
- When writing to the ACR register with the timer 1 in continuous  
counting mode, the timer 1 value should not be reloaded but keep on  
counting.
2008-01-06 01:28:09 +00:00
Aaron Giles
8860fe1c56 (From Dirk Best)
attached is an update for xtal.h and the Amiga include file.
2008-01-06 01:27:10 +00:00
Aaron Giles
24bea94d01 (From Oliver Stoneberg)
This fixes the winwork.c and poly(new).c meory leaks in the viper.c 
driver. I didn't look at the x86drc.c, because Aaron said it will be 
changed soon and there is no need to investigate those leaks at all.

As I wanted to update my own personal TODO about that fix I 
recognised it only happens in viper.c as well, so I took a stab at 
it. It was just anothe rmissing cleanup function and I also cleaned 
up the *_exit() potions/usage of the cores supporting DRC a bit.
2008-01-06 01:24:16 +00:00
Aaron Giles
fa3061392e (From Atari Ace)
0. This patch does minor cleanup to existing layouts, trimming/padding
entries as appropriate and reformating a few layouts.

1. This patch introduces a GFXLAYOUT_RAW() macro, and uses it
throughout.  It codifies the requirements for a raw layout in one
place.

2. This patch adds new validation code to the core for some previously
unchecked assumptions about layouts, and reduces the number of
references to the gfx_layout fields in preparation for a change in the
representation.

3. This patch constifies the remaining non-const gfx_layouts in MAME.
It does this by adjusting the code so that the only modification to a
layout ever needed is for the total field, which is then handled by
modifying a stack-based copy of the layout before invoking allocgfx. I
also spent some time consolidating and simplifying the layout code in
konamiic.c.
2008-01-06 01:21:33 +00:00
Aaron Giles
ee9f88963c Copyright cleanup:
- removed years from copyright notices
 - removed redundant (c) from copyright notices
 - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
2008-01-06 00:47:40 +00:00
R. Belmont
b6a4ebd248 Implemented decent-sounding FM (kingshriek). 2008-01-05 19:53:34 +00:00
Aaron Giles
deeb54eab6 Added save state support to slapstic.
Added save state support to YM2413.
Modified slapstic code to support address range mirrors.
Cleaned up Rampart driver:
 - simplified rendering code
 - full memory map
 - added save state
2008-01-05 19:28:30 +00:00
Aaron Giles
4b9f336c1f Switched to use the standard compile-time logging pattern, which is more widely compatible (varags macros aren't C89 compliant). 2008-01-05 19:23:13 +00:00
Couriersud
f749752b00 dkong:
- hooked up z80dma
z80dma:
- omitted modifications to emu.mak in r139
2008-01-04 23:12:39 +00:00
Couriersud
fe9dff357c Added Z80 DMA chip.
- only implements intelligence to emulate dkong3
- fixed a misleading comment in 8257dma.h
2008-01-04 23:10:29 +00:00
Aaron Giles
314928a333 (From Oliver Stoneberg)
beastrzb097u2red.patch
- added GAME_NOT_WORKING flag, so this bogus bug report can be 
removed (not even worth 1 buck!)

20080104_1.patch
- fixes a memory in src/mame/machine/stvcd.c

memoryleak0118u1ora.patch
- fixes a memory leak, that only happened when no RawInput API was 
available

memory_leak0111u6ora_1.patch
- only a partial patch - model3.c still missing
2008-01-04 18:09:45 +00:00
Aaron Giles
ba9782dcec Added new function input_poll_keyboard_switches to poll for only key events.
Expanded the size of the maximum simultaneously pressed switches.
Should fix editableui0120u4red and cheat0118red.
2008-01-04 17:51:33 +00:00
Aaron Giles
a814dc9ec5 Allowed 32-bit pixel sizes for 34020 core.
Fixed 34020-only RPIX instruction.
Fixed btoads0102u5gre and btoads0103u1gre.
2008-01-04 17:39:33 +00:00
Aaron Giles
8b9eaf40e7 Fixed gui0121u1gre. 2008-01-03 17:04:15 +00:00
Aaron Giles
f97d37b7e0 Spacing fixes and a version bump to 0.122u3. 2008-01-03 16:11:57 +00:00
Aaron Giles
3b2b5c5f31 (From Atari Ace)
This should fix wwestern0115u1yel.  It also invalidates every save state
out there, but it is the right thing to do.  ;-)
2008-01-03 09:05:08 +00:00
Aaron Giles
d73ea1bf01 (From Oliver Stoneberg)
This patch fixes a few UNICODE=1 issues in the disassembly and memory 
windows of the MAME debugger. I also removed two redundant arrays.
2008-01-03 09:03:31 +00:00
Aaron Giles
415aebd2bd Rewrote sbrkout driver based on schematics:
* XTAL-based timing
 * Correct video timing
 * Full memory map
 * Correct memory usage ("zero page" RAM is shared with videoram)
 * Removed all input hacks
 * Fixed interrupt generation
 * Connected coin counters
 * Added save state support

Also fixed incorrect dependency in cdrom.c.
2008-01-03 09:01:18 +00:00
Aaron Giles
422ccce762 (From Oliver Stoneberg)
This is an updated version of my earlier ATTR_PRINTF patch. It was 
reviewed by Atari Ace to use ATTR_PRINTF properly and fixes even more 
format errors. I also reviewed the whole source again and it is now 
used in all possible places.
2008-01-03 05:37:18 +00:00
Aaron Giles
25eee632f6 (inspired by Firewave)
Removed ui_popup(). Drivers should always be using popmessage() instead (has been this way for a while).
Augmented popmessage() so that you can pass NULL to immediately dismiss any messages.
2008-01-03 05:33:59 +00:00
Couriersud
75ba20112c tms5110r.c:
- Updated tms5100 table following communication from Lord Nightmare
2008-01-02 17:49:38 +00:00
Pierpaolo Prazzoli
32dcbe633e Fixed save states in i8051 cpu core
Fixed save states in powerbls (powerbls0112u4red is fixed)
2008-01-01 22:47:24 +00:00
Aaron Giles
0738d02527 TMS3203x core updates:
* fixed interrupt handling
 * added support for edge-triggered interrupts on '32
 * expanded interrupt support for the '32
 * updated drivers using TMS3203x core to deassert interrupts
 * added externally accessible functions for converting '3x floating point format
 * updated gaelco3d driver to use new functions

Zeus2 (+related) updates:
 * fixed save states for DCS games
 * cleaned up Zeus2 waveram handling
 * added Zeus2 save state support
 * added preliminary model and quad rendering support for Zeus2
 * added support to timekpr for the ZPRAM used on Zeus2
 * hooked up ZPRAM in Zeus2 games
 * hooked up controls in Zeus2 games
 * updated poly.c to ensure it is idle before saving state
2008-01-01 21:50:08 +00:00
Pierpaolo Prazzoli
7ad91eead6 Fixed typo for IO1 irq callback 2008-01-01 21:39:10 +00:00
Couriersud
9cea0d22ca - added 11MHz XTAL (Mario) 2008-01-01 19:05:37 +00:00
Aaron Giles
fffa20252e Added new file xtal.h with commonly known/used clock XTALs.
Added #include "drivers/xtal.h" to driver.h so that these values are always available.
2008-01-01 09:11:07 +00:00
R. Belmont
b66afec386 Minor cleanup to previous GCC 64-bit fix. 2007-12-31 16:10:49 +00:00
R. Belmont
67eec8cf26 Fixed various 64-bit GCC warnings. 2007-12-31 07:38:42 +00:00
Aaron Giles
0e20c80517 Bumped version to 0.122u2. Spacing cleanups. 2007-12-31 02:22:13 +00:00
Aaron Giles
460437f8d1 (From Atari Ace)
The attached patch adjusts most conditional logging in MAME to use the
idiom "do { if (VERBOSE) logerror x; } while (0)".   This has the
benefit that the compiler checks the syntax of the logging even in the
case it will be eliminated, and in fact a number of cases here needed
adjustments to compile because of this.
2007-12-31 02:04:39 +00:00
Aaron Giles
3f6e8e1abf (From Samuele Zannoli)
The attached patch is some more progress in the sh4 core, expecially in the fpu.
Now there should be all the minimum needed to run the naomi bios ...
2007-12-31 02:00:41 +00:00
Aaron Giles
625c8308b9 (From Barry Rodewald)
Here is a fix I've done to the Z80 CPU core that removes the increasing 
of the R register from each IX/IY related (FD xx or DD xx) instruction.

This corrects the amount the R register should increased to to 2, 
instead of 3.  Documentation I've read suggests that the R register is 
increased by 1 for each instruction with no prefix, and by 2 for each 
instruction with a prefix (DD, FD, ED, CB, DD CB and FD CB).  This fixes

some protected cassette loaders in the MESS Amstrad CPC driver, and 
maybe others, which require the R register to be correct for the next 
routine to be decoded correctly.  I'd doubt that there is much, if any, 
noticeable impact for MAME, as the R register is really only useful to a

program as a simple random number generator (or seed).

I've tested the fix with Pacman, in MAME, and when it comes across a LD 
IX,xxxx or ADD IX,xx it will increase R by 2, whereas previously, it 
increased R by 3.
2007-12-31 01:58:34 +00:00
Aaron Giles
d7e58ce2d0 (From Oliver Stoneberg)
Fixed several memory leaks related to SCSI CD emulation.
2007-12-31 01:57:54 +00:00
Aaron Giles
b482fd8c82 Add register usage tracking to Zeus 2.
Added artifical Z offset of -2 to make the full screen show in crusnexo.
Really fixed TMS3203x interrupt handling.
Added hack to catch invalid SP values during 32031 execution (debug mode only).
2007-12-31 01:46:50 +00:00
Couriersud
3228b1b341 - Updated headers following LN's mail on revisions
- renamed table to _5110a to avoid confusion
2007-12-30 21:48:42 +00:00
smf-
bb95b2fe55 fixed help for wpset to match the required syntax for checking the data written. 2007-12-30 17:05:00 +00:00
Couriersud
e15832fcb4 Added discrete 74LS624(56789) implementation
- DISCRETE_74LS624 is a VCO needed for dkongjr
- Supports Logic, Energy and Count outputs
2007-12-30 01:35:45 +00:00
Aaron Giles
d9da8bd1e7 Fixed whiny gcc errors. 2007-12-28 16:39:13 +00:00
Aaron Giles
2f8231e10a TMS3203x core updates:
* fixed interrupt handling
 * added support for edge-triggered interrupts on '32
 * expanded interrupt support for the '32
 * updated drivers using TMS3203x core to deassert interrupts
 * added externally accessible functions for converting '3x floating point format
 * updated gaelco3d driver to use new functions

Zeus2 (+related) updates:
 * fixed save states for DCS games
 * cleaned up Zeus2 waveram handling
 * added Zeus2 save state support
 * added preliminary model and quad rendering support for Zeus2
 * added support to timekpr for the ZPRAM used on Zeus2
 * hooked up ZPRAM in Zeus2 games
 * hooked up controls in Zeus2 games
 * updated poly.c to ensure it is idle before saving state
2007-12-28 06:11:52 +00:00
Aaron Giles
e5a0e34716 Oops, error in my previous fix for save state. 2007-12-26 23:28:18 +00:00
Nathan Woods
eb5699299c Changed an unamed enumeration to a named one (input_seq_type) 2007-12-26 21:20:34 +00:00
Aaron Giles
28d23853ae (From AtariAce)
This patch should complete the addition of static qualifiers to all
MAME symbols that aren't explicitly exported.  It primarily handles
generated code (e.g. amspdwy.c), plus a handful of cases I'd
previously missed and some new cases introduced in the last update.
One interesting bit was the discovery that the 32-bit scanline
routines in drawgfx.c are unused.  I debated eliminating them but
decided instead to just export them.  Various internal drawgfx
functions were conditionally removed by examining a new RAW define,
although one routine (blockmove_8toN_alphaone) was determined to be
dead code.

While investigating constifying MESS, I came across a few core APIs
that were missing const qualifiers which this patch fixes.  I also
consted up tx1.c while I was at it.
2007-12-26 16:55:35 +00:00
Aaron Giles
6e44952678 Fixed save state errors reported on MAMETesters. 2007-12-26 15:37:47 +00:00
Couriersud
f76a01ecc7 - Fixes mwalk0122red
The peplus games I tested (pexp0019, peps0716, pebe0014 and pepp0188) did not hang so this should be ok for peplus and mwalk
2007-12-26 00:47:40 +00:00
Couriersud
bf79fa4948 - radarsc1 uses tms5110 speech synth
- cvs games: according to PCBInfos speech chip is TMS5100.
  Changed driver to use TMS5100 and "game system operational" now sounds more natural
- removed sound/m58817.*
- added support for multiple coefficients maps to tms5110.*
- added coefficient maps for TMS5100 and M58817 from documented sources to tms5110r.c
- fixed interpolation factors (see tms5110r.c for reason)
- made lattice calculation precision 9bit
- added support for READBIT and LOADADDRESS commands to tms5110.c
- more changes in line with various patents
2007-12-25 22:47:08 +00:00
Nathan Woods
24edb7d555 Fixed M65C02 optimization [Peter Trauner] 2007-12-25 17:56:12 +00:00
Nathan Woods
dd703b9d81 Reverting my change; I must be understanding this as well as I thought 2007-12-24 18:09:23 +00:00
Nathan Woods
f27de85b8e 1. Added assertion to append_render_primitive() to test for degenerate case
2.  Added check that seems to occur on screenless systems
2007-12-24 07:39:36 +00:00
Aaron Giles
707e623381 One more straggler for spacing cleanups. 2007-12-24 04:06:02 +00:00
Aaron Giles
76278ddf02 Spacing cleanups. 2007-12-24 04:03:00 +00:00
Aaron Giles
b5087df8d2 (From Atari Ace)
This small patch makes some minor "code quality" improvements to MAME.
First off, some remaing static/const qualifier missed cases were
addressed.  Secondly, a few cases of missing #include "foo.h" were
added.  Thirdly, a few global names were modified to make them less
generic/more consistent (voodoo.c, vrender0.c, lethal.c, rungun.c,
zac2650.c).  Fourthly, some dead/useless code was removed
(i8051.c,model1.c,romcmp.c).
2007-12-24 03:41:16 +00:00
Brian Troha
975f32f1cc Changes LFO Frequency table entry 232 from 13.35547 to 14.35547 as per discussions of the list. Adds notes about it and the other error in the manual. IE entry 201 & 202 were the same 3.74490 and 202 has been changed to 3.92 which is "about right" 2007-12-23 15:21:00 +00:00
Aaron Giles
dbb50ed634 Zeus hardware:
* Cleaned up zeus wave RAM accessors.
 * Changed rendering code to allow for greater parallelism on multicore systems.
 * Removed some vestigial zeus 2 hacks.
 * Reduced visible area to remove artifacts.
 * Made right/bottom vertices inclusive to fix some gapping issues.
 * Fixed invasn lightgun offset.
 * Marked invasn as playable.

Zeus 2 hardware:
 * Fixed ROM loading, added banking support.
 * Separated zeus 2 video implementation from zeus implementation.
 * Implemented direct pixel accesses; enough to get startup screens to show.

ADSP-2100:
 * Properly documented ADSP-2104 internal memory map.
2007-12-21 16:12:20 +00:00
Phil Bennett
4371646560 Workaround for ym2610_0119u2gre 2007-12-21 01:32:15 +00:00
R. Belmont
047ec5ff5c One more fix for 64-bit GCC. 2007-12-21 00:43:47 +00:00
Phil Bennett
cae7ef0587 * Fixed C219 sample read order and implemented sign+magnitude format.
* Removed GAME_IMPERFECT_SOUND flag from all Namco NA-1 games.
2007-12-19 19:46:12 +00:00
Aaron Giles
b347392d92 Cleanups for MAME 0.122.
Added missing driver entry for orbs.
2007-12-18 08:24:58 +00:00
Aaron Giles
75265e5e23 Changes for MAME 0.122. 2007-12-18 08:09:03 +00:00
Aaron Giles
8a9ea25d74 Fixed bogus characters in newvideo.txt.
Fixed const changes in sidvoice.c.
Removed GAME_SUPPORTS_SAVE from namcond1 driver.
2007-12-18 03:13:07 +00:00
Aaron Giles
507ca2d275 Changes for MAME 0.121u4. 2007-12-17 16:41:39 +00:00
Aaron Giles
df34329a47 Changes for MAME 0.121u3. 2007-12-17 16:39:40 +00:00
Aaron Giles
c82a966b3b Changes for MAME 0.121u2. 2007-12-17 16:37:57 +00:00
Aaron Giles
8a8ccc5949 Changes for MAME 0.121u1. 2007-12-17 16:33:33 +00:00
Aaron Giles
7b77f12186 Initial checkin of MAME 0.121. 2007-12-17 15:19:59 +00:00