Commit Graph

1673 Commits

Author SHA1 Message Date
Aaron Giles
a97f308b83 Converted PowerPC SET_INFOs to direct calls. 2009-03-07 22:59:34 +00:00
Olivier Galibert
27fbe59291 tms57002: Add two missing instructions and hack up the coef update.
The real way coefficient updates are handled is a little too complex
for now, but the hack throttles the update speed to the real rate
given the way konami uses it (once per sync).  It's near impossible to
use it in a different way anyway.

Fixes mantis 2941 (at least for puzldama) and maybe 2953 (needs to
find the roms and test).
2009-03-07 19:41:14 +00:00
Aaron Giles
75f0ff10d1 Added function calls to replace the MIPS3 DRC's various CPU_SET_INFO
bits.

Fixed DCS2 speedup handler so it doesn't get lost during a memory
remap.
2009-03-07 08:54:03 +00:00
Aaron Giles
25b126291e 03001: "Working clones" display problem
Also tweaked the "not working" message.
2009-03-07 07:58:27 +00:00
Aaron Giles
99d297a6fd Cleanups and version bump. 2009-03-05 09:38:53 +00:00
Aaron Giles
3b34b6b8b4 From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Saturday, February 28, 2009 3:53 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] More static/const qualifiers

Hi mamedev,

Another round of static/const qualifier additions, plus a rename of 
has_addon_chip to snes_has_addon_chip.  Notably a number of z80ctc_interface 
are now const (devicification must have removed the cases where it was 
dynamically modified).  Notice that the READWRITExTOy macros declare two 
functions, so you can't make the 2nd function static.  Those macros should 
probably be reworked or removed.

~aa
2009-03-05 08:24:08 +00:00
Aaron Giles
328aa85a24 From: R. Reucher [rene.reucher@batcom-it.net]
Sent: Friday, February 27, 2009 10:17 AM
To: submit@mamedev.org
Cc: qmc2-devel@lists.sourceforge.net
Subject: Proposed patch for src/emu/audit.c

Dear MAME developers,

I've created the attached diff to src/emu/audit.c (0.129u5) to allow for 
reporting a ROM state of "correct" when a game/machine doesn't require any 
ROM files at all (currently it will be reported as "not found", which is 
wrong IMHO).

I know that this isn't really relevant for MAME, but it is for MESS -- so 
I hope you'll accept the patch.

Thanks, Rene
--
Rene Reucher
rene.reucher@batcom-it.net
http://www.batcom-it.net/

It is only people of small moral stature who have to stand on their dignity.
2009-03-05 08:22:45 +00:00
Aaron Giles
e8c09b35f6 Added flags to the metadata entries, encoded in the top bit. Right now
it is a no-op, but eventually will be used to indicate which bits of
metadata are included in the overall checksum.
2009-03-05 07:35:24 +00:00
Couriersud
8d92bff0b7 02180: Corrupt archives are read without problems
* corrupt files in archives now generate an error
* archive files ending in "/" will not be tested for crc - skip path entries
* add new flag FILE_OPEN_NO_PRELOAD to skip decompressing on open
  This is used in audit.c, which only tests whether files exist
* added error checking to all calls to load_file_zipped
2009-03-04 21:30:52 +00:00
Pierpaolo Prazzoli
caf233e1fc Changed eeprom erase command to write 0xff values.
--------------------------------------------------
I see that eeprom_data is initialized with a memeset of 0xff so I don't think this change will break anything.
2009-03-04 21:06:57 +00:00
Olivier Galibert
e2f25afebf tms57002 - don't abort on unimplemented instructions
Pop up a message instead, hopefully they'll still find their way in
mantis without breaking the game this time.
2009-03-04 18:01:11 +00:00
Olivier Galibert
9bcbadbd0a maketms: Free strings on exit.
This patch will make happier the environments that do not know that
"still reachable" and "leaked" are not the same thing and that exit()
is a _very_ good deallocator.
2009-03-04 16:43:58 +00:00
Aaron Giles
b259386789 Moved SH2 set info functions to direct calls. 2009-03-03 16:22:18 +00:00
Aaron Giles
12a77e490c Of course, not crashing has its benefits too. 2009-03-03 15:13:38 +00:00
Aaron Giles
41af68d311 Turned off annoying assert that nobody is interested in fixing. 2009-03-03 15:08:16 +00:00
Aaron Giles
8dd5d2b953 Renamed 6821new.* -> 6821pia.*
Renamed pia_* functions to pia6821_*

