Commit Graph

2680 Commits

Author SHA1 Message Date
Wilbert Pol
22c5856130 Implemented uPD7801 timers. 2010-01-02 10:02:47 +00:00
Wilbert Pol
a83b755c7d uPD7801 core changes:
- Fixed incorrect disassembly of some instructions.
- Updated the handling of interrupts to match the documentation.
2010-01-02 08:58:38 +00:00
Aaron Giles
cb6fcbbcfa Allocate inline_config separately to avoid alignment issues. 2010-01-01 19:29:12 +00:00
R. Belmont
b08f51e0aa Trivial BIGENDIAN=1 rsp compile fix, no whatsnew needed. 2010-01-01 16:36:08 +00:00
Aaron Giles
0f6f7ba842 Converted RSP callbacks into device callbacks. Removed a ton of
tag-based queries in favor of using the device passed.
2010-01-01 00:18:16 +00:00
Aaron Giles
b3a8dd2113 Oops, fixed misaligned 32-bit accesses in RSP DRC.
Also  disabled DRC_SQV implementation as it breaks music in mtetrisc.
2010-01-01 00:16:45 +00:00
Aaron Giles
289a309cd3 Cleanups and version bump. 2009-12-31 22:03:37 +00:00
Phil Bennett
4106d2aaf6 Added additional information to the dipswitches and configurations sections in the -listxml output [Oliver Stoneberg]
---------- Forwarded message ----------
From: Oliver Stöneberg <oliverst@online.de>
Date: Thu, Dec 31, 2009 at 1:06 AM
Subject: enhanced dipswitch/configuration information in -listxml
To: submit@mamedev.org


This patch adds some additional information to the dipswitches and
configurations in the -listxml output, so I can test
dipswitches/configurations in mame_regtest by creating .cfg files.

By using this I already found two issues in MESS and the 1943
"Service Mode" issue in MAME would have been detected.

I am also wondering, if there are any dipswitches, that rely on more
than one port. If that's the case I might have to look at them and
change the output.
2009-12-31 11:15:12 +00:00
Phil Bennett
f7b4dbfea1 Fixed x86 HLT instruction handling [Phill Harvey-Smith]
Date: Mon, 28 Dec 2009 00:29:31 +0000
From: Phill Harvey-Smith <afra@aurigae.demon.co.uk>
To: submit@mamedev.org
Subject: i86 patch

Hi,

Attatched is a patch correcting the operation of the hlt instruction in 
the i86 core. I have done test builds with both the current mame and 
mess source for both debug and normal builds, and all seems to be ok.

Cheers.

Phill.

-- 
Phill Harvey-Smith, Programmer, Hardware hacker, and general eccentric !

"You can twist perceptions, but reality won't budge" -- Rush.
2009-12-31 00:56:09 +00:00
Phil Bennett
6f4011f247 Corrected a couple of typos in tilemap.c (not whatsnew worthy) 2009-12-31 00:33:55 +00:00
Ryan Holtz
c0d0d89d1b Fixed a few DRC-ized vector load/store opcodes in the RSP core. [Harmony] 2009-12-30 07:56:09 +00:00
Aaron Giles
152d8a7db0 Explicitly sign-extend 32-bit indexes for load/loads/store on 64-bit
machines to prevent overflow issues. Fixes DRC crash in mtetrisc.
2009-12-30 06:51:42 +00:00
Aaron Giles
31c7c2c219 Fixed error in codegen for drol/dror opcodes in the x86 back-end.
Re-implemented misaligned memory handling in the RSP DRC as before.
2009-12-30 06:19:08 +00:00
Aaron Giles
ad010bc54e Fix some errors the 4.4.3 compiler complains about in C++ mode. 2009-12-30 02:57:38 +00:00
Roberto Zandona
1284b17000 added two opcodes in the nec cpu; this is a temporary fix; we need to check if cb2001 use a custom cpu; in this case we need to split different cpu
cb2001: added more opcodes
2009-12-29 21:39:49 +00:00
Aaron Giles
81523f2e10 gcc 4.5.0 compilation fixes. 2009-12-29 14:35:54 +00:00
Ryan Holtz
50fbe1b27c Fixes the debug build. 2009-12-28 22:08:29 +00:00
Aaron Giles
f5730e89ef Exposed an address space for EEPROM devices. This has several
side-effects:
 - EEPROM memory is now visible in the debugger
 - EEPROM memory can be accessed like any CPU/device memory
    (i.e., use eeprom.b@<addr> instead of eeprom.eb@<addr>)

Removed support in the expression engine for EEPROM-specific
accesses.

Updated all systems that muck directly with EEPROM memory to
use memory accessors instead on the EEPROM address space.

Extended the devtempl.h file to support device address spaces.

Cleaned up romload a bit to make it clear that region flags are
enforced for any device with an address space, not just CPUs.
2009-12-28 18:04:50 +00:00
Ryan Holtz
7858c436fc Converted a number of vector opcodes to the RSP DRC core. [Harmony]
Unrolled and optimized a number of vector opcodes in the interpreter RSP core. [Harmony]
2009-12-28 16:50:06 +00:00
Aaron Giles
45d1ff4d1e Cleaned up braces in the code so that they are properly balanced. [Atari Ace] 2009-12-28 09:09:20 +00:00
Aaron Giles
bd24fb23c1 Results of running the latest srcclean. 2009-12-28 09:04:00 +00:00
Aaron Giles
93d465ad3c Whitespace cleanup. (No, a release is not yet imminent.) 2009-12-28 08:49:12 +00:00
Aaron Giles
7819b1fce7 Fix for INP recording ports that have changed notification. Also prevents
new inputs from affecting recorded inputs during playback. [mahlemiut]
2009-12-28 08:23:42 +00:00
Aaron Giles
f20a2e6b17 Fixes so we can compile as C++ again. 2009-12-28 07:34:17 +00:00
Aaron Giles
4e9be151f7 Renamed tilemap -> tilemap_t, as the name 'tilemap' is too commonly
used for statics and structure members, and some compilers (esp. C++
compilers) don't allow that.
2009-12-28 05:45:20 +00:00
Fabio Priuli
0c6ad781dc Converted Fujitsu MB87078 Volume Controller to be a device and updated taito_b.c to use the new code (it's the only driver emulating this chip atm) 2009-12-27 23:58:00 +00:00
Aaron Giles
86a9e3e217 Rename eepromdev.c/h back to eeprom.c/h 2009-12-27 23:20:05 +00:00
Aaron Giles
4717d53cac Rename functions and other references to eepromdev_* back to eeprom_* 2009-12-27 23:16:59 +00:00
Aaron Giles
ccc24c02f1 Remove old eeprom implementation. 2009-12-27 23:11:58 +00:00
Aaron Giles
96f9302a8c Allow any device memory (not just CPU's) to be accessed via debug expressions.
Change eeprom accessors to require the eeprom device name.
2009-12-27 23:10:25 +00:00
Wilbert Pol
dd7b96b1b1 i8237: removed old MESS hack leftover. No whatsnew. 2009-12-26 13:16:04 +00:00
Aaron Giles
aee2295323 Converted darkhors to eeprom device. Also trimmed obvious overdump of
EEPROM data.

Updated EEPROM device to initialize EEPROM at NVRAM load time rather
than init time, giving DEVICE_INIT handlers a chance to muck with the
data first.
2009-12-26 08:19:13 +00:00
Miodrag Milanovic
48a799c97d - Removed sysconfig section from game_driver struct
- Made compatible_with attribute available for MAME too (with NULL value set in GAMEL macro)

This patch require full recompile due to change of GAMEL macro
2009-12-25 19:59:44 +00:00
Aaron Giles
43dda8844d Removed _NODEFAULT_ forms of EEPROM driver macros. If you need to add
default data, follow the MDRV_EEPROM_ADD() with MDRV_EEPROM_DATA().
2009-12-25 01:08:43 +00:00
Scott Stone
f548c1cce3 taito_1.c - Added XTALs to driver, fixing MT bug #03598.
Comment:  Added a MACHINE_START for LAGIRL, which doesn't want to work properly (assumes I have service mode ON?)  The working method is still in place (using cachat's startup).  The clock changes were per the source notes above the ROM_START.  If anyone wants to get it working with the proper speeds, be my guest.
2009-12-24 23:33:36 +00:00
Scott Stone
64f770d382 Reverted 'bad code' mistakenly submitted in r7745. I'll keep the other code I submitted mistakenly as commented below:
sub.c - Put in board ETAL and came up with some seeming better clock speed approximations until board readings can be done.
tron.c - Sets tron3 and tron4 don't appear to have a valid working cocktail mode video or controls (upright player2 works fine).  Flagged as GAME_NO_COCKTAIL.
subs.c - Added DIP LOCATIONS.
2009-12-24 14:52:02 +00:00
Fabio Priuli
b99e364eae Split ADC1038, Konami 033906 and Konami 056230 emulation from gticlub.c and konppc.c. Also, converted them to be devices and updated PPC Konami games to use the new code
Just out of curiosity: did sscope/sscope2 ever pass through the initial hw checks or did they regressed at some point?
2009-12-24 11:38:43 +00:00
Aaron Giles
047af689a7 Converted gaelco2, xorworld, and vamphalf over to the eeprom device. 2009-12-24 04:39:59 +00:00
Scott Stone
25a430ea9b Fixed 03597: outrun, outrunra, outruno, outrundx, outrunb: Incorrect vsync speed on Outrun
Comment:  I failed to look at the video timing when Guru's readme, this should correct the behavior.  I also added the cpu/video bd numbers listed on Stefan Lindberg's reference board for Outrun.
2009-12-24 03:51:45 +00:00
Aaron Giles
75b4c8078e Fixed auto EEPROM region to properly handle 16-bit data.
Updated mitchell.c to use the EEPROM device. Removed spang hacks in
favor of preloaded eeprom data.
2009-12-24 03:36:44 +00:00
Aaron Giles
c285eb9bcd Cleanups and version bump. 2009-12-23 18:10:25 +00:00
Aaron Giles
79b8f09ad8 From: Samuele Zannoli <samuele.zannoli@sparkbio.it>
Date: Tue, Dec 22, 2009 at 11:57 AM
Subject: Core for PIC 16c62x series of processors
To: submit@mamedev.org


Hello,
         this patch contains a core for the PIC 16c62x series of processors.

It has been made starting from the pic16c5x that is already present.
This version stil misses the various internal devices, however the
opcodes and i/o ports work, and it is enough to run the emulation of
the security pics used with the gd-roms.

Bye,
       Samuele Zannoli
2009-12-23 18:01:49 +00:00
Aaron Giles
505f0d7caf From: Atari Ace <atari_ace@verizon.net>
Date: Tue, Dec 22, 2009 at 4:44 PM
Subject: [patch] Fix srcclean/src2html bugs, misbalanced tokens and
visible whitespace errors
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

While experimenting with srcclean and src2html as indentation
validators, I stumbled across a couple of bugs.  The first is that
srcclean doesn't properly handle /*...*//.  It sees the last / char at
the end as the second / of an inline comment, where it might be a
division token or the start of either type of comment.

The second bug is that src2html improperly handles strings with
embedded quotes preceded by escaped backslashes, e.g. "ab\\\"cd".  It
believes the string terminated in the middle, and the last quote
starts a new string.  This issue is unlikely in actual code, but
should be handled correctly.

The first patch fixes these, and a some cases where there are
dangling/missing tokens which my validation tools are noticing.  These
occur in some unused macros, dead code sections, and in some macros
that are deliberately misbalanced (v9938.c, psx.c).  In the deliberate
cases, I balanced the braces by making exactly one open and one close
macro and using those throughout.

The second patch is then a set of visible whitespace "problems". Cases
where the closing brace isn't at the same indent level as the open
brace, and some cases where the indent level isn't a multiple of four.
In the case of ssv.c I folded the assignments into init_ssv() to
simplify the code and restore the brace balance, otherwise I kept to
simply adding or removing whitespace.

~aa
2009-12-23 17:59:08 +00:00
Aaron Giles
a825a2427f ---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Wed, Dec 23, 2009 at 2:37 AM
Subject: Yet more i386 fixes
To: submit@mamedev.org


Hi,

Here's two more small i386 fixes.

First, is an implementation of the LSL protected mode instruction.
While it's far from perfect (ie: it doesn't check for anything other
than a null segment selector), it does help get a little bit further
for some FM Towns applications.