Fixed a couple of compiler errors.
2009-03-03 06:58:07 +00:00
Aaron Giles
9fbb1e6d7b Delete old PIA implementation. 2009-03-03 06:34:32 +00:00
Aaron Giles
ef9e4cb805 Fix speaker/sound ambiguity that caused attempts to round sound outputs
to other sound chips to be broken.
2009-03-03 05:14:22 +00:00
Aaron Giles
1dcd75d039 Removed device types from device queries that use tags, under the
assumption that all device tags are unique. Specifically, the
following no longer need to provide a device type:

   AM_DEVREAD/WRITE
   DEVCB_DEVICE_HANDLER
   devtag_get_device
   devtag_reset
   device_list_find_by_tag

as well as several device interfaces that referenced other devices.

Also fixed assertion due to overflow in the recent sound fix.
2009-03-02 10:59:37 +00:00
Aaron Giles
4ad8ec54f8 Converted the following drivers to the new device-based 6821 PIA:
- qix
 - mcr/williams
 - coinmstr
 - funworld
 - goldnpkr
 - jokrwild
 - nyny
 - r2dtank
 - spiders
 - tugboat

Added new function memory_install_read_port_handler() to more
easily allow you to install read handlers for ports based on tag.

Removed input_port_read_handler8/16/32/64 functions, since they
were really only used for getting a memory handler for a port by
tag, and this is no longer necessary.

Moved input port handlers to internal code in the memory system.

Added port names to the taito8741 device pending its proper
devicification.

Removed all remaining uses of input_port_n_r() functions, and
purged them from src/emu/machine/generic.
2009-03-02 09:31:05 +00:00
Aaron Giles
ba374dbb0a 00015: Noticeable static in OKI 6295 audio 2009-03-02 01:33:41 +00:00
Aaron Giles
e2757c60d2 Modified the makefile to support experimental optional C++
compilation:
 - new option CPP_COMPILE to trigger this (off by default)
 - split CFLAGS into common, C-only, and C++-only flags
 - when enabled, CPP_COMPILE causes 'pp' to be appended to 
    the target name

NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY 
YET. IT IS JUST AN EXPERIMENT.

Modified lib.mak to always build zlib/expat as C regardless 
of CPP_COMPILE.

Modified windows.mak to fix warnings with MAXOPT=1, and to 
leverage the new CFLAGs definitions.

Modified vconv.c to do appropriate conversions for new C++ 
options.

Updated sources so that libutil, libocore (Windows), and 
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.