Second, is a fix for the REP instruction when used with a segment
prefix.  Essentially, it reverses the use of the segment_override and
segment_prefix variables compared to other instructions.  This fixes
sprite data copied into sprite RAM on the FM Towns version of Raiden
Trad.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-12-23 17:53:33 +00:00
Aaron Giles
de3ffd84b3 Removed old index-based DISCRETE_ADJUSTMENT, and renamed
DISCRETE_ADJUSTMENT_TAG to replace it. Updated all callers.

Removed input_port_by_index, as it is no longer needed.
2009-12-23 17:23:51 +00:00
Aaron Giles
6f4ff3c823 Moved machine->gfx initialization out of the video module and
into drawgfx. We now call this before devices are initialized,
so that devices can dynamically append to the machine->gfx as
needed.
2009-12-23 17:15:41 +00:00
Aaron Giles
201ea424db Get rid of explicit resource tracking for state saving. Now we just use
the auto_ allocators, since registration is restricted to initialization.
2009-12-23 16:44:55 +00:00
Aaron Giles
680184085a Added "new" command -listdevices (or -ld) to list the devices attached
to a driver. I notice that MESS has a command with the same name; hopefully
the behaviors can be combined eventually.
2009-12-23 16:37:09 +00:00
Aaron Giles
caf41f8f39 Fixed recent regression reports.
Converted rtc65271 to a device.
2009-12-23 16:16:12 +00:00
Aaron Giles
7eace0d29e EEPROM device now looks for a matching memory region to fetch the
default values from. Fixed bug in ROM loader that would change the
memory region flags to match devices with no address bus. Updated
groundfx to use the new default loading scheme.
2009-12-23 06:06:20 +00:00
Aaron Giles
953ef60d7b Quick cleaning of eepromdev. 2009-12-22 15:33:36 +00:00
Fabio Priuli
ff7213f6f1 Added save states to ics2115 sound device
Added driver data struct and save states to psikyo.c and pgm.c

Added driver data struct to psikyo4.c and psikyosh.c
2009-12-22 14:49:27 +00:00
Phil Bennett
2434ce3fab Eliminated the use of generic.colorram and generic.videoram in several drivers [Atari Ace]
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Mon, Dec 14, 2009 at 5:43 AM
Subject: [patch] Eliminate generic.colorram
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

generic.colorram and generic.videoram are unused by the MAME core, and
are simply slots convenient for driver use.  As such, the drivers are
better off using their own driver_data slots for these.  To discourage
further use of colorram, this patch eliminates all current uses of it,
and the uses of videoram as well in the affected drivers.  This is
partially a retrograde step, since ideally we'd like to introduce the
driver_data structs as well for these drivers, but eliminating
colorram and disentangling the various uses of generic makes it on the
balance an improvement IMHO.

~aa
2009-12-21 23:26:32 +00:00
Phil Bennett
685bac3770 Removed deprecated core function decodegfx() [Christophe Jaillet]
---------- Forwarded message ----------
From: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Date: Mon, Dec 14, 2009 at 9:56 PM
Subject: Removal of a deprecated function
To: submit@mamedev.org


Hi,

a function in "drawgfx.c" is declared in "deprecat.h"
This function ("decodegfx(...)") is not used any more in the code, so it
could be removed.

Hope this help.
Best regards,

CJ
2009-12-21 16:32:45 +00:00
Aaron Giles
ead42740ca And some more. Converted the ds2404 to a device along the way. 2009-12-21 16:10:00 +00:00
Aaron Giles
a9697769d9 A few more fixes. 2009-12-21 10:06:40 +00:00
Aaron Giles
90c6e390f0 2nd batch of initialization cleanups. 2009-12-21 08:34:28 +00:00
Aaron Giles
d0af9ba1e8 First round of fixes for post-initialization allocs.
In the process, converted 7474, 74148, and 74153 to
devices.
2009-12-20 23:57:25 +00:00
Aaron Giles
30d57e3f48 Minor drc improvments:
- simplified RSP's misaligned memory accesses
 - removed now-unnecessary shifts from direct memory accesses in
    mips3/powerpc drcs
 - optimized AND with 0xff/0xffff/0xffffffff cases for x86/x64
 - added rudimentary memory/register tracking in x86 backend to
    remove redundant loads
2009-12-20 15:21:26 +00:00
Couriersud
c58957452c Fix 64-bit compile 2009-12-19 23:37:21 +00:00
Phil Bennett
b1293d18ac Fix crash in tilemap viewer when driver has no tilemaps (no whatsnew) 2009-12-19 14:28:22 +00:00
Phil Bennett
123f4decc7 Fixed NULL pointer dereference in tilemap_set_flip_all() when game has no tilemaps (no whatsnew) 2009-12-19 14:04:10 +00:00
Aaron Giles
c3fb047204 Added new profiler bucket for DRC recompilation.
Removed a number of extraneous sign extensions from the RSP DRC.
2009-12-19 08:50:34 +00:00
Ryan Holtz
2e65d4a968 RSP recompiler improvements / optimizations: [Harmony]
- Split SATURATE_ACCUM into a signed and unsigned version to reduce stack usage.
 - Corrected an issue with the 0h variants of VMRG, VAND, VNAND, VOR, VNOR, VXOR and VNXOR.
 - Slightly optimized unaligned reads and writes
 - Optimized unaligned dword reads
 - Corrected an issue where badly-written RSP programs could jump to invalid addresses
2009-12-18 23:14:19 +00:00
Miodrag Milanovic
ef4d608713 SCMP assert fix (No whatsnew is needed) 2009-12-18 11:55:30 +00:00
Aaron Giles
e6e51ca4bc Fix MSVC warning. 2009-12-18 06:41:20 +00:00
Ryan Holtz
0534f875b9 Fixing the RSP disassembler, no whatsnew. 2009-12-17 02:18:15 +00:00
Ryan Holtz
f9045e7268 [RSP] Preliminary RSP recompiler, with all vector ops stubbed out to C functions for now. [Harmony] 2009-12-16 23:26:58 +00:00
Curt Coder
3dde298da4 CIA6526: fixed FLAG handling 2009-12-16 12:11:52 +00:00
Curt Coder
ff5c33c8d1 CIA6526: slight interface cleanup 2009-12-15 12:36:38 +00:00
Aaron Giles
f43747b221 Some misc cleanups:
- added warning messages for auto_malloc, timer, and save state
    allocations done after init time. These should be fixed when
    detected, as I would eventually like to disallow them entirely.
 - changed state registration functions to pass through the caller's
    file and line number to facilitate fixing the above warnings
 - converted Taito F3 sound to a separate machine driver which is
    imported into games that use it
 - converted the balsente driver to driver_data structure
 - converted harddriv timers into devices
 - fixed crash in cps2 games due to not configuring the qsound bank
 - cleaned up initialization in taito_l to allocate at init time
    instead of reset time
2009-12-15 02:37:46 +00:00
Aaron Giles
c1c28e486b Fix crash on exit for systems with no tilemaps. 2009-12-15 00:28:30 +00:00
Fabio Priuli
f2a4c06f27 Misc Konami updates:
* moved k056800 sound device to emu/sound and removed the old code (mame/machine/konamiic.c )
* updated gticlub.c, hornet.c, nwk-tr.c, ultrsprt.c and zr107.c to use this implementation
* fixed various small (and not so small) problems in konicdev.c
* as a result Konami 007342, 007420, 052109, 052160 and 051316 devices are now working and 88games.c, battlnts.c, bladestl.c and rockrage.c have been updated to use them
2009-12-14 17:58:20 +00:00
Aaron Giles
eb025378a9 Fix tilemaps so they can be initialized at device start time. 2009-12-14 07:33:54 +00:00
Fabio Priuli
5424444497 Added SET_TILE_INFO_DEVICE to tilemap.h (it should be correct) 2009-12-14 01:15:48 +00:00
Aaron Giles
8bccdbd5cc Enhanced the UML opcodes for LOAD, LOADS, and STORE to support
arbitrary scaling factors. Previously, specifying a size implied
a scaling factor equal to the size (i.e., specifying DWORD meant
the index was scaled by 4). This is still the default. However,
now you can specify the scale explicitly for other cases. For
example, you can specify DWORD_x1 to fetch a DWORD but don't
scale the index at all, or BYTE_x8 to fetch a BYTE while scaling
the index by 8. Updated all backends to make this work.
2009-12-13 20:01:26 +00:00
Fabio Priuli
8bdb970d1d Made MB14241 Shifter IC a device and moved its source to emu/machine. Updated mw8080bw.c and 8080bw.c accordingly. Also converted fgoal.c to use this implementation in place of its own version. 2009-12-13 12:03:51 +00:00
Fabio Priuli
4d2eba9882 Added TILE_GET_INFO_DEVICE macro to tilemap.c
Added driver data struct and save states to malzak.c
2009-12-13 11:59:35 +00:00
Fabio Priuli
9ccef5fb60 Imported SAA5050 emulation from MESS and made it a device. Updated malzak.c to use it, removing the almost identical implementation in the driver.
Out of whatsnew: Unfortunately, I was unable to make both malzak and p2000t (in MESS) to work without a small kludge, clearly documented in the source. I plan to further investigating the problem once I manage to merge the other 505x variants (later)
2009-12-12 18:22:43 +00:00
Aaron Giles
26ef740b4b Fix MT03444. Global arrays are now included once again in the memory view.
ALso changed the memory views to determine the list of subviews at
creation time, not init time, allowing for new stuff to appear later.
2009-12-12 08:52:16 +00:00
Fabio Priuli
66f8650aac misc small updates:
* added saves to 6522via.c. this fixes problems of gameplan.c and trvquest.c games with -autosave
* added driver data struct and save states to toratora.c and sf.c
* enable GAME_SUPPORTS_SAVE flag to dday.c because some of the core changes have fixed the sound problem at loading
* added a couple of comments about header inclusions
2009-12-11 23:59:11 +00:00
Fabio Priuli
fe3420b40f Fixed stupid copy&paste mistake in s2636.c
This is what you get when you forget to press save before the commit :(
2009-12-11 18:20:35 +00:00
Aaron Giles
40bcc29e8a Cleanups and version bump. 2009-12-11 06:19:46 +00:00
Fabio Priuli
dcd164adc7 Converted Signetics 2636 video chip to be a MAME device and updated drivers using it accordingly
Also, added driver data struct and save states to laserbas.c, laserbat.c, lastfght.c, lazercmd.c and lemmings.c

Finally, added driver data struct to lasso.c
2009-12-11 01:34:38 +00:00
Aaron Giles
64a35dfe95 Added tilemap_create_device() function which lets you create a tilemap
from within a device, and be passed that device in your callback.
2009-12-10 15:42:56 +00:00
Aaron Giles
8ba04b825a Apply mirrors and global masks at address map detokenizing time rather
than later. Also added disabled code to detect address maps with
overlapping regions for future analysis.
2009-12-10 15:32:44 +00:00
Phil Bennett
907c61c43e i386 core improvements: [Barry Rodewald]
* Fixed EIP displacement when executing FPU instructions with no 80387 present
* Added 32-bit implementations of SLDT and STR


---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Wed, Dec 9, 2009 at 2:02 AM
Subject: More i386 fixes
To: submit@mamedev.org


Hi,

Here's two more small fixes for the i386 core.

First, is FPU instructions used on 80386.  On a system without a
80387, FPU instructions should have no effect.  Part of the FM Towns
TBIOS (runs as an MS-DOS device driver, providing extra system
functions) initialises the FPU, and tries to detect it.  Upon hitting
the FSTCW instruction, though, it doesn't increase EIP enough when an
extra displacement byte is needed.  So, I've added a call to GetEA to
the escape() function (called when there is no FPU) which will fetch
the extra byte if necessary.

Second, is a 32-bit implementation of the SLDT and STR instructions.
Basically, I copied it from the 16-bit versions, and modified it to
use 32-bit registers.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-12-10 09:12:35 +00:00
Aaron Giles
a0375128a0 Fixed DMADAC wrapping behavior. [Tim Schuerewegen] 2009-12-09 15:40:16 +00:00
Aaron Giles
e349350227 Converted atari drivers over to using driver_data for the most
part. Some shared systems still exist with globals, but this
tackles the atarigen module and the variables local to each
driver.

Also added validity check that AM_BASE_MEMBER and AM_SIZE_MEMBER
items point within the bounds of the driver_data structure.
2009-12-09 15:34:23 +00:00
Phil Bennett
c8608dcc22 Cleaned-up several drivers; added missing prototypes and removed dead ones,
marked non-exported functions as static and removed cases of #include "deprecat.h" [Atari Ace]

---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>

Date: Sat, Dec 5, 2009 at 7:18 AM
Subject: [patch] Header cleanups
To: submit@mamedev.org
Cc: atariace@hotmail.com

Hi mamedev,

This patch improves the quality of the mame driver headers, by adding
missing prototypes and source comments, removing dead prototypes, and
marking some non-exported functions as static within the drivers.  It
also eliminates about a dozen cases of #include "deprecat.h".

~aa
2009-12-08 14:54:29 +00:00
Phil Bennett
54570e176e Fixed srcclean handling of embedded comments within strings [Atari Ace]
(Update of r7501)

---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sun, Dec 6, 2009 at 5:51 PM
Subject: [patch] srcclean bugfix
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

My srcclean changes to track C-style quotes didn't handle all the
special cases correctly (for instance, '\"' and "\\\"").  This fixes
it, and adds some /* ... */ to m68k_in.c so that src2html.exe does a
better job on it.

~aa
2009-12-07 11:13:54 +00:00
Aaron Giles
fd34a32091 Added new functions:
memory_install_ram() to assign a un-named bank to a region and specify
    a pointer to where the RAM lives. If this is called in the DRIVER_INIT
    function or MACHINE/SOUND/VIDEO_START functions, then it is permissible
    to specify NULL, in which case the memory system will allocate memory
    and register it for save states.

  memory_install_rom() is like the above except that it only installs a
    read handler.

  memory_install_writeonly() is like the above except that it only installs
    a write handler.

Updated several instances in the code that were assigning banks to these
sorts of static RAM regions and simplified the code.

Also fixed several regressions reported by Tafoid.
2009-12-07 08:32:02 +00:00
R. Belmont
c165519e07 Fix 64-bit issue noted by Juergen. 2009-12-06 17:30:10 +00:00
Aaron Giles
98484d44b0 Internal memory system shuffling. Address maps initialized internally
now call the same installation handlers that drivers do for dynamic
installation. Cleaned up some parameter ordering and error detection.
2009-12-06 08:18:34 +00:00
smf-
0be7db3893 replaced char * pointer comparison with strcmp. 2009-12-06 02:19:12 +00:00
smf-
2c3c41b08f fixed compiling after share were changed to a tag, not tested if this is the correct behaviour. 2009-12-06 02:03:29 +00:00
Aaron Giles
0fd8c755ff Memory shares are now specified by tag instead of index.
The AM_SHARE() macro now takes a tag parameter. All existing
shares have been bulk renamed to "share##". However, the name
does not matter, so please use descriptive tags going forward.

Also added tag validation for bank and share tags.

Added flag to tagmap_add functions that optionally will
replace existing objects if a duplicate is found.
2009-12-05 20:19:04 +00:00
Aaron Giles
ee315fe99d Renamed functions:
memory_install_read/write_port_handler -> 
        memory_install_read/write_port

   memory_install_read/write_bank_handler -> 
        memory_install_read/write_bank
2009-12-05 07:59:31 +00:00
Aaron Giles
9eda9e163e More memory system cleanup. Removed SMH_* macros entirely. In
their place are a series of expanded macros and new memory
installation helpers. Some mappings below (not all are new):

   AM_READ(SMH_RAM)                       -> AM_READONLY
   AM_WRITE(SMH_RAM)                      -> AM_WRITEONLY
   AM_READWRITE(SMH_RAM, SMH_RAM)         -> AM_RAM
   AM_READ(rhandler) AM_WRITE(SMH_RAM)    -> AM_RAM_READ(rhandler)
   AM_READ(SMH_RAM) AM_WRITE(whandler)    -> AM_RAM_WRITE(whandler)
   AM_DEVREAD(tag, rhandler) AM_WRITE(SMH_RAM) 
                                  -> AM_RAM_DEVREAD(tag, rhandler)
   AM_READ(SMH_RAM) AM_DEVWRITE(tag, whandler) 
                                  -> AM_RAM_DEVWRITE(tag, whandler)

   AM_READ(SMH_ROM)                       -> AM_ROM
   AM_WRITE(SMH_ROM)                      -> (was a no-op)

   AM_READ(SMH_NOP)                       -> AM_READNOP
   AM_WRITE(SMH_NOP)                      -> AM_WRITENOP
   AM_READWRITE(SMH_NOP, SMH_NOP)         -> AM_NOP

For dynamic memory handler installation of the various types,
use the new functions:

   memory_unmap_read()
   memory_unmap_write()
   memory_unmap_readwrite() -- unmaps a section of address space

   memory_nop_read()
   memory_nop_write()
   memory_nop_readwrite() -- nops a section of address space

Cleaned up the internals of the address_map_entry structure, and
also normalized the way the address map macros work to remove a
lot of redundancy.
2009-12-05 07:54:11 +00:00
Aaron Giles
0069237f20 Memory banks are now referenced by tag rather than index.
Changed all memory_bank_* functions to specify a tag.
Bulk-converted existing banks to be tagged "bank##" in
order to ensure consistency. However, going forward, the
tags don't matter, so please name them something useful.

Added AM_BANK_READ/AM_BANK_WRITE macros to let you specify
bank tags. Also changed AM_ROMBANK and AM_RAMBANK macros to
accept tags as well.

Added new functions memory_install_read_bank_handler and
memory_install_write_bank_handler to install banks by tag
name, similar to input ports.

Changed internals of memory system to dynamically allocate
all banks. The first time a bank with an unknown tag is
installed, a new bank object is created and tracked 
internally. Removed all SMH_BANK(n) references outside of
the main code; these should never, ever be useful anymore.
2009-12-03 08:16:38 +00:00
Jonathan Gevaryahu
5dffcb6c6c mostly resolved mix of intel and motorola notation in tms32025 disassembler 2009-12-02 15:32:57 +00:00
R. Belmont
8bc10109ca One more Clang warning fix.
Anyone who's ever been confused by the meaning of a given GCC or MSVC error diagnostic will enjoy this (it's color-coded in real life for added "wow"):

src/emu/memory.c:2148:5: error: comparison of distinct pointer types ('genf *' and 'void *')                                                           
                                check_entry_handler(write);                                                                                            
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                             
src/emu/memory.c:2052:63: note: instantiated from:                                                                                                     
        if (entry->handler.generic != NULL && entry->handler.generic != SMH_RAM) \                                                                     
                                              ~~~~~~~~~~~~~~~~~~~~~~ ^
2009-12-02 03:51:45 +00:00
Fabio Priuli
0180f1b0a8 > Subject: Fix for cp1610 cpu
>
> The cp1610 CPU is only used by the Intellivision (in MESS). However the
> disassembler produces garbage. Also I noticed a tiny error in the CPU
> itself.
>
> Here are the fixes:
>
> Firstly, the CPU, a one-line change. In cp1610.c, at line 3515, you may
> notice that 2 flags are sharing the same bit. Please change the V flag
> to
> use 0x20 (instead of 0x10). That's all there.
>
> Next, the disassembler. It assumes oprom to be 16 bits when in fact it
> is 8.
> I could not see a way of specifying the size of oprom, so assuming it
> is
> always 8 bits. If that's the case, please replace 1610dasm.c with the
> enclosed one.
>
> Thanks and have a great day :)
>
> - Robbbert
2009-12-01 10:56:41 +00:00
Phil Bennett
0cd4d21890 Converted cabal, mappy, toypop and zaxxon to use driver_data structure [Atari Ace]
---------- Forwarded message ----------
From: Atari Ace <atari_ace@verizon.net>
Date: Sun, Nov 29, 2009 at 3:28 AM
Subject: [patch] Convert cabal/mappy/toypop/zaxxon to use driver_data
To: submit@mamedev.org
Cc: atariace@hotmail.com


Hi mamedev,

This patch is a resubmit of my earlier patch to have mappy and zaxxon
store their state in driver_data.  It extends the patch to toypop
(which uses some mappy code), and also converts cabal which I also did
some time ago.  cabal.h and toypop.h are new header files.

~aa
2009-12-01 10:56:22 +00:00
Curt Coder
dc5bb22a05 Changed CDP1869 PAL/NTSC signal to use devcb. 2009-12-01 09:04:13 +00:00
R. Belmont
5dc02c1d32 Fix assert on valid 68k variant. (no credit necessary) 2009-12-01 01:41:41 +00:00
Aaron Giles
b5c3081f3e Cleanups and version bump. 2009-11-30 01:46:32 +00:00
Aaron Giles
93671925bd Memory regions now use a tagmap for lookups. 2009-11-30 00:48:31 +00:00
Aaron Giles
6895fc3b66 Added AM_BASE_SIZE_MEMBER() macro for specifying both base and size
structure members at once. Updated all cases where this could be
used.
2009-11-28 19:41:12 +00:00
Aaron Giles
90560a421d From: Atari Ace <atari_ace@verizon.net>
Date: Sat, Nov 28, 2009 at 5:49 PM
Subject: [patch] Eliminate spriteram3
To: submit@mamedev.org
Cc: atariace@hotmail.com


Aaron's patch to move the generic pointers into machine conflicts with
a patch I'd worked on some time ago to start eliminating those globals
altogether, so I've become motivated to finally submit it ;-).  This
patch eliminates spriteram3, which unlike the other spriteram
variables, is only a convenience for some drivers.

~aa
2009-11-28 19:33:18 +00:00
Phil Bennett
a6dc556396 Fixed i386 REP prefix to use segment:SI when address size is 16-bit (ie: when using OUTSB or OUTSW). [Barry Rodewald]
---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Sat, Nov 28, 2009 at 6:55 AM
Subject: Another i386 fix
To: submit@mamedev.org


Hi,

Small fix this time.  This fixes an issue with the FM Towns version of
MS-DOS where it was feeding nonsense parameters to the CD-ROM
controller.  MS-DOS uses REP OUTSB to send the parameters, and I
noticed that the expected data was not what was sent to the I/O port.
Looking at the i386 code, I saw that it always used segment:ESI,
regardless of address size.  This fix makes it use segment:SI when
address size is 16-bit (ie: when using OUTSB or OUTSW).

Patch is based on 0.135u1.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-11-28 18:26:43 +00:00
Aaron Giles
5e643c1251 Purged remaining globals from video/generic.c and audio/generic.c 2009-11-28 08:31:22 +00:00
Aaron Giles
6bfe172c78 Removed global videoram, colorram, paletteram, and spriteram.
Added equivalent pointers to machine->generic. Updated all
references.

Now that accessing these is more awkward, it is probably best
to put these pointers in the driver data structures instead
of using the generic pointers. The main reason to continue
using generic pointers is to allow use of paletteram shortcuts
and buffered spriteram handling.
2009-11-28 03:06:46 +00:00
Curt Coder
abb8ad1fb6 Actually use the speaker interface if provided. 2009-11-27 13:11:19 +00:00
Curt Coder
a2e82426fe Intel 8255A: clear input latch after reading it 2009-11-27 13:10:50 +00:00
Aaron Giles
cdd9d7c757 Introduced a generic_pointers structure within machine that is
designed to hold generic pointers that are commonly used. For
now, only generic_nvram has moved there. Added AM_BASE_GENERIC
and AM_SIZE_GENERIC macros for initializing generic pointers
in memory maps. Also added AM_BASE_SIZE_GENERIC to set both
base and size in one step.