Fixed a few more general obvious problems at random 
locations in the source:
 - device->class is now device->devclass
 - TYPES_COMPATIBLE uses typeid() when compiled for C++
 - some functions with reserved names ('xor' in particular)
    were renamed
 - nested enums and structs were pulled out into separate
    definitions (under C++ these would need to be scoped to
    be referenced)
 - TOKEN_VALUE cannot use .field=x initialization in C++ :(
2009-02-28 22:10:06 +00:00
davidhay
30584f0017 various improvements to Heavy Unit [Angelo Salese, Tomasz Slanina, David Haywood]
- Added a VERY preliminary simulation of the protection, just enough to get the game to boot, not make it playable
 - Corrected CPU communication, IRQ/NMI generation etc.
 - Fixed some video emulation issues (added tilemap scroll etc.)
 - Corrected GFX rom loading (at least for the graphics used in attract mode)
2009-02-28 18:20:40 +00:00
Couriersud
906a76dd8a Scramble now is a lot closer to reports and recordings (background sound, sound of bullets). 2009-02-26 21:15:56 +00:00
Couriersud
fb3e6c4b52 * Changed AY8910 to use measurements done one a ZX128
* Following advice on mame testers, remove "channel off" kludge
* Added the post containing measurements to documentation
* Added some debugging stuff
2009-02-26 09:23:49 +00:00
Couriersud
24557839b1 Filter switches (used in games such as scramble) need much higher resolution.
Changed 4066 internal resistance to typical one from datasheet (~270 Ohm)
2009-02-26 09:20:14 +00:00
Aaron Giles
8f6f01f263 Cleanups and version bump. 2009-02-26 09:19:15 +00:00
Aaron Giles
26dd96003f From: Duke [mailto:startaq@gmail.com]
Sent: Wednesday, February 25, 2009 5:20 AM
To: submit@mamedev.org
Subject: CIA update

Hello,

this patch adds support for the /PC output pin to the CIA emulation.
From the datasheet "/PC will go low for one cycle following a read or write of PORT B.". 
This is needed for centronics printer emulation on the MESS side, but I imagine it would 
simplify/correct the emulation in some MAME amiga drivers as well (mquake.c for example).

--Dirk
2009-02-26 09:07:02 +00:00
Aaron Giles
864560d4af From: Atari Ace [mailto:atari_ace@verizon.net]
Sent: Monday, February 16, 2009 7:10 PM
To: submit@mamedev.org
Cc: atariace@hotmail.com
Subject: [patch] Add some missing static qualifiers

Hi mamedev,

This patch mostly adds missing static qualifiers, plus a few related header/name adjustments.  In particular, I tackled m68kmake.c and tmsmake.c which exposed a fair amount of dead code.

~aa
2009-02-26 08:52:27 +00:00
Aaron Giles
d848af288d From: Christophe Jaillet [christophe.jaillet@wanadoo.fr]
Sent: Monday, February 16, 2009 1:03 PM
To: submit@mamedev.org
Subject: Speed up 'src\mame\video\mcatadv.c'

Hi,

here is a patch against 'src\mame\video\mcatadv.c'

This patch moves a call to 'memory_region' outside of a hot loop in the 'draw_sprites' function.
This gives a fiew pourcents speed up in games such as 'nost'.

Hope this helps,
Best regards,
Christophe Jaillet

--

From: Christophe Jaillet [christophe.jaillet@wanadoo.fr]
Sent: Monday, February 16, 2009 1:53 PM
To: submit@mamedev.org
Subject: Another speed up in 'src\mame\video\mcatadv.c'

Hi,

here is a patch against 'src\mame\video\mcatadv.c'

This patch , by re-arranging the code, give a +/- 5% speed up in the emulation.

Before, we :
    - fetch a pixel,
    - make some computation for lower/higher part of it
    - check if we should render it
    - test for priority
    - update destination if necessary

With this patch, we check priority first in order to avoid useless processing and testing on pixel that can't be displayed due to priority reason. So in the best case, it is faster, in the worse case execution time should be more or less the same because :
       if ((drawxpos >= cliprect->min_x) && (drawxpos <= cliprect->max_x) &&
pix)
is likely to be true (IMO). So the same tests are performed, only the order is different.


Hope this helps,
Best regards,
Christophe Jaillet

--

From: Christophe Jaillet [christophe.jaillet@wanadoo.fr]
Sent: Monday, February 16, 2009 1:09 PM
To: submit@mamedev.org
Subject: Clean up of 'src\emu\tilemap.c' (with the patch...)

Hi,

here is a patch against 'src\emu\tilemap.c'

This patch removes a variable called 'original_cliprect' from the top of 'tilemap_get_tile_flags'.
This variable is useless because all cases that need it, already make the same copy in a variable with the same name, shodawing the former one.

Hope this helps,
Best regards,
Christophe Jaillet
2009-02-26 08:48:51 +00:00
Aaron Giles
6ad69291a8 02930: cpu.mak typo and fix 2009-02-26 08:20:18 +00:00
Aaron Giles
2e22a3a35e Fixed CPU tags in recently added drivers. Added interface to the C6280 sound
chip to let it specify the CPU. Fixed remaining duplicate device tags. Made 
validity check for duplicate devices fatal.
2009-02-26 07:54:28 +00:00
Aaron Giles
6edb0ce093 Add validity check warning to flag games with duplicate device names.
Cleaned up most instances, apart from the HuC6280 situation.
2009-02-25 17:05:09 +00:00
Aaron Giles
96b98ece4f Another batch of tagging, this time for speakers/screens:
SPEAKER/"left" -> "lspeaker"
SPEAKER/"right" -> "rspeaker"
SCREEN/"left" -> "lscreen"
SCREEN/"right" -> "rscreen"
SCREEN/"middle" -> "mscreen"
SCREEN/"center" -> "cscreen"

Added "left" and "right" to the validity check.
2009-02-25 16:19:42 +00:00
Aaron Giles
2388986295 Device tag renaming. Moving away from generic names like "main"
to names that capture the device type as well. Added validity
checks for the short-term to prevent the continuance of this
pattern (which I started :)

Changes:
  CPU/"main" -> "maincpu"
  CPU/"audio" -> "audiocpu"
  CPU/"sound" -> "soundcpu"
  SCREEN/main -> "screen" (since it's the only one)

Eventually, devices will be required to have unique tags within
a machine, regardless of type.
2009-02-25 06:28:42 +00:00
smf-
8135fea45e quick hack to delay installing the spu dma handler until the first write to the spu as driver init is now called after the devices are created. 2009-02-22 11:05:22 +00:00
Couriersud
603142d9a4 Added register SXFER (0x05) - Nothing more. This reg determines SCSI transfer speeds.
scud / scuda now fatalerror with writes to reg # 0x70
2009-02-22 00:15:35 +00:00
Nathan Woods
f79b04bf0f Device-ized the SID code 2009-02-20 12:55:53 +00:00
Phil Bennett
9ca1fe60c8 02931 YM-2151: Distorted or otherwise incorrect sound [Phil Bennett] 2009-02-19 15:51:59 +00:00
Phil Bennett
ee34f2467c 02929: All sets using k007232.c Sound Core: Garbled Music 2009-02-18 20:55:35 +00:00
Nathan Woods
f4ca544b4e Added ATTR_NOTNULL to DAC sound calls 2009-02-18 12:57:39 +00:00
Aaron Giles
cef6764910 Cleanups and version bump. 2009-02-17 15:31:20 +00:00
Aaron Giles
77a98627d9 Remaining regressions. 2009-02-17 15:23:49 +00:00
Nathan Woods
73e1917361 Compilation fix 2009-02-17 12:26:24 +00:00
Aaron Giles
c1c2fc33b3 Changed aborts() to fatalerror() so they don't foul up the regression test runs. 2009-02-16 18:24:48 +00:00
Aaron Giles
51b90f0e85 Added the ability for devices to have their own custom inline config management.
This was primarily added to allow for sound routes to be supported in a way that
is compatible with the current driver structure. A device can now define a
DEVICE_CUSTOM_CONFIG callback which is called whenever one of the 
MCONFIG_TOKEN_DEVICE_CONFIG_CUSTOM_* tokens is encountered. A special token
MCONFIG_TOKEN_DEVICE_CONFIG_CUSTOM_FREE is defined to clean up memory allocated
and/or reset the custom configuration, and is called when the device is torn down
to allow for memory cleanup.

Reimplemented the sound routing using this new mechanism.
2009-02-16 18:07:38 +00:00
Curt Coder
6fc10ff553 Cidelsa changes:
- Combined CDP1869 video and sound parts to one device
- Refactored CDP1852 to use devcb
2009-02-16 07:45:00 +00:00
Couriersud
804db66521 Fix 64bit compile of latch8 2009-02-11 23:02:48 +00:00
Aaron Giles
5cb6bf00e9 Ok, this is The Big One.
Please note: regression testing is in progress, but the first round 
of glaring regressions have already been taken care of. That said, 
there is likely to be a host of regressions as a result of this 
change.

Also note: There are still a few rough edges in the interfaces. I
will try to clean them up systematically once the basic system is
working.

All sound chips are now proper devices.

Merged the sound chip interface into the device interface,
removing any differences (such as the whole ALIASing concept).

Modified every sound chip in the following ways:
 * updated to match the device interface
 * reduced read/write handlers down to the minimal number
 * added the use of get_safe_token() for ensuring correctness
 * other minor cleanup

Removed the custom sound device. The additional work to just make
custom sound cases into full devices is minimal, so I just converted
them all over to be actual devices.

Vastly simplified the sound interfaces, removing the ghastly
sndti_* business and moving everyone over to using tags for
sound identity. sndintrf, like cpuintrf, is now just a header
file with no implementation.

Modified each and every driver that references a sound chip:
 * all memory maps explicitly reference the targeted device via
    AM_DEVREAD/AM_DEVWRITE/AM_DEVREADWRITE
 * 16-bit and 32-bit accesses to 8-bit chips no longer use
    trampoline functions but instead use the 8-bit AM_DEVREAD/WRITE
    macros
 * all references to sound chips are now done via tags
 * note that these changes are brute force, not optimal; in many
    cases drivers should grab pointers to devices in MACHINE_START
    and stash them away
2009-02-11 19:48:39 +00:00
Curt Coder
87ba17e145 Merged in changes from earlier commit. 2009-02-09 10:09:19 +00:00