Moved global variables out of machine/generic and into a private
data structure hanging off of the running_machine. Added newly-
needed machine parameters to coin_counter_w, coin_lockout_w, and
coin_lockout_global_w. Also added machine parameter to 
set_led_state.

Added interface functions to get the number of dispensed tickets
and to increment the count, to remove the need for direct access
to these global variables. Also added functions to get the
current count on a particular coin counter and to determine the
lockout state.

Future checkins will move the remaining generic pointers (for
paletteram, videoram, spriteram, colorram, etc.) into the new
generic_pointers structure.
2009-11-26 23:43:19 +00:00
smf-
4f90eda49b DEVCB_INPUT_PORT(tag) can be used for write callbacks. 2009-11-26 17:25:09 +00:00
Miodrag Milanovic
149c6aa7ca CF clear after binary operations on Intel 8008 CPU core 2009-11-26 09:37:12 +00:00
Aaron Giles
409223e919 Switched from linear interpolation to antialiased point sampling
when upconverting low-frequency sound streams. This should
de-muffle low-frequency streams, treating them has having
hard edges at sample boundaries.
2009-11-25 14:41:09 +00:00
Curt Coder
f47855ec04 CDP1869 changes:
- converted page RAM functions to use devcb
- added pull interface for predisplay
2009-11-25 11:15:10 +00:00
smf-
8836834f08 added memory_install_write_port_handler & memory_install_readwrite_port_handler to be consistent with installing handlers. 2009-11-25 09:48:44 +00:00
smf-
2877513af1 Hooked up eepromdev.c using PORT_READ_LINE_DEVICE/PORT_WRITE_LINE_DEVICE in groundfx.c.
Output ports are now affected by IP_ACTIVE_HIGH/IP_ACTIVE_LOW (eepromdev.c has active low cs).
The previous value for callbacks in inptport.c is now tracked per field. This saves recalculating it for PORT_CHANGED & conditional fields wouldn't always get updated correctly.
Tidied up eepromdev.c interface.
2009-11-24 12:05:35 +00:00
Ryan Holtz
603ebf6ac7 (from MESS) Added support for SCSI command 0x2a (Write w/ 32-bit LBA), upped input buffer size in WD33C93 controller [Harmony] 2009-11-23 23:29:56 +00:00
R. Belmont
c80aaff52c Fixed GCC compile error in SC/MP.
I assumed the as-edited line was the intent of the code, if not Micko will need to fix it :)
2009-11-23 17:44:36 +00:00
R. Belmont
e76480c990 Fixed 64-bit GCC build. 2009-11-23 17:28:24 +00:00
Miodrag Milanovic
7b1aa92c4d INS 8060 SC/MP II support (using clock divider 2), main model renamed to INS 8050 SC/MP 2009-11-23 11:19:15 +00:00
Miodrag Milanovic
d98fa09e1f Added Intel 8008 and National Semiconductor SC/MP CPU cores 2009-11-23 08:19:29 +00:00
Aaron Giles
9072c7f911 Added new module tagmap which is a simple hashed string map.
Updated device and input port lists to use the tagmap for
tag searches. Also removed the whole "quark" thing from the
validity checker in favor of using the tagmaps.
2009-11-23 04:55:26 +00:00
Fabio Priuli
1847675e7f Added nodefault eeprom macro for 93c46 and 93c66b eeprom device (not worth any credits) 2009-11-21 23:44:29 +00:00
smf-
7a3cc980ed added set name to -romident 2009-11-21 12:00:38 +00:00
smf-
dd1d8777a9 added device support to the input system. internally this replaces PORT_CUSTOM/PORT_CHANGED, backward compatibility is achieved with an internal dummy device.
added output lines (IPT_OUTPUT), which can be written using new input_port_write* functions or directly from a memory map using AM_WRITE_PORT
converted adc083x to use io lines.
adc08x chips are all hooked up using input/output ports
reversed racing force steering wheel input and gas pedal, which is enough to get the game to boot.
reversed steering wheel input on winding heat, the usa cabinets are however hooked up the other way.
renamed adc0831_interface to adc083x_interface.
fixed adc083x gnd input
removed stray call logerror from adc083x.c
fixed default adc083x sars value
adc083x reset only affects outputs
2009-11-20 22:36:52 +00:00
Wilbert Pol
bcd6cff1fe tms7000: Fixed disassembly of PCREL addressing mode. 2009-11-20 18:53:06 +00:00
Aaron Giles
f0cdba5b11 Cleanups and version bump. 2009-11-20 06:50:40 +00:00
Wilbert Pol
d28c77d4fb Added missing sound type check. 2009-11-19 19:31:04 +00:00
Aaron Giles
cf62f4e8bc Put minimum tag length back to 2 characters for now. 2009-11-19 05:34:46 +00:00
Aaron Giles
ad062c9e43 Fix TLBMOD exceptions so they also properly set BadVAddr. 2009-11-18 15:46:52 +00:00
Fabio Priuli
ea72b5770d Added tentative PORT_CUSTOM(eepromdev_bit_r) for EEPROM devices.
Not 100% sure this is the better way to implement this (we pass the eeprom tag as parameter of the PORT_CUSTOM), but I haven't been able to find a better solution.

No driver uses this yet, so I'm open to any suggestion before to use it extensively ;)
2009-11-18 13:26:30 +00:00
Fabio Priuli
514c637bbe Added a MDRV_EEPROM_NODEFAULT_ADD macro for drivers which do not need default data size / data
I don't like too much this solution, but now the code is self contained: hence, better fixes (e.g. no MDRV_DEVICE_CONFIG_DATAPTR(eeprom_config, default_data, &_data) at all for the NODEFAULT eeprom?) could be added without further modifying the behavior across the drivers.
2009-11-18 12:56:36 +00:00
Jonathan Gevaryahu
2aa28ef3d9 fix crash bug 2009-11-18 08:56:19 +00:00
Jonathan Gevaryahu
3dbbc11f0d Got rid of R->OldNoise since it causes problems for gamegear/sms. Changed noise taps accordingly. Redid change to gamegear/sms for XOR vs XNOR, now verified by Justin Kerk. Verified gamegear noise taps thanks to sample provided by Justin Kerk.
Add stereo sound support to sn76496.c for gamegear. [Lord Nightmare, Justin Kerk]
2009-11-18 08:09:19 +00:00
Aaron Giles
693024974e Fix assertion in DRC. 2009-11-18 06:12:50 +00:00
Aaron Giles
aeca44b1ca Fix PowerPC 603 translation so it doesn't get stuck in an infinite
loop after the first fixup.
2009-11-17 15:43:06 +00:00
Aaron Giles
39957739fd Fix broken DRC logging. 2009-11-17 15:40:48 +00:00
Jonathan Gevaryahu
0a647b65c9 revert gamegear/sms psg change, was probably correct before, but need a better sample of the waveform to make sure. 2009-11-17 13:34:30 +00:00
Aaron Giles
ccefa6749d MIPS3 TLB fixes:
- fixed bug in vtlb code that caused us to lose track of previously
    registered fixed page ranges
 - fixed MIPS3 behavior that would not clear out invalid page ranges
    from the VTLB under certain circumstances
 - added support for TLB sizes less than 48 entries
2009-11-17 06:09:38 +00:00
Jonathan Gevaryahu
315b992f44 Add NCR7496 variant to sn76496.c
Switched the SMS and Game gear PSGs to use an XOR instead of XNOR feedback, but this needs further verification. Updated comments to show which chips are currently verified. Cleaned up comments.
2009-11-16 09:06:00 +00:00
Aaron Giles
19bf1b46ea MIPS3 TLB fixes:
- now properly generating TLB fill exceptions under correct circumstances
 - TLB exceptions no longer trash low 4 bits of Context
 - exceptions with the EXL bit set always go to vector 0x180
2009-11-16 06:45:54 +00:00
Jonathan Gevaryahu
a04f60c0f4 Fix screeching in regulus: When summing together four equal channels, the size of the max amplitude per channel should be 1/4 of the max range, not 1/3. oops. No idea when this bug is from, but its OLD. 2009-11-16 05:58:42 +00:00
Ryan Holtz
2a9387c49d Reverting bad fix 2009-11-16 02:45:46 +00:00
Ryan Holtz
4cef27ecc9 - Fixed Context usage and TLB exception vectors in the MIPS core [Harmony] 2009-11-16 00:04:37 +00:00
Aaron Giles
e0d437dc1d Enforce a minimum tag length of 3 characters. This will enable
future lookup optimizations. 

By and large, the only things that used 2-character tags were bulk-
converted sound chips which were generally mapped to "ym" or "ay" 
(and a few others). These were changed to "ymsnd" and "aysnd", 
mimicking the way CPUs were changed from "main" to "maincpu" a while
back.
2009-11-15 22:02:27 +00:00
Aaron Giles
bd11e46b0c Minor comment cleanup. 2009-11-15 15:47:37 +00:00
Jonathan Gevaryahu
aaf66f0744 Reverted bipolar output due to problems in MESS, code is commented out. 2009-11-15 05:38:25 +00:00
Jonathan Gevaryahu
ff546330ef Minor comment update. 2009-11-15 04:15:58 +00:00
Jonathan Gevaryahu
6371d8dc1c Trashed the old pre-accurate-clocking STEP based sample averaging scheme from sn76489 and friends, vastly simplifying the code. Made the output bipolar rather than only above the 0 line.
Added missing statement to the get_safe_token function for the recently added SN94624
2009-11-15 03:59:28 +00:00
R. Belmont
fa216ba6f9 MC680x0 update
- Reworked PMMU/core interface so PMMU now sees all cop 0 instructions
- Improved disassembly of PMMU instructions
- Preliminary 68LC040 support
- Fixed disassembly for EC/LC variants of '030/'040
2009-11-14 18:28:47 +00:00
Jonathan Gevaryahu
f3dcc0209c Marked cosmic alien colors as wrong, added TODO to the driver for fixing colors. Added new XTAL value for cosmic alien and switched driver to use it. 2009-11-13 21:30:22 +00:00
Ryan Holtz
6df78b8321 Added missing BLTZAL opcode to the RSP core. [angrylion] 2009-11-12 22:47:57 +00:00
Curt Coder
a2f29cedb4 Allowed child CPUs to be used in read8/write8 callbacks. 2009-11-08 21:32:27 +00:00
Curt Coder
f7c7162cba Removed useless assert. 2009-11-08 20:36:09 +00:00
Curt Coder
9cffc02d91 Refactored Z80 DMA to use devcb. 2009-11-08 17:24:39 +00:00
Curt Coder
a149d0af3a Fixed i8237 DACK polarity. 2009-11-08 16:22:26 +00:00
Curt Coder
9186e3c549 Refactored i8237 DMA to use devcb. 2009-11-08 14:26:53 +00:00
Curt Coder
ff9e79ecea Refactored i8257 DMA to use devcb. 2009-11-07 22:52:06 +00:00
Phil Bennett
448de6a3e9 i386 core fixes: [Barry Rodewald]
* Added Nested Task flag, and I/O Privilege flags.  They aren't
  implemented in any way, but can now be set or reset.  Can be used to
  detect a 80386 or later CPU.
* Implemented ENTER instruction.
* Made IRQ vectors treated as 8 bytes when in protected mode, and made
  the addresses pushed onto the stack 32-bit if the gate descriptor used
  is a 386 interrupt or trap gate (also when in protected mode, will
  always be 16-bit if in real mode).


---------- Forwarded message ----------
From: Barry Rodewald <bsr@xnet.co.nz>
Date: Tue, Nov 3, 2009 at 10:12 PM
Subject: i386 update
To: submit@mamedev.org


Hi,

Here's a few small fixes for the i386 core, based from the work I've
been doing on emulating the FM Towns in MESS.  Mostly based from the
i386 Programmer's Reference Manual.

The fixes are as follows:

* Added Nested Task flag, and I/O Privilege flags.  They aren't
implemented in any way, but can now be set or reset.  Can be used to
detect a 80386 or later CPU.

* Implemented ENTER instruction, this is used by the FM Towns version of MS-DOS.

* Made IRQ vectors treated as 8 bytes when in protected mode, and made
the addresses pushed onto the stack 32-bit if the gate descriptor used
is a 386 interrupt or trap gate (also when in protected mode, will
always be 16-bit if in real mode).

I've tested a few i386 games (Seibu SPI, PC-AT, and Wolf System) in
MAME 0.135, with no obvious regressions.

Diff is based on MAME 0.135.

Thanks,
Barry Rodewald
mailto:bsr@xnet.co.nz
2009-11-05 13:17:33 +00:00
Jonathan Gevaryahu
1113395cd2 Fix a minor oversight in the last patch: R->OldNoise was not reset on PRNG reset. 2009-11-05 03:23:11 +00:00
Jonathan Gevaryahu
d3a8485a6a Update SN76489/A to have correct PRNG waveforms (a 0 bit was missing at the beginning, and beginning of SN76489 waveform was all 1s instead of 0s as measured on hardware). Add SN94624 (same as SN76489). [Lord Nightmare, plgDavid (David Viens)] 2009-11-04 18:21:30 +00:00
Andrew Gardner
45dfc2315a Adds save state support to plygonet.c and the DSP56156 CPU core. 2009-11-04 05:20:00 +00:00
Dirk Best
3cfb47f7dd Z80: Check for NOP in interrupt mode 0. This allows code like ei / halt / di to work correctly. A better solution would be to implement full support for arbitrary opcodes in mode 0. 2009-11-03 16:54:46 +00:00
Jonathan Gevaryahu
19ea3c4ef9 Change to consistently use Intel notation for hex values in TMS32010 disassembler, rather than a mix of Motorola and Intel notation. 2009-11-02 23:15:40 +00:00
Brian Troha
35322eb88b fix typo in last submission for the ymf271.c and correct spacing 2009-11-01 03:38:36 +00:00
Brian Troha
48f5d42b1b restates the notes about the error in LFO table as listed in the original manual for the ymf271.
Also include Nicola's version of the formula
2009-11-01 03:34:24 +00:00
Aaron Giles
5ecfb2044b Cleanups and version bump. 2009-10-31 22:47:46 +00:00
Nathan Woods
3cb4cbfa70 Added an attotime_is_never() function 2009-10-31 20:52:32 +00:00
Aaron Giles
a2a25f17e3 Changed 32010 unknown opcode to output in $xxx format like
all other hex values.
2009-10-31 19:50:29 +00:00
Andrew Gardner
e2bcc78b99 Changes to the dsp56156 cpu core. [Andrew Gardner]
* Added JF table decode function.
* Added ABS, IMAC, and TFR2 opcodes.
* Fixed various flags for TST, INC24, SUB, CMP, and CMPM.
* Added hack to DO function to accommodate for the CPU core's inaccurate math.


(Polygonet Commanders goes 'ingame' yet again, but it's because of a hack I added 
to the hardware DO function to ignore negative values.  The do loop, of course, should 
not be getting negative values, but that will require accurate math functions with 
accurate rounding and limiting, and I'm not there yet.  Oddly enough, i've also
broken the sky ROZ layer.)
2009-10-30 09:05:47 +00:00
R. Belmont
907e4403e4 scsihd: don't crash if no media is attached 2009-10-29 01:14:00 +00:00
R. Belmont
55c2b7c84a 680x0 update:
- Support PMOVE modes from PMMU
- Allow the FPU to be used for both '030 and '040
- Add byte and word FPU loads/stores
- Fixed buggy FPU 64-bit stores in the (An) addressing mode


If anyone has any ideas on how to sanely handle the 68k FPU's 96-bit "take
that, Intel" mode let me know ;-)
2009-10-28 02:31:21 +00:00
Phil Bennett
2055d5b438 03487: All Drivers using z180 cpu: Access Violation [Phil Bennett]
Should fix the compile warning/error too.
2009-10-26 19:54:03 +00:00
Aaron Giles
eb2ba6cf6c Cleanups and version bump. 2009-10-25 05:34:14 +00:00
Aaron Giles
a7d62ae961 > -----Original Message-----
> From: Christophe Jaillet [mailto:christophe.jaillet@wanadoo.fr]
> Sent: Saturday, October 17, 2009 9:02 AM
> To: submit@mamedev.org
> Subject: Correct 3 unbalanced calls to 'profiler_mark_start' and
> improve warning message
> 
> Hi,
> 
> while profiling the game 'silentd', I found some 'FILO overflow'
> warning.
> 
> This was linked to 2 different unbalanced 'profiler_mark_start' calls.
> 
> The attached patch does the folowing :
>     - add a missing 'profiler_mark_end' call in 'drawgfxm.h'
>     - add a missing 'profiler_mark_end' call in 'video/taito_b.c'. I
> think
> that this one could probably be completely removed
>     - add a missing 'profiler_mark_end' call in 'profiler.c'. This one
> is
> very unlikely to happen. This has been done by rearranging a bit the
> code in
> order to have only one exit in the function
>     - add more information about the likely type of profiling data that
> has
> made the fifo overflow. (This is that information that has help me find
> the
> two first issues).
> 
> Hope this help.
> Best regards,
> 
> CJ
2009-10-25 05:08:04 +00:00
Aaron Giles
c96cde525f From: Dirk Best <startaq@gmail.com>
Date: Sun, Oct 11, 2009 at 00:38
Subject: patch for devcb.c
To: submit@mamedev.org


Hello,

attached is a patch for devcb.c which allows devices to directly call
child devices. An example would be a device with its own CPU and a
child device that calls DEVCB_CPU_INPUT_LINE. Without the patch, this
would have only worked with tags like
DEVCB_CPU_INPUT_LINE("parent:device_cpu", 0). With the patch, its
enough to write DEVCB_CPU_INPUT_LINE("device_cpu", 0).

Dirk
2009-10-25 05:06:08 +00:00
Aaron Giles
731077c991 From: Dirk Best <startaq@gmail.com>
Date: Sat, Oct 10, 2009 at 20:09
Subject: patch for ui.c
To: submit@mamedev.org


Hello,

attached is a small patch that changes the way cpu clocks are
displayed on the initial information page. It now displays the real
values, which takes internal mulitpliers/dividers into account.

Dirk
2009-10-25 05:04:51 +00:00
Aaron Giles
69c49ae7cb > From: Robert [mailto:pac0446@bigpond.net.au]
> Sent: Wednesday, October 14, 2009 4:58 AM
> To: Aaron Giles
> Subject: mame submission for mess
> 
> Hi Aaron,
> 
> Here is a fix (MESS svn 5957) to correct issues when a clone computer
> has
> less devices than the parent (example exidy and exidyd). Currently, if
> you
> run exidyd, the devices from exidy will be used, causing warning
> messages
> which cannot be got rid of. The solution is to remove the use of parent
> ini
> files because in truth, MESS does not really need MAME's ini heirarchy.
> 
> (see attachemnt for dif).
> 
> I've had this change for about 2 years privately, and no problems have
> been
> found.
2009-10-25 05:00:12 +00:00
Curt Coder
8b5afcb638 Added helper macro for CDP1869. 2009-10-23 12:38:29 +00:00
Curt Coder
102e50f9e9 Added helper macro for CDP1864 screen creation. 2009-10-22 10:54:28 +00:00
Derrick Renaud
20765c0fe2 DISCRETE_COUNTER - added MIN parameter and optimized speed. 2009-10-22 02:36:26 +00:00
Derrick Renaud
d02dc3795d Shuffleboard - set proper Foul tone (Andrew Welburn) 2009-10-21 23:49:23 +00:00
Phil Bennett
8b28c00872 Minor speed improvement to the e132xs core - don't pass opcode parameter when calling instruction handlers [Christophe Jaillet]
> -----Original Message-----
> From: Christophe Jaillet [mailto:christophe.jaillet@wanadoo.fr]
> Sent: Saturday, October 17, 2009 9:00 AM
> To: submit@mamedev.org
> Subject: Speed up emu\cpu\e132xs
>
> Hi,
>
> this patch speeds up the emulation of the CPU e132xs.
>
> For the emulation of this CPU, two structures are used :
>     - '_hyperstone_state' which keep track of the state of the
> processor
>     - 'regs_decode' which is used when decoding the opcode being
> executed
>
> Both of these structures have a field 'op' but only the one of
> 'regs_decode'
> is actually used.
>
> The emulation of the CPU is done this way :
>     - read the opcode
>     - call the corresponding function which emulate this opcode. Two
> parameters are passed :
>         o a pointer to hyperstone_state
>         o the opcode itself
>     - the opcode is then stored in the relevant field of a local stack
> stored 'regs_decode' structure.
>
> The field 'op' of  '_hyperstone_state' is never used.
>
>
> So the proposed patch does the following :
>     - use the 'op' field of '_hyperstone_state' instead of the one of
> 'regs_decode'
>     - initialise this 'op' field before calling the function which
> emulate
> this opcode
>     - remove the need of the second parameter ('opcode') of these
> functions
>     - remove the now useless 'op' field of the structure 'regs_decode'
>
> Doing so removes the need of pushing a parameter on the stack for each
> opcode simulated and give a average speed up of 1 % or 2 % of the
> emulation.
>
> Hope this help.
> Best regards,
>
> CJ
2009-10-21 11:27:56 +00:00
Phil Bennett
8eeb31a04c Fixed a couple of source typos [Christophe Jaillet]
> -----Original Message-----
> From: Christophe Jaillet [mailto:christophe.jaillet@wanadoo.fr]
> Sent: Saturday, October 17, 2009 9:03 AM
> To: submit@mamedev.org
> Subject: Patch against 2 typo in comments
>
> Hi,
>
> all is said in the object of the mail. Catch while going thrue the
> code.
>
> Hope this help.
> Best regards,
>
> CJ
2009-10-21 10:18:15 +00:00
Aaron Giles
59a1941469 > -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Saturday, October 17, 2009 12:14 PM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] Remove dead prototypes
> 
> Hi mamedev,
> 
> This patch mostly removes dead prototypes, especially in source files
> as opposed to header files which I've previously audited.  It also
> migrates a few prototypes to existing header files, and adds missing
> prototypes to segamsys.h.
> 
> ~aa
2009-10-21 05:20:23 +00:00
Aaron Giles
d81f1f98d3 > From: atari_ace@verizon.net
> To: submit@mamedev.org
> CC: atariace@hotmail.com
> Subject: [patch] Eliminate more .data
> Date: Wed, 7 Oct 2009 08:51:56 -0700
> 
> Hi mamedev,
> 
> Most variables in .data are likely to lead to multisession bugs, so it
> is best to eliminate them and add explicit init/reset code for them
> instead. This patch does that for almost all the cases, with a few
> changes deserving some comments:
> 
> z180: cc was global when it should be per-cpu.
> nesapu: the noise table would be different run to run in multisession
> which probably wasn't intended.
> astring: i constified the dummy string to make it impossible to
> modify.
> mediagx: hits was separated from the constant data
> tecmosys: i reduced the number of exports and renamed them to use
> tecmosys_ as a prefix.
> atari: i moved the renderer function into ANTIC.
> naomibd: the array provided to x76f100 was too small and might have
> caused memory corruption.
> n64: i constified the one and zero colors, requiring many more const
> qualifiers to be added.
> ldverify: i encapsulated the audio and video variables to reduce the
> amount of global state.
2009-10-21 05:18:32 +00:00
Derrick Renaud
c79245f95c DISCRETE_RC_CIRCUIT_1 - promoted skyraid custom charge to it's own module so it could be used with the same circuit in Battlezone.
Battlezone - updated to use new module.  Adjusted sound levels.  Adjusted engine frequency.  Remember there is a slider to adjust the frequency.

Donkey Kong Jr. - set noise clock to a fixed measured frequency.  (Speed optimization)
2009-10-21 04:34:00 +00:00
Curt Coder
ba138e24f5 - Refactored Z80CTC to use devcb
- Emulated coin flag flip-flop in Cosmic Chasm
2009-10-20 15:28:16 +00:00
Andrew Gardner
b1183137b9 Fixed dsp56156 DO & BSCC opcode bugs. [Andrew Gardner]
(Also makes the code prettier in parts)
(The dsp now goes into its calculation loop, but some
opcode doesn't set flags properly, so it never drops
out of the loop).
2009-10-20 06:11:07 +00:00
Derrick Renaud
b3d22182a0 Mario - added proper mixer to final output. This adds the missing filtering on the walking sounds.
This following is not worth mentioning yet.
Started the new 74LS624 code.  Called it DISCRETE_74LS629 for now, until it is ready to replace the old code.  You can enable it in dkongjr and mario using the USE_LS629 define.

I still need to work out the threshold/range relationship.  I'm having the old schrodinger's cat problem.  I need to measure the cap threshold, but doing so changes it.  I'll work it out.
2009-10-19 04:21:41 +00:00
Luca Elia
5f3eb963b3 Dynax.c update [Luca Elia]
New games added or promoted from NOT_WORKING status
---------------------------------------------------
Mahjong Gekisha [Luca Elia, Guru, Dyq, Bnathan]

New clones added
----------------
Hana Jingi (Japan, Bet) [Luca Elia, Guru, Brian Troha, Yasuhiro Ogawa]
2009-10-18 19:41:22 +00:00
R. Belmont
98800d5b98 scsihd updates
- Fixed parameter interpretation for READ(10) and READ(12)
- Added WRITE(10)
2009-10-17 20:15:15 +00:00
Angelo Salese
57dd9e65f1 i386: implemented SLDT & STR opcodes 2009-10-17 17:02:27 +00:00
Couriersud
1e4c12db82 c++ fix. new is a reserved word in c++ 2009-10-16 23:50:08 +00:00
Couriersud
48dd29d9ba c++ fix. 2009-10-16 23:49:52 +00:00
Couriersud
4cf500edce c++ fix. 2009-10-16 23:49:38 +00:00
Couriersud
3a49a59d8c c++ fix. 2009-10-16 23:49:24 +00:00
Couriersud
ca9bc0d9c4 c++ fix. new is a reserved word in c++ 2009-10-16 23:48:00 +00:00
Derrick Renaud
b5f5e251a1 Blue Shark - added shark sound
Note: I think the schematics have no bearing in reality.  The whole circuit and components need to be verified against a real board.
2009-10-13 02:56:51 +00:00
Couriersud
a4054be2b3 - OSD_PROFILING is now an environment variable. No more recompiling to turn profiling on
- Added two asserts to task processing
2009-10-12 10:17:23 +00:00
Couriersud
e60cd95d44 DSS_INVERTER_OSC optimizations 2009-10-12 10:08:47 +00:00
Aaron Giles
2d22e450f2 Cleanups and version bump. 2009-10-12 08:45:25 +00:00
Aaron Giles
357e36fc84 Eliminated osd_cpu.h.
Types are pretty much unified now.
Multiply operations are handled by eminline.h.
Divide operations were just silly in macros.
64/32-bit combination/extraction macros moved to osdcomm.h and renamed.

Also fixed compile errors in recent 68k changes.
2009-10-12 08:37:04 +00:00
R. Belmont
17fc4a4a78 m680x0 update:
- Added working PMMU address translation (not feature complete, but sufficient
  to boot several 68030 Macs in MESS)
- Fixed up disassembly of some PMMU instructions
- Added "68020 with 68851" CPU type
2009-10-12 02:50:35 +00:00
Couriersud
acf91ebdf7 Fix allocation of task node buffers 2009-10-11 19:28:00 +00:00
Couriersud
3fb3e9a7af Renamed STREAM_UPDATE_FREQUENCY to STREAM_UPDATE_ATTOTIME
STREAM_UPDATE_FREQUENCY now reflects the frequency.
2009-10-11 19:11:40 +00:00
Couriersud
b971b59287 A bottle of champaign to the person who explains
the speed improvement in dkong from 1230% to 1470% due to
this change (setting context->data to 0 in reset).
Actually, it will avoid the first stream_update of buffer_stream when
after approx. 11 samples the dac is written.
Without setting data to 0, stream_update(buffer_stream) is called before
stream_update(discrete_stream) is called.
With the patch, the order is of the stream_updates is determined by streams.c.

What makes this interesting is, that the startup order of the stream_updates
determines the whole run-time of the game. When profiling, NODE_73 (Sallen-Key-Filter)
needs 1066 cycles without the patch and under 135 with the patch, although it is the 4th node
after DISCRETE_INPUT_BUFFER.

All in all this looks like a caching issue, however I am currently clueless what in the end
is causing it.
2009-10-11 17:32:38 +00:00
Scott Stone
5ba73b3879 XTAL information update [Dirk Best] 2009-10-10 18:03:30 +00:00
Couriersud
d05969d5fc Fix bug introduced with profiling changes 2009-10-09 23:07:56 +00:00
Couriersud
15534ae68b Better task processing
- tasks are now processed according to their dependency lists. Tasks
  can now start early and will only process samples which are 
  already available. This has most impact on drivers which have
  significant variance in the run-time of individual tasks.
- tasks now process samples in slices, currently max 240 samples / slice. 
- TASK_GROUP is now obsolete - Will update drivers at a later stage.
- step function pointer now back in node, modules may register 
  optimized step functions.
- profiling code now always compiled, introduced static int profiling = ... 
- some more EXPECTED/UNEXPECTED usage.
2009-10-09 22:57:56 +00:00
Couriersud
5bd3f9a46b Add some EXPECTED/UNEXPECTED to if statements 2009-10-09 22:44:05 +00:00
Aaron Giles
b921124c9e Device memory spaces are now visible in the debugger. 2009-10-09 05:46:32 +00:00
Derrick Renaud
425a18f6fd Blue Shark - added octopus sound 2009-10-08 01:24:14 +00:00
mariuszw1
333f187efa Fixed DMA write mask register in 8237dma [Mariusz Wojcieszek] 2009-10-07 15:54:25 +00:00
Derrick Renaud
935e63f8aa More sounds for Shuffleboard 2009-10-07 03:24:19 +00:00
Derrick Renaud
0d1660e579 DISCRETE_CRFILTER, DISCRETE_RCFILTER
- optimized my recent changes.  Not worth mentioning.
2009-10-06 23:24:17 +00:00
Derrick Renaud
1a8a712eed DISCRETE_CRFILTER, DISCRETE_RCFILTER
- revert vref change from rev 6979.
 - added capability for all values to be nodes.

Starship 1 - fixed motor sounds.
2009-10-06 00:45:35 +00:00
Couriersud
1a263d82f2 Discrete update
- fix some "const" weirdness I introduced
- fix VREF in CRFILTER_VREF and RCFILTER_VREF. VREF never got used since it was only a static parameter.
- Removed enable from CR_FILTER* and RC_FILTER*
- Updated drivers accordingly.
- Use EXPECTED/UNEXPECTED to help the compiler
2009-10-05 22:01:48 +00:00
R. Belmont
0585b0a309 m68k: throw F-line trap correctly when PMMU instructions are hit on non-equipped CPUs. 2009-10-05 04:26:11 +00:00
Derrick Renaud
ba7640df3e Space Walk - started Springboard Miss sound 2009-10-05 01:18:30 +00:00
Derrick Renaud
82a4484345 Space Encounter - fixed enemy shot sound 2009-10-04 23:21:51 +00:00
Derrick Renaud
35323e6162 Fixed compile warning. 2009-10-04 22:15:59 +00:00
Aaron Giles
aff6be5877 Cleanups and version bump. 2009-10-04 05:08:50 +00:00
Aaron Giles
477a71e7d2 Centralized color definitions and made some colors more specific.
[Mamesick]
2009-10-03 22:15:40 +00:00
Aaron Giles
d30cbf3016 Also added icky hack to make gcc happy in disc_sys.c.
--

> From: David Haywood [mailto:neohaze@nildram.co.uk]
> Sent: Tuesday, September 29, 2009 6:55 AM
> To: Aaron Giles; Klaus Sommer, B.Sc
> Subject: Re: Astro Blaster (German) Romset
> 
> I've added a note by that rom in 'version 1', it should be checked at
> least.  With the u25 supplied the german set works.
> 
> new clones
> ------------
> 
> Astro Blaster (German) [Volker Hann & Team Europe]
> 
> Sommer wrote:
> > hi!
> >
> > attached is the new dumped u25 rom....it's the same as in all other
> romsets!
> >
> > could it be that the u25 dump from "version 1" is bad...and if you
> replace it with an u25 from another dump that it will work?
> >
> > regards,
> > klaus
2009-10-03 21:58:53 +00:00
Couriersud
de55177d94 Discrete task groups
- DISCRETE_TASK_START now requires a parameter TASK_GROUP (>=0, <=9)
- Tasks are scheduled in the order of their task group
- Nodes are automatically buffered between task groups
- Discrete core determines nodes which need buffering to minimize overhead (information in DISCRETE_LOG)
- A discrete block list now must put each stepped node into a task if it uses tasks
- Drivers not using tasks will get one task allocated automatically
- Updated drivers accordingly
- Some more constification
2009-10-03 21:45:09 +00:00
Derrick Renaud
a861e90aa1 Space Walk - added spaceship hit sound
not worth mentioning beyond the already added partial sounds
2009-10-03 17:16:21 +00:00
Couriersud
fbbdb817d7 More changes in order to create task groups 2009-10-03 13:35:20 +00:00
Derrick Renaud
abd2ff0506 Oops, fixed bad commit. 2009-10-03 13:22:38 +00:00
Derrick Renaud
dffbe9eff3 Minor cleanup, not worth mentioning.
Just commiting so it does not clash with Couriersud's work.
2009-10-03 13:09:02 +00:00
Aaron Giles
08a4572e09 > -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Wednesday, September 30, 2009 7:56 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] More static qualifiers
> 
> Hi mamedev,
> 
> This patch makes more of MAME static, primarily targeting functions
> exported by header files that are in fact unused outside their own
> file, and the chip emulators in machine/snes.c.  It also degenericizes
> some exported names in archimds, bublbobl, and lucky74.
> 
> ~aa
2009-10-03 06:53:27 +00:00
Derrick Renaud
07720725b2 Sprint 8 - hooked up all 4 speakers. Defaulted volume on cars 3-8 to off. The game was never meant to mix all sounds together and does not sound as good if you do.
Space Walk - started discrete sounds.
2009-10-03 03:03:09 +00:00
Couriersud
994dde76eb implemented m:n logic for buffered task nodes
- preparation work so that a task node output buffer may be read by
  more than one following task.
- target: implementation of task groups: tasks in a task group run parallel, task groups serial. The current main task may than just be task (in the last task group)
2009-10-03 00:58:15 +00:00
Couriersud
cb21196ecd Maintenance work
- more descriptive names
- preparation for more general task definition
2009-10-03 00:30:57 +00:00
Couriersud
fdbc12eb49 Fix bug in DISCRETE_ONESHOT 2009-10-02 21:48:42 +00:00
R. Belmont
e979d69b28 Fix typo/bug caught by GCC 2009-10-02 02:28:02 +00:00
R. Belmont
751581338b Fix GCC compiler warning. 2009-10-02 02:23:29 +00:00
Derrick Renaud
9ca9d30419 Sprint 8 - complete discrete sound 2009-10-02 02:10:43 +00:00
Derrick Renaud
27bbf65bd1 mario - speed optimization to mario_custom_run() 2009-10-01 23:11:53 +00:00
Couriersud
2fdb170abc 03458: bzone and clones: Broken engine sound
discrete_multiplex broke during enable removal
2009-10-01 20:07:13 +00:00
Aaron Giles
fe289e67f5 > -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Sunday, September 27, 2009 7:58 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] More _NAME macros
> 
> Hi mamedev,
> 
> MAME's idiom for function/data macros is to first implement
> <name>_NAME, then implement the other macros in terms of the _NAME
> macro.  Then in principle only a single line needs editing to change
> the naming convention.
> 
> This patchset implements this idiom more completely.  The first patch
> adds some missing _NAME macros and fixes cases in source files that
> should be using the macros.  The second patch then changes header
> files where the macros should have been used, but weren't.  This
> required changing the idiom for removing a machine driver function
> pointer from MDRV_<FUNCTION>(NULL) to MDRV_<FUNCTION>(0), to avoid
> problems with NULL being macro expanded.  This actually unifies the
> handling of all such cases, as we already had ipt_0 and driver_init_0.
> It also required reworking the devtempl.h implementation in a way that
> triggered a warning on MSVC about using empty macros, so vconv.c
> needed to be updated.  The third patch then renames all the _NAME and
> _0 macros to verify that all the cases have been covered, so it isn't
> intended to be applied.
> 
> ~aa
2009-10-01 17:27:29 +00:00
Aaron Giles
61eb812096 > From: Christophe Jaillet [mailto:christophe.jaillet@wanadoo.fr]
> Sent: Sunday, September 27, 2009 5:45 AM
> To: submit@mamedev.org
> Subject: Increase the number of PROFILER_USERx slots when profiling
> 
> Hi,
> 
> sometimes, when I profile a game in order to see what is the most time
> consuming part of its emulation, the 4 PROFILER_USERx are just not
> enough.
> The attached patch increases this number to 8 in order to give more
> flexibility.
> 
> It also removes the now unused and obsolete PROFILER_END constant in
> order
> to be sure that 'profiler_mark_start' will never be called with it
> 
> Hope this help.
> Best regards,
> 
> CJ
2009-10-01 16:58:26 +00:00
Aaron Giles
eb943f05d7 From: David Haywood [neohaze@nildram.co.uk]
Sent: Friday, September 25, 2009 12:15 PM
To: Aaron Giles
Subject: 360 pad crash

This 'fixes' the bug where MAME crashes and corrupts your config files
if you connect a pad at runtime.  Previously there was an assert, now it
simply doesn't execute that block of code if devcode is null.

I don't know if this is the best fix (it would probably be quite nice if
it could detect pads being added removed at runtime and adapt to that)
but at least it stops it crashing and corrupting files.
2009-10-01 16:56:42 +00:00
Aaron Giles
8d68eede38 > From: Sandro Ronco [mailto:sandroronco@gmail.com]
> Sent: Wednesday, September 30, 2009 4:05 AM
> To: submit@mamedev.org
> Subject: Cheat
> 
> I have added a simple system for auto-detect the ram region for make
> more fast the cheatinit. But I have a problem on some address
> translation, for example in seattle.c the ram region have a physical
> address of  0x00000000 - 0x007fffff and the logical address is
> 0x80000000 - 0x807fffff, I not have found a way for convert the
> physical
> address to the logical address. For now the only way for initialize the
> cheat on seattle.c is force the address to the right range ("ci ub,
> 0x80000000, 0x7fffff") but is not a good solution.
> I hope can help me to fix this problem.
> 
> Regards
> 
> Sandro Ronco


Fixed the logical/physical issue by having the cheat system always
work at the physical layer and output cheats that explicitly point
to the physical space.
2009-10-01 16:48:06 +00:00
Aaron Giles
cb51594344 Memory references can now explicitly specify logical or physical access
by prepending with an 'l' or 'p'. Logical remains the default. Example:
ppb@1000 = physical program space byte at address $1000. ldw@2000 =
logical data space word at address $2000.
2009-10-01 16:40:33 +00:00
Derrick Renaud
54d913bda8 DISCRETE_555_MSTABLE - optimized speed and added new operating modes.
Sprint 8 - started discrete sound.
2009-10-01 04:12:28 +00:00
Aaron Giles
3bfae5cdec Fixed up RAM bank names to prevent crashes with memdump.
Extended explicit banks to 96.
2009-09-28 07:01:06 +00:00
R. Belmont
42951f5c7a M680x0 update
- Add CPU types 68EC030, 68030, and 68EC040
- Start of 030/040 PMMU, including stubbed PMOVE
2009-09-27 23:39:39 +00:00
Derrick Renaud
5fc5a8b203 More 566 work. Not worth mentioning. 2009-09-27 21:35:34 +00:00
Couriersud
ad4feb8686 exp is slow, but pow is even slower
- more LS624 optimization, replace pow(10, x) by pow10(x)
- mixer loop optimizations
2009-09-27 17:14:20 +00:00
R. Belmont
d12b0394b5 m68k: disassemble PMOVE instruction (move to/from PMMU) 2009-09-27 03:15:34 +00:00
Ryan Holtz
b012b88ca5 Don't mention in whatsnew - puts the BSD optimization back in. 2009-09-26 22:33:20 +00:00
Ryan Holtz
43898fb85f Fleshed out SCC68070 definition in m68k core, for CD-i use in MESS [Harmony] 2009-09-26 22:25:33 +00:00
Andrew Gardner
50f6cfc475 Hacked in the dsp56156's "Long Interrupts." Added SUB opcode. [Andrew Gardner]
Polygonet Commanders now goes in-game!
2009-09-26 17:31:48 +00:00
Derrick Renaud
ad6ef38352 DISCRETE_566 - started making a more accurate simulation based on testing of a real IC. This makes the rest of Sky Raider sounds work. 2009-09-25 02:24:11 +00:00
Derrick Renaud
a6571e2487 DISCRETE_74LS624 - optimized for some more speed 2009-09-24 23:55:33 +00:00
Couriersud
24da866367 discrete_sound_r now can inquiry any node
- the return type is UINT8, consequently the designer needs to ensure that the node delivers adequately scaled data.
- input nodes allow the input data to be scaled. The return value is the node value *after* scaling.
2009-09-24 21:28:33 +00:00
Aaron Giles
1f7a6caba9 Cleanups and version bump. 2009-09-24 07:56:15 +00:00
Aaron Giles
aaafda3dd1 > From: Oliver Stoeneberg [mailto:oliverst@online.de]
> Sent: Wednesday, September 23, 2009 4:41 AM
> To: submit@mamedev.org
> Subject: optional flag in -listxml
> 
> This patch:
> - adds an "optional" flag for rom/disk entries to -listxml output
> - removed the obsolete "dispose" flag from the DTD in the -listxml
> output
2009-09-24 07:17:51 +00:00
Aaron Giles
d8aa6627f5 > -----Original Message-----
> From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Sunday, September 20, 2009 9:54 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] Eliminate more #ifdef LSB_FIRST
> 
> Hi mamedev,
> 
> This patch recodes more cases where LSB_FIRST is used to conditionally
> compile separate code for LSB and MSB targets.  The atari.h chunk was
> dead code (both in MAME and MESS) so I simply removed it.
> 
> ~aa
2009-09-24 07:14:58 +00:00
Curt Coder
b0c5844b7a i8085:
- RIM instruction now shows the current status of RST5.5 and RST6.5 pins.
2009-09-23 20:25:57 +00:00
Derrick Renaud
1c0d4ffa12 Removed enable line from DISCRETE_DAC_R1, DISCRETE_566, DISCRETE_74LS624, DISCRETE_ASWITCH 2009-09-23 02:15:07 +00:00
Derrick Renaud
e26e7f3167 Tweaked last DISCRETE_74LS624 update. NOT worth mentioning.
before 1116%, after 1121%
2009-09-23 00:51:36 +00:00
Derrick Renaud
66db523852 Optimized DISCRETE_74LS624 making dkongjr and mario faster. 2009-09-23 00:30:30 +00:00
Scott Stone
48bc58a038 Corrected incorrect XTAL value for XTAL_32_768kHz [ArcadeNUT]
Comment:
Information posted at
http://www.mameworld.info/ubbthreads/showthreaded.php?Cat=&Number=202248
2009-09-22 21:18:58 +00:00
Couriersud
841cbd77c7 Converted 6532riot to devcb interfaces
- updated all drivers
- converted drivers to RS/WS tms5220 interface where appropriate
- removed quite some trampoline functions
2009-09-22 20:11:23 +00:00
Derrick Renaud
ecffbf4c3b Discrete Updates:
Added DISCRETE_LOGIC_SHIFT - generic shift register
  Fixed DISCRETE_BIT_DECODE to apply proper voltage instead of clipping to INT.

Sky Raider - Partial discrete sound
2009-09-21 23:20:32 +00:00
Couriersud
6a0043bf8a Added TMS5220C variant to tms5220.c [Credit: Lord Nightmare]
- implemented reset for TMS5220C if /RS and /WS are pulled down together
- Inserted LNs email and corrections as comment into source
- Created a TODO section.
2009-09-21 21:32:38 +00:00
Couriersud
d93f2fec5c Added comment that looping has tms5220 hooked up to cpu. 2009-09-21 19:59:36 +00:00
Couriersud
fecae12d70 Changed irq callback to be of type devcb_write_line
- Updated drivers accordingly
- Removed some trampoline functions
2009-09-21 19:24:48 +00:00
Couriersud
7b6de74a1e Changed all tms5220 lines to (READ|WRITE)_LINE_DEVICE_HANDLER
- Added q suffix to denote active low lines
- Updated all drivers accordingly.
2009-09-21 17:43:16 +00:00
Angelo Salese
b8932cd741 [z80dma]: Fixed ready flag when the DMA disabled/enabled commands are used 2009-09-21 17:25:16 +00:00
Angelo Salese
b6e43d1bfd z80dma: added preliminary search mode support and fixed a bug with WR3 mask byte writes 2009-09-21 17:07:31 +00:00
Aaron Giles
fcf9e90cd5 Now allow for banks to take up half of the available slots.
Explicit banks now work up to bank 64.
2009-09-21 15:58:25 +00:00
Aaron Giles
ab32fcf575 > -----Original Message-----
> From: Sandro Ronco [mailto:sandroronco@gmail.com]
> Sent: Wednesday, September 16, 2009 12:48 AM
> To: submit@mamedev.org
> Subject: MAME cheat update
> 
> I have added the byte swap to the cheat search.
2009-09-21 08:57:43 +00:00
Aaron Giles
2ca316ec14 From: Pugsy [pugsy@gmx.net]
Sent: Thursday, September 10, 2009 7:10 AM
To: submit@mamedev.org
Cc: upstephh_wip@yahoo.com
Subject: Quick fix for the F6 toggle

Hi

My last diff got altered before getting included, I appreciate this would likely get done (and many
thanks for doing it) but it did lose the F6 functionality when a cheat was selected. Eg. if you have
the cursor bar over Infinite Time then F6 will not work. My original solution using numbered calls
was not ideal but it did work, I'd spent ages trying to find the appropriate routine to call without
joy. Annoyingly I just tried again with 0.134 and it took less than 5 minutes to fix it
properly....DOH!!!

Anyway I've attached a simple one-line diff for 0.134 to hook up F6 wherever the cursor bar is on
the cheat menu screens.

It just changes this in uimenu.c.:-

-       if (exclusive_input_pressed(menu, IPT_UI_TOGGLE_CHEAT, 0))
+       if (ui_input_pressed_repeat(menu->machine, IPT_UI_TOGGLE_CHEAT, 0))


Martin 'Pugsy' Pugh
2009-09-21 08:45:59 +00:00
Aaron Giles
38916f18c8 Made INI file order explicit via priorities. 2009-09-21 08:45:00 +00:00
Couriersud
12992dad26 Implemented a RS and WS line interface for tms5220
- this emulates the RS/WS and READY handshaking according
  to the tms5220 manual. Drivers reading the ready line
  should most probably use it. 
- Note: For cases where the READY handshake is done by the cpu
  sufficient cycles have to be burnt to simulate that the
  cpu waited. This yet has to be implemented.
2009-09-20 23:35:27 +00:00
Angelo Salese
f8aa138a91 z80dma: added decrement step mode and fixed a conceptual bug with portA writes 2009-09-20 22:33:22 +00:00
R. Belmont
5b546d6f6c Support external baud rates in the MC68681 DUART 2009-09-20 00:45:39 +00:00
Couriersud
f75ca12698 Move fake I/O ports into enum 2009-09-19 19:37:21 +00:00
Couriersud
398572a694 Verified irq handling (please credit Quench)
- moved irq handling out of set_irq_line
2009-09-19 19:29:21 +00:00
Couriersud
203e2e538d Fix bugs introduced in last commit
- abstract SP handling
2009-09-19 19:00:52 +00:00
Angelo Salese
e2f3522bc2 z80dma: implemented fixed port transfer behaviour. 2009-09-19 16:09:36 +00:00
Couriersud
d2182ce269 - Added S2650_FO_PORT fake port for flag output line.
- Made CHECK_IRQ_LINE an inline
2009-09-19 14:30:53 +00:00
Couriersud
611759686d tms5110 now exhibits Rom Clock signal 2009-09-19 00:37:00 +00:00
Ryan Holtz
980eb45e70 Fixed disassembly of NEG Rd,Rs instruction in ARM7TDMI Thumb mode [Harmony] 2009-09-18 21:04:09 +00:00
Angelo Salese
2f246a1bee z80dma: Implemented reset command 2009-09-18 11:59:16 +00:00
Andrew Gardner
77a3badd32 Fixed various issues with the dsp56156 disassembler. [Andrew Gardner]
(Off the record)
I verified this thing against IDA Pro's 56156 disassembler and the docs.
Every time I found a bug in IDA's disassembler, I cross-referenced the
manual.  There remain 3 opcodes which are questionably disassembled,
since even the manual is ambiguous on the details, but beyond that, 
this thing should be 100% correct.

Whew.  This might have actually fleshed out a bug in the 
disassembly/execution.  Time will tell...
2009-09-18 04:37:47 +00:00
R. Belmont
e0320b80e3 ym2612/3834: updates to track latest knowledge [Eke-Eke, Nemesis]
- Moved LFO vars inside the chip struct
- Changed SSG-EG to update before channel calcs
2009-09-18 01:43:17 +00:00
Couriersud
a384977a7c CVS & tms5110
CVS: 
- hook up speech cpu
- get rid of "temporary" code which hardwire ctl & pdc writes
tms5110: 
- Implement ctl port input/output for status reads.
- Input/output is switched by clocking pdc after a TALK STATUS command.
- update drivers to support new tms5110_ctl_r
2009-09-18 01:09:37 +00:00
Couriersud
ebe1430d64 Partially implemented TMS5110_CMD_TEST_TALK
- according to the documentation, this needs to be issued to read status on CTL1
- cvs driver needs this
2009-09-17 18:24:01 +00:00
Couriersud
12977f2823 "=A" inline assembly seems to be only supported on 32bit gcc. Provide a 64bit safe version of _get_profile_ticks 2009-09-16 23:46:41 +00:00
Angelo Salese
c8402e45ef z80dma: Fixed Initiate read command 2009-09-16 22:45:38 +00:00
Angelo Salese
024832f299 z80dma: Added enable/disable irq, force ready and reinitialize status byte commands 2009-09-16 22:03:03 +00:00
Angelo Salese
3c7799d14d z80dma: Added continue and reset port A/B timing commands 2009-09-16 21:33:40 +00:00
Angelo Salese
07e5aa6ebb z80dma: Added Initiate read sequence command and hooked up basic status reading 2009-09-16 21:13:31 +00:00
R. Belmont
5e33f4fd5c m68k: don't save signal contexts on *BSD and Mac OS X [scarlet, R. Belmont] 2009-09-16 03:25:28 +00:00
Wilbert Pol
45c5b38c2d lr35902: do not clear the interrupt flag when the cpu is halted and no interrupt is taken. 2009-09-15 16:56:04 +00:00
Wilbert Pol
540bc6e613 lr35902 cpu core: Improved handling of the DI+HALT bug. 2009-09-14 19:17:19 +00:00
Michaël Banaan Ananas
d84af18926 i386: improved handling of override prefixes after a rep instruction [Gabriele Gorla] 2009-09-14 12:30:36 +00:00
Curt Coder
d14a2d2c32 Added device_find_child_by_tag helper function. 2009-09-14 12:28:14 +00:00
Michaël Banaan Ananas
554855d116 removed confusing double variable name 2009-09-12 21:17:43 +00:00
Curt Coder
f53dd256f5 Added CDP1864 sound core for MESS. 2009-09-12 11:11:19 +00:00
Couriersud
26d13a2555 Remove enable for _LOOKUP, MULTIPLEX, _SAMPLHOLD 2009-09-10 20:41:05 +00:00
Couriersud
3fd3f4b7d7 Remove enable input from remaining DISCRETE_LOGIC_(AND|NAND|OR ...) components 2009-09-10 19:54:36 +00:00
Couriersud
73b28be0b1 Remove enable node from DISCRETE_LOGIC_INVERT 2009-09-10 19:28:22 +00:00
Couriersud
214affb3ee Remove Enable input from dst_gain_step (DISCRETE_MULTADD, DISCRETE_MULTIPLY, ...) 2009-09-10 19:15:04 +00:00
Couriersud
4e3d674b2b Disable profiling again 2009-09-10 18:33:12 +00:00
Couriersud
fa0a81f9a3 discrete emulation / not worth mentioning
- DISCRETE_(DIS)CHARGE_EXP back to one parameter (RC term) after discussion with Derrick
- discrete.h indenting
2009-09-10 18:17:22 +00:00
Curt Coder
32e04ee9ef Added CDP1863 sound device for MESS. 2009-09-10 12:28:51 +00:00
Michaël Banaan Ananas
7d526a162a 03435: [Compiling] gcc warning for src/emu/sound/ymf271.c with OPTIMIZE=3 on openSUSE 11.1 x86. (qmc2, hap) 2009-09-10 12:22:13 +00:00
Aaron Giles
e47035e834 Cleanups and version bump. 2009-09-10 08:39:42 +00:00
Aaron Giles
fa68c11272 > From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Monday, September 07, 2009 8:08 PM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] const/static/include fixes
> 
> Hi mamedev,
> 
> A result of some code auditing, this patch adds missing static and
> const qualifiers, and fixes up some header files.
> 
> ~aa
2009-09-10 08:35:37 +00:00
Aaron Giles
8eeb0f1d20 Fixed up some error logging messages to output the correct number of characters
for addresses and data, using the new core_i64_hex_format function.
2009-09-10 08:24:15 +00:00
Aaron Giles
834ef9bf47 Added helper function core_i64_hex_format. Replaced several printf cases in the debugger
with this function to avoid runtime differences on older Windows systems.
2009-09-10 08:04:08 +00:00
Aaron Giles
6051f45409 > -----Original Message-----
> Sent: Wednesday, September 09, 2009 10:32 PM
> To: submit@mamedev.org
> Subject: cheat update
> 
> Simple update for add "increase or equal" and "decrease or equal" in
> cheatnext conditions

[Sandro Ronco]
2009-09-10 07:21:52 +00:00
Aaron Giles
647b726571 i386 fixes: [Gabriele Gorla]
- Add missing arpl instruction
 - Fixed BCD carry
 - Fixed disassembly of group D8 when modrm > 0xc0
 - Add fucompp instruction to disassembler
2009-09-10 07:20:37 +00:00
Aaron Giles
8f9ec7de59 Hooked up F6 again as a global cheat enable/disable. [Pugsy] 2009-09-10 07:17:35 +00:00
Jonathan Gevaryahu
224c8d3f97 68681/2681 duart: When a channel is in loopback mode, do not actually transmit bytes sent to that duart channel over the TX pin 2009-09-10 06:13:26 +00:00
Derrick Renaud
9f9c029a08 Revert r6757 changes. Not worth mentioning. 2009-09-10 02:56:58 +00:00
Derrick Renaud
72a9bdabff Changed tone cap in Noraut Poker to more probable value. Not worth mentioning. 2009-09-10 00:22:46 +00:00
Angelo Salese
cd8063446c G65816: Fixed a bug with SBC opcode N flag behaviour in Decimal Mode [Angelo Salese] 2009-09-09 17:30:56 +00:00
Quench
740ae26ae6 PIC16C5x CPU - Count input fix
- Fixed the T0CKI count input being controlled by the wrong edge sensing
2009-09-09 13:58:19 +00:00
Derrick Renaud
a7a271a90f Added discrete sound to the Noraut Poker games. 2009-09-09 01:21:50 +00:00
Aaron Giles
50b4a43bfd Fix CPP_COMPILE (except for internal compiler error on snes.c). 2009-09-08 16:58:02 +00:00
Aaron Giles
b09565e76f Another crasher. 2009-09-08 15:57:37 +00:00
Aaron Giles
6a9d35c694 Fixed crasher in the debugger revealed by the latest changes. 2009-09-08 15:32:53 +00:00
Roberto Zandona
ae043c68eb fixed CIA PRA,PRB,DDRA,DDRB ports 2009-09-08 14:25:10 +00:00
Aaron Giles
e91948e833 Minor cleanup. Changed watchdog_read handlers to return the address
space's unmapped value rather than 0xff.
2009-09-08 09:18:29 +00:00
Aaron Giles
96d7f2cf3b Remove remaining references to machine->cpu[n]. Removed cpu[n] array.
Replaced with machine->firstcpu which is a fast access to the head
of the list of CPUs.
2009-09-08 09:13:10 +00:00
Aaron Giles
3d59122bb2 Added debug_global_input_code_pressed() for use in debugging.
Also some other small tweaks/cleanups.
2009-09-08 01:40:11 +00:00
Nathan Woods
32e309ebb4 MAMEUI uses input_seq_from_tokens() outside the context of a running emulation,
so this code will crash if machine == NULL and the keycode was not a built in
keycode.  Changing this so that it will gracefully fail if machine == NULL
2009-09-07 13:23:48 +00:00
Curt Coder
2e98a0f2de [Z8] Fixed disassembler argument order. 2009-09-07 12:47:40 +00:00
Curt Coder
9e3d135331 Fixed access violation in MESS skeleton drivers with empty INPUT_PORT sections. 2009-09-07 07:39:00 +00:00
Roberto Zandona
24745e0c58 partial fix to CIA timer: avoid timer's desync in read count operation 2009-09-07 05:40:59 +00:00
Aaron Giles
8fbe10c91f Cleanups and version bump. 2009-09-07 01:34:34 +00:00
Aaron Giles
10b6e7e106 Added PORT_CROSSHAIR_MAPPER() allowing you to specify an alternate, non-linear mapping
function from the raw crosshair value to its position onscreen. [Aaron Giles]
2009-09-07 00:53:53 +00:00
Aaron Giles
03b5da1a55 Added 'options' parameter to the CPU_DISASSEMBLE prototype. For now, the
debugger always passes 0 for this. unidasm has been updated to accept a
mode parameter, which is passed for the options.
2009-09-07 00:26:56 +00:00
Aaron Giles
f60bbef070 Rename osd_profiling_ticks() to get_profile_ticks(). Moved implemention into
inline functions in eminline.h and the ei* functions. [couriersud, Aaron Giles]
2009-09-06 23:30:26 +00:00
Aaron Giles
191fe9cdc3 > From: Atari Ace [mailto:atari_ace@verizon.net]
> Sent: Sunday, September 06, 2009 7:25 AM
> To: submit@mamedev.org
> Cc: atariace@hotmail.com
> Subject: [patch] Deglobalize input.c
> 
> Hi mamedev,
> 
> These patches deglobalize input.c.  The first adds running_machine to
> some driver apis.  The (large) second patch adds the machine parameter
> to the most input_code_pressed apis (generated by script, not
> compilable).  The last patch then actually changes those apis and
> others to take running_machine, and adds struct _input_private to hold
> the input state variables.
> 
> ~aa
2009-09-06 22:28:58 +00:00
Aaron Giles
ad2a5144ad > From: Gabriele Gorla [mailto:gorlik@penguintown.net]
> Sent: Saturday, September 05, 2009 2:11 PM
> To: submit@mamedev.org
> Subject: I386: fix loop instructions when address_size is 16-bit
> 
> Original code always assume address_size to be 32-bit
> The patch will use the correct size based on the status of the
> address_size flag.
>
2009-09-06 21:56:17 +00:00
Couriersud
1b22c69b58 Discrete emulation
- added node parameter to RC_(DIS)CHARGE_EXP
- added const where appropriate
- removed some dead code
2009-09-06 19:53:02 +00:00
Couriersud
c15bc6c38b Modified a comment 2009-09-06 18:38:50 +00:00