Commit Graph

1150 Commits

Author SHA1 Message Date
Couriersud
26e4f50fc0 Credit Miodrag Milanovic: Implement autoload mode in 8257
* added support for autoload mode
* fixed bug in calculating count
2008-05-27 19:45:27 +00:00
Nicola Salmoria
246885e3c2 fixed cpu_getiloops() which was not returning the correct value.
This fixes
01780: pingpong: Level select arrow's not displayed 
and possibly other timing related bugs.
2008-05-26 08:31:34 +00:00
Aaron Giles
40dea6049e Added new front-end flag to tag privileged instructions.
Minor tweaks/cleanups to the MIPS3 drc.
2008-05-25 22:09:21 +00:00
Aaron Giles
238dc3aada Removed empty input ports from the empty driver, in favor of a NULL entry. 2008-05-25 22:07:15 +00:00
Aaron Giles
62fb5f8f0d 01822: OSD causes crash when try to show the Screen Refresh Rate menu 2008-05-25 22:03:20 +00:00
Aaron Giles
564be8e7a2 Refinement of previous check-in to handle conditional inputs.
Fixed 01836: qcrayon2: Conditional input not visible/working for dip game control joystick
2008-05-25 21:59:19 +00:00
Aaron Giles
67db0742f0 Added TOKEN_SKIP_* macros to tokenize.h.
Changed error reporting during input port detokenization to fill a buffer
rather than fatalerror-ing immediately. Should now properly skip over
any invalid tokens.

Enhanced error detection during input port detokenization to catch 
duplicate bits. There are a lot of these!

Updated initialization code to print errors and fatal only if the input
ports were unable to be constructed at all.
2008-05-25 21:24:19 +00:00
Nathan Woods
200cda66f1 MESS-specific: Added hook for default keyboard key names 2008-05-25 19:39:13 +00:00
Nathan Woods
2bd5a419b1 Changed text used to specify a menu separator, and now using a #define 2008-05-25 18:31:29 +00:00
Nathan Woods
0a624c8f7a Updates from MESS in response to 0.125u2 2008-05-25 12:58:14 +00:00
Aaron Giles
7cb1326459 Renamed EEPROM_* to eeprom_*
Typedef'ed a real eeprom_interface structure.

Added a PORT_CUSTOM for the eeprom bit reading. Updated several
drivers to use that by specifying it in their input ports instead
of having a custom read handler that inserted the bit forcefully.

Added a PORT_CUSTOM for the ticket dispenser callback as well.
Updated the dcheese driver to use it.

Many more drivers can be updated to use these new PORT_CUSTOMs
in the future, eliminating hacky input port read handlers.
2008-05-25 05:38:24 +00:00
Couriersud
558aab9d08 Fix DEBUG=1 compile 2008-05-24 20:45:29 +00:00
Aaron Giles
a643604cbd 01825: Toggling Tab menu works as F2 key in games with their service
mode DIPs on the top of the menu

Fixed behavior of toggle switches so that they don't lose their value
when the UI is up. They also can now be used for multibit DIP switch
settings in which case they toggle through all the options.

New functions input_field_select_next_setting() and 
input_field_select_previous_setting() which can be used to iterate
properly through DIP switches. Fixed the behavior for cases where
conditional ports are in play (you could get stuck). Changed uimenu.c
to call these instead of implementing its own.

Changed uimenu.c so that hitting ENTER on a DIP switch resets it to
its default value. This is analagous to how the OSD sliders behave.
2008-05-24 17:01:49 +00:00
Wilbert Pol
4e1afc32f5 Fixed memory access in the 80286 cpu core which made i286.h obsolete. Changed CPUINFO_INT_MAX_INSTRUCTION_BYTES to prevent crashes during disassembly. 2008-05-24 15:14:12 +00:00
Nicola Salmoria
939f6d8b98 fix PORT_IMPULSE handling. The old code would force inputs to be asserted for at least the number of frames indicated, but keeping the button pressed would keep the input asserted. Now the input is asserted far exactly the number of frames indicated. 2008-05-24 11:49:31 +00:00
Couriersud
55c18d1204 Mantis 01819: "Coinlock disabled coin x" message displayed upon startup
* Only check for coin lockout if actually pressed
2008-05-23 20:30:58 +00:00
Curt Coder
879dc21122 Fixed COP420 instructions XAS and INIL. Fixed cycle count for extended opcodes. Added CKO general purpose input. 2008-05-23 15:15:41 +00:00
Nathan Woods
4f6b8e9d91 Passing more running_machine* parameters around 2008-05-23 11:22:34 +00:00
Roberto Fresca
cc5dc262de Improvements to American Poker II driver.
- Reworked the color routines switching to resnet system.
 - Added a resistor network diagram.
 - Switch to pre-defined crystal value.
 - Changed the WATCHDOG_TIME_INIT to be based on miliseconds instead of hertz.
 - Other minor cleanup/fixes.
 - Updated technical notes.
2008-05-23 10:46:26 +00:00
Curt Coder
9962c0f826 Fixed COP420 instructions JSRP, LBI, LQID, and SKT. Draco now has sound. 2008-05-22 15:16:06 +00:00
Aaron Giles
d5ff8c002a Cleanups and version bump. 2008-05-22 05:19:16 +00:00
Aaron Giles
f4523617ed Fix 01815: All Sets: Saved machine states do not properly adjust to changes in -samplerate 2008-05-22 05:15:33 +00:00
Aaron Giles
11b1331d3f Fixed incorrectly sized array that led to stack corruption during validity checks.
Fixes CPS1 no-start issue.
2008-05-22 05:04:14 +00:00
Aaron Giles
defcc8895b From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Missed Machine->machine changes

Hi mamedev,

A short incremental to my last deprecat.h patches.  This one is the
result of a slightly improved fixup script, which finds more cases
where Machine can be replaced with machine.  Six more files lose
deprecat.h.

~aa
2008-05-22 03:24:45 +00:00
Aaron Giles
a300da2178 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] More Machine->machine changes, add machine to irq
callbacks

Hi mamedev,

Here are two more patches to eliminate Machine globals.  The first
patch was autogenerated by the attached fixup script.  That script has
been updated to catch additional cases which it previously missed
(when Machine is the last parameter to a function or Machine is used
in an assignment).  This makes ~50 more files deprecat.h free.

A sizable chunk (~20%) of the remaining uses of the Machine global in
the drivers are due to irq callbacks for sound and machine updates.
Typically such callbacks need to call cpunum_set_input_line, which
requires a machine parameter, so if the callbacks don't pass the
machine parameter, these routines have no choice but to reference the
global variable.

The second patch attempts to address most cases of this by adding the
machine parameter to the callback interfaces.  This allows us to
remove #include "deprecat.h" from ~150 files, at the cost of having to
fix up hundreds of callbacks.

In total, these patches reduced the number of files with deprecat.h
from 783 to 575.

~aa
2008-05-22 03:23:28 +00:00
Aaron Giles
98a8e73947 From: Antoine Mine [mailto:Antoine.Mine@ens.fr]
Subject: saturn CPU patch

Dear MAMEDev,

The attached patch corrects several bugs in the emulation of the saturn 
CPU. These corrections are needed to make new HP48 drivers (to be 
submitted to MESS imminently) work.
AFAIK, MESS is the only place where this CPU is used, so, the patch
should 
not cause any regression in MAME.
The patch is against 0125u1.

Best regards,
-
Antoine Mine
2008-05-22 03:09:01 +00:00
Aaron Giles
bb9fec0f86 Moving old DRC out of the way. 2008-05-22 03:06:49 +00:00
Aaron Giles
1561edf049 UML changes:
* Added new opcode LZCNT which returns the number of leading zeros in
   a parameter.
 * Added new opcode XTRACT which is a combined rotate/mask (basically
   rlwinm from PowerPC)
 * Added new opcode INSERT which is a combined rotate/mask/blend
   (basically rlwimi from PowerPC). Best. Opcode. Ever.
 * Updated all back-ends to support these new opcodes.
 * Fixed several bugs relating to shifts/rotates and optimizing out
   cases incorrectly.

MIPS3 DRC changes:
 * Updated to use INSERT and XTRACT where appropriate
 * Cleaned up register usage to enable an additional direct mapping;
   this means Linux gets 1 now and Windows gets 3
2008-05-22 03:05:13 +00:00
Aaron Giles
229e42f524 Turn on joysticks by default. 2008-05-21 16:59:26 +00:00
Aaron Giles
caa2a53c7f Added support in the MIPS recompiler to map a few common registers to
machine registers if the machine supports it. Currently only x64 on
Windows has enough free registers to do so, though PowerPC will almost
certainly be able to take advantage of this. Gives a minor speedup.
2008-05-21 10:59:05 +00:00
Aaron Giles
96c8dfd0ab Fix compiler error. 2008-05-21 08:59:20 +00:00
Aaron Giles
21920d4e44 Minor cleanup. 2008-05-21 07:54:40 +00:00
Jonathan Gevaryahu
009fcb7b7c Added proper interpolation sub-cycles ('PC' cycles and A/B subcycles of each) to tms5110 and updated comments. Also added code to update lfsr 20 times instead of once per sample, so it matches the real chip. Updated tms5110 to use shifts instead of divides during interpolation. 2008-05-20 04:38:56 +00:00
Jonathan Gevaryahu
ae6bf98511 Added proper interpolation sub-cycles ('PC' cycles and A/B subcycles of each) and updated comments 2008-05-20 01:53:25 +00:00
Aaron Giles
3c6278aef8 Fix crasher in drcfe.c. 2008-05-20 00:59:20 +00:00
Aaron Giles
fdf128e2d7 Implemented IDT instructions. All invalid instruction asserts are now runtime-only. 2008-05-20 00:22:50 +00:00
Wilbert Pol
50ec9b1076 Fixed 80286 databus widths. 2008-05-19 19:43:17 +00:00
R. Belmont
071164f3a7 64-bit GCC compile fix. 2008-05-19 17:10:32 +00:00
Aaron Giles
d411c2c74c Numerous MIPS3 DRC updates:
* Fixed front-end so that virtual no-op instructions are still targeted
as branch targets.

* Fixed front-end to mark the beginning of each sequence as needing TLB
validation, since any sequence can be jumped to from anywhere.

* Redid the MIPS3 TLB implementation. Fixed the exception vector and
type handling. Changed the bitfields to directly map from the MIPS TLB
format. Added distinction between TLB fill and TLB valid/modified
exceptions.

* Added separate modes for user, supervisor, and kernel modes. Each mode
does proper verification of addresses now and generates address errors
for invalid accesses.

* Fixed several bugs in the TLB implementation; not everything works
yet but it's a lot closer.

* Made COP0 access checking mandatory in non-kernel modes.

* Fixed several crashes when recompiling virtual no-ops.

* Fixed TLB bug where entries for virtual address 0 were present by 
default.

* Fixed bug in the map variable implementation that would sometimes
result in incorrectly recovered values.
2008-05-19 16:58:42 +00:00
Curt Coder
d41a31dd12 Fixed CDP1869 character memory access, and Cidelsa sprite flashing. 2008-05-19 15:38:19 +00:00
R. Belmont
8d210c82b5 Fixed compiler warning for Apple GCC. 2008-05-19 02:03:59 +00:00
Aaron Giles
969a705508 Added back-end validation mechanism, and a handful of tests as examples.
This will be expanded in the future.

Added two new opcodes: SAVE and RESTORE to save and restore the entire
virtual machine state for examination/setup.

Added new back-end function get_info() which returns information from
the back-end about how many actual registers will be mapped.

Fixed a bug that mapped the high a low parts of registers to the same
address. This should help the C back-end run better on big-endian
architectures.
2008-05-19 00:58:16 +00:00
Aaron Giles
1c33c2f29b Fixed crash when reading ports by tag, when some ports don't have tags. 2008-05-18 14:21:28 +00:00
Nathan Woods
d2123b2803 Passing running_machine* parameter 2008-05-17 22:42:22 +00:00
Aaron Giles
28855e088a Fixed a couple of obvious errors in the TLB implementation. 2008-05-17 19:48:17 +00:00
Aaron Giles
0c1aaf1526 Added some instrumentation for the MMU. To enable it, turn on PRINTF_MMU at the top
of the file. Currently it is left on because none of the MAME games rely on it.
2008-05-17 17:11:12 +00:00
Aaron Giles
5c0e902901 Cleaned up operand sizing in the C core. Should be closer to working
on big-endian systems.
2008-05-17 06:47:25 +00:00
Aaron Giles
9abf2c3efa Added support for ROUNDSS and ROUNDSD on Penryn architectures. 2008-05-17 02:11:48 +00:00
Aaron Giles
b2ad4af505 As if Intel didn't already have enough opcodes. Added defines for new
Penryn opcodes.
2008-05-16 14:36:54 +00:00
Aaron Giles
271ac2a7a2 Added a quick & dirty attempt at implementing tlb_mismatch. It's likely wrong,
but it's better than nothing. Also added an assertion if you jump to unmapped
code and added handling for compile-time page faults.
2008-05-16 05:21:25 +00:00
Aaron Giles
be680b1346 Oops forgot to save EBX. 2008-05-16 05:20:41 +00:00
Aaron Giles
0d249058cf Fix bug 1804. Now checking for SSE3 before using truncation functions.
Also fixed incorrect floating point assertion in x86 back-end.
2008-05-16 05:08:32 +00:00
Couriersud
eb59ae219e Fix 64bit build on linux
* Changed (void *) <some int32> to (void *)(FPTR)<some int32>
2008-05-15 21:29:09 +00:00
Aaron Giles
096331c856 Restructured input port internals and cleaned up inptport.c:
* Input ports are now maintained hierarchically. At the top
level are input ports, which contain a list of fields. Each
field represents one or more bits of the port. Certain fields
such as DIP switches and configuration switches contain a
list of settings, which can be selected. DIP switch fields
can also contain a list of DIP switch locations.

* Normalized behavior of port overrides (via PORT_INCLUDE or
by defining multiple overlapping bits). All fields within a
port are kept in strict increasing bit order, so altered DIP
switches are now kept in the appropriate order. This addresses
MAMETesters bug 01671.

* Live port state is now fully separate from configured 
state. This is manifested in a similar way to devices, where
a const list of ports can be managed either offline or live.
Each port has a pointer to an opaque set of live state which
is NULL when offline or valid when live. Each port also has
a running_machine * which is also NULL when offline.

* Because of this new arrangement, the conversion from tokens
to a list of ports now requires reasonably complex memory
allocation, so these port lists must be explicitly allocated
and freed (they are not mantained by automatic resource
allocation).

* Custom and changed callbacks now take a pointer to a field
config instead of a running machine. This provides more
information about what field triggered the change notification.
The machine can be found by referenced field->port->machine.

* The inptport.c module has been cleaned up and many 
ambiguities resolved. Most of this is internal, though it did
result in osd_customize_inputport_list() being changed to
osd_customize_input_type_list(). The parameter to this function
is now a linked list instead of an array, and the structures
referenced have been reorganized somewhat.

* Updated config.c to pass machine parameters to its callbacks.

* Updated validity checks, XML output, and UI system to handle
the new structures.

* Moved large table of default input settings to a separate
include file inpttype.h.

* Removed gross hacks in trackfld and hyperspt NVRAM. These
may be broken as a result.
2008-05-15 16:25:03 +00:00
Aaron Giles
21a686cf7d Cleanups and version bump. 2008-05-15 08:56:29 +00:00
Aaron Giles
934fbd9fc2 Removed unused functions. 2008-05-15 08:53:58 +00:00
Aaron Giles
44fbeff9bf From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Remove opbase globals from the public interface

Hi mamedev,

There are several variables associated with opbase handling which are
global and documented in memory.h and thus their use is not well
controlled.  This patch attempts to remedy this.  Because they are
used in various inline memory functions, they can't yet be made local
to memory.c, but by rescoping their declaration they can be hidden,
much like we hide totalcpu.

Most of the uses are in OPBASE_HANDLER() macros, so by encapsulating
the opbase state into a struct and adding that to the handler
interface those can be converted to local variable manipulation. There
is one use in missile.c in a MACHINE_START that I simply removed, it
shouldn't be needed.

One side effect of this patch is that the various unsafe memory macros
can't be used directly, they will be a compiler error now.  That is
probably for the best.

~aa
2008-05-15 08:22:17 +00:00
Laurent Desnogues
a97ec0a587 - revert commit 1566 2008-05-13 10:22:16 +00:00
Laurent Desnogues
45e055c624 - don't use $(LIBS) for linking where it's not needed (hope I did not break
Windows or cross builds)
2008-05-13 08:34:03 +00:00
Jonathan Gevaryahu
16942d210b Update TMS5200/5220 documentation and comments
Fix the chirp table implementation in both the 51xx and 52xx chips.
2008-05-13 04:56:47 +00:00
Aaron Giles
86dd599aa8 Added uncompressed AVI recording. Extended aviio to be able
to write RGB bitmaps. Unfortunately, the only option is fully
uncompressed, which means the resulting AVIs are *HUGE* and
may not play correctly in realtime due to high data rate. The
intention is that these uncompressed AVIs are post-processed
by other utilities to compress the video and produce a
realtime playable result.

Added new command-line option -aviwrite which works just like
-mngwrite, except it produces AVIs and streams sound to them.
Updated documentation accordingly.

Shift+F12 still produces MNGs for now, though this might change
in the future.

Modified fileio.c to retain the full pathname to the file so
that it can be queried while the file is open.
2008-05-13 03:02:11 +00:00
Jonathan Gevaryahu
a01a97367c s14001a.c - updated comments and version 2008-05-13 01:27:43 +00:00
R. Belmont
3fbca2dbba Fixed unused function and uninitialized variable errors. 2008-05-12 17:00:26 +00:00
Curt Coder
0376d5359f [CDP1852] Minor fixes. 2008-05-12 16:17:54 +00:00
Curt Coder
2528b956f5 Added CDP1852 I/O buffer chip, and used it in Altair/Draco. 2008-05-12 16:10:28 +00:00
Laurent Desnogues
5d02da3db2 - define isnan as _isnan for MSC_VER 2008-05-12 14:51:45 +00:00
Aaron Giles
7bb9e27f80 Fix incorrect assertion. 2008-05-12 14:51:45 +00:00
Manuel Abadia
90f263f8a3 DS5002FP core 2008-05-12 09:03:33 +00:00
Aaron Giles
e23b3c3776 Potential fix for Linux crashes. 2008-05-12 05:35:13 +00:00
R. Belmont
2e363855ba Fixed a bunch of compiler errors w/64-bit GCC. Result does not run. 2008-05-12 02:29:07 +00:00
Aaron Giles
b735b4be6c New universal dynamic recompiler system. The central module
is drcuml.c, which defines a universal machine language
syntax that can be generated by a frontend recompiler and
then retargeted via a generic backend interface to any of
a number of different architectures. A disassembler for the
UML is also included to allow examination of the generated
UML code.

Currently supported backend architectures include 32-bit x86,
64-bit x86, and a platform-neutral interpreted C backend that
can be used as a fallback for platforms without native 
support. The C backend also performs additional validation
to ensure assumptions are met.

Along with the new architecture is a new MIPS III/IV 
recompiler frontend. This frontend has been rewritten from 
the old x64-specific recompiler to generate UML opcodes
instead. This means that the single recompiler can be used
to target multiple backend architectures and should in
theory produce identical results across all of them.

The old 32-bit and 64-bit MIPS recompilers are now officially
retired. The new system provides similar performance (within
5% generally) to the old system and has similar compatibility.
The only currently known issues are some problems with the
two Gauntlet 3D games.
2008-05-11 22:15:13 +00:00
Curt Coder
1a32caa7e0 [CDP1802] Appease compiler. 2008-05-10 09:54:48 +00:00
Curt Coder
0999af40c5 [CDP1802] Added memory address parameter to DMA callbacks, and added a macro for the CPU interface. 2008-05-09 18:49:52 +00:00
Roberto Fresca
351f215b12 Added XTAL_30MHz to the list. This one is used by Impera Magic Card. 2008-05-07 19:32:54 +00:00
Roberto Zandona
f14541031b another fix typo 2008-05-07 07:18:37 +00:00
Roberto Zandona
1dfeb3ba53 fyx typo 2008-05-07 07:10:50 +00:00
Roberto Zandona
4c138a09fc add feature to the cia6526: in READ operation the value can be forced by a extern electric circuit; this feature is necessary to the mess side 2008-05-07 07:01:48 +00:00
Aaron Giles
692a5e4674 Spacing and version bump. 2008-05-05 07:10:47 +00:00
Aaron Giles
0cee075e0d Added xchg opcodes. 2008-05-05 06:11:13 +00:00
Nathan Woods
c75d63a569 Removed bogus assertion - DEVICE_TYPE_WILDCARD is NULL 2008-05-04 23:09:07 +00:00
Nathan Woods
fae89f0d4c MESS-specific change; added running_machine parameter 2008-05-04 14:23:41 +00:00
Nathan Woods
d2414bddfe Changed MESS-specific key for pasting (PrtScn was _not_ a good choice on Windows) 2008-05-04 01:01:52 +00:00
R. Belmont
1119d3f129 Fixed an envelope corner case in the SCSP and AICA (kingshriek) 2008-05-03 23:59:54 +00:00
Nathan Woods
dfe585bf85 Added a MESS-specific "paste" command; used to paste clipboard data into MESS's
natural keyboard
2008-05-03 17:56:41 +00:00
Couriersud
b7880b33fa ay8910.c:
* Fixes mantis bugs 01767, 01769
* Corrected some comments
2008-05-02 10:58:11 +00:00
Aaron Giles
67e76e92f5 Cleanups/version bump. 2008-05-01 14:32:31 +00:00
Aaron Giles
37c56cf592 01752: Warnings making standard .124u4 in GCC 4.3.0 (mingw)
Well, two of them were valid.
2008-05-01 14:12:20 +00:00
Aaron Giles
23890e5da7 This is a better fix for MAMETesters 00149: No error report for invalid BIOS setting 2008-05-01 14:02:12 +00:00
Aaron Giles
89c9e00953 From: Micko [mailto:mmicko@gmail.com]
Subject: PIC 8259 changes

Hello Aaron,
 
As I have announced before, here are some changes on pic8259.
 
for changelog:
 
[PIC8259] Adding support for 8080/85 mode interrupts
 
Please just check it against x86 platform, not sure if is_x86 in ICW4 is obligatory in case of using it on x86 platform.
 
Regards,
Miodrag
2008-05-01 13:54:19 +00:00
Aaron Giles
a910dafd37 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Small deprecat.h related cleanup

Hi mamedev,

While doing some work on eliminating some uses of deprecat.h, I came
across a few files that didn't have it that used deprecated features.
A little investigation revealed they were getting it through
debugger.h, typically by referencing m68000.h.  Since deprecat.h is
intended to document the files that need updating (otherwise it would
just be included in a common header), I reworked debugger.h to not
import it when the debugger is not enabled, and fixed the files that
broke as a result.

~aa
2008-05-01 13:52:28 +00:00
Aaron Giles
c967dcb102 From: Duke [mailto:startaq@gmail.com]
Subject: MSM6242 device

Hello,

the attached patch changes the MSM6242 RTC into a proper device.

--Dirk
2008-05-01 13:48:49 +00:00
Aaron Giles
04f54299af Couple of minor tweaks to sync with offline WIP work. 2008-05-01 08:53:23 +00:00
davidhay
f398a24db2 de-hack metro tilemaps... (lightly tested..) 2008-04-28 07:52:21 +00:00
Couriersud
fc1cb8d473 ay8910: Cosmetic
* bring more in line with coding standards
* add more comments
2008-04-27 00:26:41 +00:00
Couriersud
899c47f7b8 Fix AY-3-8910/YM2149 and derivatives envelope handling. 2008-04-26 18:57:15 +00:00
Nathan Woods
8d1c77366c MESS specific fix 2008-04-26 18:35:40 +00:00
Couriersud
0e77434bec Added DISCRETE_KEY_SALLEN_FILTER to discrete sound system 2008-04-25 08:42:13 +00:00
Aaron Giles
08c75151c7 Cleanups for 0.124u4. 2008-04-24 06:43:16 +00:00
Aaron Giles
6a955fc076 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Remove more Machine globals, #include "deprecat.h"

Hi mamedev,

The attached patch goes through and converts a number of Machine
globals to machine locals, and then removes #include "deprecat.h" if
appropriate.  The script that generated it is included, since the
patch itself is rather large and would have been time consuming to
produce otherwise.

The script doesn't convert cases of Machine that aren't in common
macros.  I'll try to tackle those later if someone doesn't beat me to
it.

~aa
2008-04-24 06:15:00 +00:00
Aaron Giles
737ff53930 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Eliminate assignments in conditionals

Hi mamedev,

Assignments in conditionals are never really needed in C and are
occasionally just plain bugs (== gets typed as =).  As such, it would
be good to remove these from MAME so that compilers that warn on this
construct can flag the likely bugs (MSVC does this for example).  The
attached patch does just that.  In addition, it refactors some
repeated code which had this in taito_f3.c into a couple macros. Using
inline functions would unfortunately have required more significant
changes, perhaps I'll tackle that another day.

~aa
2008-04-24 05:59:39 +00:00
Aaron Giles
38ee64ae77 From: Lei Wu [mailto:lanewu@hotmail.com]
Subject: fixed official mame bug #426 [Emuman]
2008-04-24 05:56:52 +00:00
Aaron Giles
14c852c8e9 Updated to use ACCESSING macros like memconv.h. 2008-04-24 05:53:47 +00:00
Aaron Giles
c205e10516 Fix 01742: punchout, armwrest + many vsnes.c and playch10.c games: Refreshspeed causes fatal exception in punchout. 2008-04-24 05:32:57 +00:00
Couriersud
b4fd76f158 ay8910.c:
* change DC offset for AY-3-8910 to 0.2V
* tones are now distinguishable again
galaxian.c:
* adjust "konami" sound volume
gyruss.c:
* adjust sound volume
2008-04-23 23:31:14 +00:00
Nicola Salmoria
e14a331553 increased Gyruss volume, changed UI to allow volumes higher than 2.0. 2008-04-23 07:47:23 +00:00
Couriersud
85a5a3d827 AY-3-8910 rewrite:
* adds a model to calculate mixing of channels with different resistance loads.
* based on above, each channel may be assigned a different load in individual case
  i.e. channels not tied together
* rewrote ay8910.c to make emulation simpler
* changed the config structure to include a flag field and output resistor loads.
* Updated all drivers affected.
* Added some "Todos" related to stuff I discovered when reading datasheets.
* Fixed a bug in disc_flt.c (konami filters)

galaxian.c:
* Fixed discrete sound and konami filter addressing
* Changed addressing of AY-3-8910 to be in line with schematics

gyruss.c:
* Added discrete sound for filtering ("konami"-style) and mixing.
2008-04-22 21:58:36 +00:00
Aaron Giles
cb8514a175 From: Miodrag Milanovic
Hello Aaron,
 
I have found few more things not ok in T11, this time I have fixed it myself.
 
1. HALT - should call interrupt vector
2. ILLEGAL - had PC=0 at the end which makes code not run fine
3. MARK - now it is implemented

Can you please check if your drivers are working fine with these cahanges.
 
After adjustments I have some things working finaly.
 
Please inform me,
 
Miodrag Milanovic
2008-04-21 03:41:51 +00:00
Aaron Giles
af71decdb7 D'oh, another accidental checkin. :) 2008-04-21 00:13:37 +00:00
Aaron Giles
ae4002a56d From: Corrado Tomaselli [mailto:corrado.to@tiscali.it]
Subject: ghost and goblins (italian bootleg, harder)

this is an italian bootleg with a really hard gameplay. it's quite 
impossible to say the truth ;)
pics of the board:
http://www.citylan.it/gngitaly/main%20PCB%20component%20side.jpg
http://www.citylan.it/gngitaly/roms%20PCB%20component%20side.jpg

New clones added:
Ghosts'n Goblins (Italian bootleg, harder)
2008-04-21 00:11:19 +00:00
Aaron Giles
5edbda88da From: Atari Ace
Subject: [patch] Fix 01711: connect4, mpu4met0, mpu4tst2, mpu4utst, bctvidbs: Using -CHEAT trigger causes a crash
Hi mamedev,

This patch fixes bug 01711.  Given the location of the original assert
it is clear the original code wasn't quite right.

~aa
2008-04-21 00:09:58 +00:00
Aaron Giles
9fb86da645 From: Atari Ace
Subject: [patch] Fix 00149: No error report for invalid BIOS setting.
Hi mamedev,

This small patch makes specifying an invalid bios a fatalerror and
removes the need to expose system_bios to the drivers by reworking the
code in playch10.c to determine its bios more directly (in other
words, it removes an ugly hack).  This should resolve bug 00149,
although I did not implement the popmessage as suggested.

~aa
2008-04-21 00:05:54 +00:00
Aaron Giles
e26f80fde0 (from Mariusz Wojcieszek)
Attached is diff which makes Touchmaster games playable.

General changes:
- Added preliminary 68681 DUART (machine\68681.c)
- Moved Microtouch touch screen controller emulation to separate module (machine\microtch.c)

New games added or promoted from NOT_WORKING status
---------------------------------------------------
Touchmaster [Mariusz Wojcieszek]
Touchmaster 3000 [Mariusz Wojcieszek]
Touchmaster 4000 [Mariusz Wojcieszek]
Touchmaster 5000 [Mariusz Wojcieszek]
Touchmaster 7000 [Mariusz Wojcieszek]
2008-04-21 00:00:55 +00:00
Aaron Giles
e91eb4007c Flipped the damn mem_mask. It is no longer inverted when passed to
read/write handlers. Updated all drivers accordingly. Hope I didn't
miss anything important!

Blame OG and smf for goading me into it. :)
2008-04-20 02:38:35 +00:00
Aaron Giles
9dd3f691ba Expanded the set of memory accessor functions. In addition to
direct byte, word, dword, and qword accessors for all bus sizes,
there are now masked word, dword, and qword accessors for all
bus sizes.

IMPORTANT: masks that are passed to the _masked_* functions are
NOT inverted. Although inverted masks are still passed to callback
functions, when you request a masked read or write the masks should
represent the bits you want.

Updated the various MIPS cores that use these functions to invert
their masks.
2008-04-19 19:09:24 +00:00
Wilbert Pol
446e65fb98 Changed the inline validity checks to work around GCC bug #35885. 2008-04-19 18:17:02 +00:00
Wilbert Pol
0d4aca282f Converted the ppi8255 implementation to a device. 2008-04-19 18:11:47 +00:00
Roberto Fresca
4b86e644f9 65C02/65CE02 CPUs and variants:
Fixed the 6502 family of disassemblers to show the correct bit to operate for BBR, BBS, RMB and SMB instructions.
2008-04-18 06:06:04 +00:00
Curt Coder
e8abef328c [CDP1869] Added a macro for the interface, and made write handlers optional. 2008-04-17 14:29:25 +00:00
Nathan Woods
c7c9bc1341 Fixed compilation error when using memory_install_read_handler() and
memory_install_write_handler()
2008-04-17 11:36:33 +00:00
Aaron Giles
b35c15fef5 Cleanups and version bump to 0.124u3. 2008-04-17 05:26:05 +00:00
Aaron Giles
2028ecc2f7 Removed ancient 720 kludge.
Added support in the T-11 core for an external vector via irq_callback.
Apparently the hardware actually did support this and it is necessary
for emulating the BK 0010/11 computer in MESS.
2008-04-17 02:58:24 +00:00
Aaron Giles
12836eea2c Created new macro: AM_RAM_WRITE(handler) which specifies a memory
range to be RAM-like for reads but calls the given handler for writes.

Replaced AM_READWRITE(SMH_RAM, handler) with AM_RAM_WRITE(handler).
Also replaced AM_RAM AM_WRITE(handler) with AM_RAM_WRITE(handler).
2008-04-16 14:38:12 +00:00
Aaron Giles
a7c928efaa Memory map merges. 2008-04-16 04:54:57 +00:00
Nathan Woods
212d7e36d4 Changed MESS's hooks used by natural keyboard support, eliminating MESS's need
for input_port_set_digital_value()
2008-04-16 01:43:37 +00:00
Aaron Giles
ffc326f8be Converted the IDE controller to a device. Updated all drivers
accordingly.

Added new functions for dynamically installing device memory 
read/write handlers.

Updated install_memory_XXX_handler() functions to take a machine
parameter. Updated all drivers accordingly.

Merged installation of read and write handlers where appropriate.

Simplified memory.c code for dynamic installation so that a single
function handles all the work; a NULL read or write handler 
indicates not to install anything for reads or writes.
2008-04-15 16:49:50 +00:00
Aaron Giles
71ca9ecec2 Switched subhandlers to using masks instead of shifts. Reduced the number
of stub handlers required as a result. Updated all drivers accordingly.
2008-04-15 06:39:34 +00:00
Curt Coder
e7cfe56749 [CDP1802] Added machine parameter and macros for the callback functions. This seems to have fixed the player sprite flashing in Destroyer/Altair/Draco. 2008-04-14 18:06:56 +00:00
Aaron Giles
7b97535eae Added support for using smaller-sized memory handlers directly in
memory maps. To do so, you either need to specify a shift amount 
(mapping to a particular subset of the bus) or SHIFT_PACKED, which
maps a single larger sized read/write down to multiple reads or
writes at the smaller size.

Removed word-sized handlers from 6821pia.c. Updated drivers that
needed them to use these new interfaces instead.

Updated gaelco3d.c and itech8.c to remove the need for memconv.h
by using this new feature.

Re-removed input_port_set_digital_value().
2008-04-14 16:47:02 +00:00
Nathan Woods
f9766f2052 Changes from MESS:
src/emu/cpu/m68000/m68kmame.c:
src/emu/cpu/minx/minx.c:
	- Fixed compilation errors on CPU cores not enabled in MAME
	
src/emu/inptport.c:
src/emu/inptport.h:
	- Readded input_port_set_digital_value() (which is needed for natural
          keyboard inpout in MESS)
	- Added a running_machine parameter to inputx_update()
2008-04-14 11:12:42 +00:00
Andrew Gardner
76e7b85e1f Finished memory map merge for W drivers.
Some whitespace touch-ups.
2008-04-13 18:02:50 +00:00
smf-
59b480f561 fixed calculation of bit 31 of GTE FLAG register, when writing to it directly.
added lm mode to OP and fixed the calculation.
added lm mode to SQR.
2008-04-13 16:02:16 +00:00
smf-
02b2ba8a6d fixed cross-hair update when the game is not polling the coordinates 2008-04-13 15:42:20 +00:00
Wilbert Pol
4725e2fa8e Fixed DA A instruction when A is > 0xF9. 2008-04-13 15:09:06 +00:00
Aaron Giles
842ed3efb0 Changed device read/write functions to take a const device_config *.
Reverted recent hacks to get around this and removed unnecessary casts.
2008-04-13 15:01:23 +00:00
Roberto Zandona
dfe1952883 fix an opcode in quizf1
fix dasm for bp+ix+offset8 and bp+it+offset8
2008-04-13 09:22:07 +00:00
smf-
6d87810b1f added sf/lm support to INTPL, improved flag calculation & calculates correct rgb
tidied up DPCS a bit.
2008-04-12 21:51:38 +00:00
Wilbert Pol
7fb79442c1 Changed the pic8259 implementation into a device. 2008-04-12 19:15:27 +00:00
smf-
d713e9cce6 tidied up DPCS, improved flag calculation and added support for lm/sf fields. 2008-04-12 18:08:27 +00:00
smf-
303caf3f8b removed casts and removed unnecessary decoding from NCLIP.
added signed values to PAIR & PAIR64.
renamed PAIR64.lw to PAIR64.q
2008-04-12 10:47:39 +00:00
R. Belmont
7544575aea Fix compile error on systems where time.h isn't automagically included. 2008-04-12 06:14:31 +00:00
Aaron Giles
439dbe872a Cleanups and version bump to 0.124u2. 2008-04-12 05:16:26 +00:00
Nathan Woods
9402f05a08 MESS specific fix 2008-04-12 03:41:30 +00:00
smf-
5f75c62fb9 fixed avsz3 & avsz4 flag & otz calculation. 2008-04-11 23:10:07 +00:00
smf-
5ed8b1252b fixed flag calculation in F macro. 2008-04-11 21:42:05 +00:00
smf-
22df06f724 fixed sign extension when inverting mem_mask. 2008-04-11 18:01:14 +00:00
Aaron Giles
58842fd57b Various tweaks/fixes from MAMEPlus:
* save state support for FD1094 chips
 * improved graphics in athena
 * improved sound balance in armedf
 * derived refresh rate for toaplan1 games
 * improved sound balance in tmnt games
 * derived clocks for suprridr
 * tweaked xmen visible area
 * derived clocks and refresh rate in twin16 driver
2008-04-11 14:25:38 +00:00
Aaron Giles
250e9056d5 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: change for cpunum_set_irq_callback() callback function

This patch adds the running_machine* parameter to the function passed 
into cpunum_set_irq_callback() and adds the IRQ_CALLBACK macro for 
the callback function.
2008-04-11 14:00:47 +00:00
Aaron Giles
ab2154804c From: Tomas Garcia-Meras Capote
Subject: Update for "Euro League (bootleg)"
Hello,
 some tiny updates for the driver wc90b.c :
 
-Added dumps for all GALs on the PCB
-Removed the second YM2203, it isn't present on the bootleg boards
-Changed the clocks according to the oscilators found on the board,
 the previous speeds were measured on a goal92 PCB, not using a real "Euro League" PCB.
-Added a new osc to xtal.h
 
If you need any info about this update, please mail me.
 
Regards: ClawGrip (Tomas Garcia-Meras)

--

Also merged memory maps [Aaron Giles]
2008-04-11 13:58:17 +00:00
Aaron Giles
dbb98c5473 Reduced the number of save state callback types from 3 to 1. The
only remaining form is the one that takes a pointer parameter.

Added macros for STATE_PRESAVE and STATE_POSTLOAD to define common
functions. Added machine parameter to these functions.

Updated all drivers and CPU/sound cores  to use the new macros 
and consolidate on the single function type. As a result pushed
the machine parameter through a few initialization stacks.

Removed unnecessary postload callbacks which only marked all tiles
dirty, since this is done automatically by the tilemap engine.
2008-04-11 05:41:46 +00:00
Roberto Zandona
e1a8ab0d1b fix dasm for rep instruction 2008-04-10 21:50:31 +00:00
Aaron Giles
4867aa38b9 Take two of the previous changes. I think this is a little simpler,
using masks instead of the generic byte/word/dword read functions.
2008-04-09 14:48:22 +00:00
Aaron Giles
b4e4b1d3f0 Oops, remove accidentally checked-in makefile changes. 2008-04-09 13:23:25 +00:00
Aaron Giles
eeee1cb437 Rewrote core memory handlers as inline functions. These should be easier to
trace through in a debug build, yet should operate the same as before.

Created a complete set of functions for all databus sizes (8,16,32,64) and
all endiannesses. A few functions are redundant, but it is now very clear
which functions to use in which scenarios. It is also now possible to rely
on being able to access values of 8, 16, 32 or 64 bits via the built-in
accessors without fear of crashing.

Updated all cores using 8-bit handlers to explicitly call the 8-bit handlers
with the appropriate endianness.

Fixed a few games which were calling n-bit handlers directly to use the
generic forms. In the future, this is all the access drivers will have.
2008-04-09 07:31:47 +00:00
Roberto Zandona
7800d2bb70 fix dasm for two code and prefix opcode in real time encryption 2008-04-08 22:39:28 +00:00
Wilbert Pol
8dcedabb57 Removed the hardcoded dependency on a 8254 device from the 8042kbdc code. Changed the drivers using the 8042kdbc to define their own 8042kdbc - 8254 dependency. 2008-04-08 18:35:48 +00:00
Nathan Woods
3364fdb2d8 Initializing device_config.machine to NULL 2008-04-08 00:30:56 +00:00
smf-
ee9ce122a9 removed useless casts in BLEZ/BGTZ 2008-04-07 23:49:48 +00:00
smf-
af97c741b3 fixed OTZ sign extension
fixed reading from SXYP
fixed reading from IRGB
fixed writing to LZCR
fixed sign extension of GTE control registers
fixed writing to FLAG

New games added or promoted from NOT_WORKING status
---------------------------------------------------
1 on 1 Government (JAPAN)
2008-04-07 23:20:31 +00:00
Roberto Zandona
486cdcb6b5 1) fix nec v30 dasm when a "real-time encrypted cpu" is used
2) fix Execution Clocks for add,addc,and,or,xor,cmp,sub,subc instruction
2008-04-07 22:30:52 +00:00
Wilbert Pol
35462b15c5 Changed the 8237dma implementation into a device. 2008-04-07 17:53:56 +00:00
Aaron Giles
bcb340612b Fixed bug that prevented the initial input port update from working properly. 2008-04-07 00:21:00 +00:00
smf-
4d21cff799 added IR1/IR2/IR3 saturation when calculating ORGB
fixed spelling mistake.
2008-04-06 22:48:25 +00:00
Aaron Giles
8a914b3d22 Renamed input port functions:
readinputport           -> input_port_read_indexed
  readinputportbytag      -> input_port_read
  readinputportbytag_safe -> input_port_read_safe

Added machine parameter to input port functions. Updated
many drivers to accomplish this.
2008-04-06 22:02:39 +00:00
smf-
be21ac9e08 fixed IRGB truncation and conversion to IR1/IR2/IR3 2008-04-06 21:38:25 +00:00
smf-
3d05dc8d91 fixed SZ0 truncation. 2008-04-06 21:12:02 +00:00
smf-
d485e8ed3c Fixed the SR masks for MTC0.
Added ability to test the instruction/data cache ram. The scratchpad and BIU register are now handled internally to the CPU.

All writes are performed with masks. SWL/SWR used to be implemented with two writes ( one byte and one word ) when writing three bytes, now it only ever performs one. Byte and Word writes use masks as they leave the rest of the register on the bus, which can be picked up by larger registers.

The read/write functions to use are cached when the SR bits are updated, as are the bad address masks.

Added coprocessor 1 & 3 support, though they don't do anything useful.

All loads now go through the delay pipeline, a lwl/lwr will grab the value out of the pipeline if it's updating the same register.

Added undocumented behaviour of BLEZ/BGTZ. The comparison for zero can be changed by specifying an alternate register in the RT field ( the documentation says you should always use register 0 ).

Restricted to 16 COP0 registers & generate an exception if any of the 5 for the MMU are used.

Added BCF/BCT instructions, although I have found no conditions that affect them yet.

Generates an exception if any MMU instructions are executed.

Sets the CE instruction for all exceptions, not just those involving a coprocessor. The bits of the opcode that specify the coprocessor are grabbed no matter what the instruction.

Added TAR register and BT bit in SR. When an exception occurs during a branch, BT determines whether it was taken or not. The TAR register gets set to the destination of the branch.

Fixed the BD bit when you are in a branch delay slot and you didn't take the branch, this shows up in the pipeline as !pc.

Fixed branches within a branch delay slot.

Multiply & divide instructions can be aborted if you write to HI/LO before reading the result.
Added data breakpoints, you don't appear to be able to set breakpoints on any of the addresses internal to the CPU.

Multiply/divide/GTE instructions can execute when an exception is taken, although the EPC indicates that it hasn't. The BIOS avoids rerunning GTE instructions as they are destructive, so you have to make sure they run.

Added bus error handling, PSXCPU is limited to 8mb of ram & any access outside this range will trigger an exception. I believe this is to be an internal limit.

Added CXD8611R as a specific CPU type, System 12 appears to allow more than 8mb of ram & it's possible that this is different.

Mapped out all instructions to either generate an exception or ignore bits.

Updated the disassembler to match the decoding.

Fixed disassembling of branch instructions in a branch delay slot.

Lui checks for a ori/addiu following and will show you the result.

Added step over/out support.

Fixed standalone disassembler.
2008-04-06 16:42:10 +00:00
Aaron Giles
830b8836fc 01609: Various - tested srmp4 (ssv.c), ttmahjng (route16.c), vsmahjng (vsnes,c), tokkae (konamigx.c), sf2 (cps1.c): INP playback loses sync quickly
Rewrote INP recording from scratch, since all old INPs are broken anyways.
Header now includes timestamp, which overrides the default time base for MAME's system time.
Each frame recorded now gets a timestamp.
Analog ports are recorded once per frame and interpolated.
Analog port calculations are all done in fixed point for consistent results.
A bunch of other minor tweaks in the input port code.

There may still be a few changes to the final INP format (considering adding 
NVRAM data directly in the INP file, for example....) but this at least seems
to work for the games I've tried.
2008-04-06 06:03:00 +00:00
Nathan Woods
8fcdf39e8e Added a temporary MESS specific hook 2008-04-06 01:19:15 +00:00
Couriersud
0d10d0df2c 00761: finalapr: Heavy performance hit.
Actually remove tilemap invalidating from tilemap_set_palette_offset (tilemap.c)
Following recommendation from Aaron added a comment to tilemap.h
2008-04-04 19:43:20 +00:00
R. Belmont
0dbbecd2b3 [SCSICD] Reverted previous change. 2008-04-04 17:05:53 +00:00
Aaron Giles
356d5dd812 Fixes 01659: stereo balancing is wrong
Apparently if you cast a negative number to a UINT32 at compile-time,
gcc does the "right thing" and saturates it to 0.
2008-04-04 14:17:56 +00:00
Aaron Giles
2c63abdad0 Actually fixed -refreshspeed. 2008-04-04 13:31:25 +00:00
Couriersud
0c79f46193 01663: Hat switches not working
All custom itemids were mapped to class SWITCH. With the recent modification, this implicitly changed to ABSOLUTE.
This fix will use the passed itemid to determine the class.
2008-04-04 07:38:35 +00:00
Nathan Woods
6498f1b8f2 Updated devconv.h to work with 0.124u1 2008-04-04 01:51:39 +00:00
Couriersud
2cfb327cbe Show a message if coin-lockout is active and coin x is pressed. 2008-04-03 15:37:45 +00:00
Aaron Giles
31336e491e Cleanups and version bump to 0.124u1. 2008-04-03 07:57:25 +00:00
Aaron Giles
efbe64428a Switched from ACCESSING_BYTE_*, ACCESSING_WORD_*, ACCESSING_DWORD_*
macros to ACCESSING_BITS_*_* macros.
2008-04-03 07:36:23 +00:00
Aaron Giles
ca3d7d01e6 From: Wilbert Pol
Subject: pit8253 device

I have converted the pit8253 implementation into a device. To make it  
easier to use I've also created a src/emu/devconv.h in the same style  
as src/emu/memconv.h.

I do not have all roms/disk images to test all drivers.  I have only  
been able to test pf2012, filetto, and topgunnr.
2008-04-03 05:26:47 +00:00
Aaron Giles
e621d87cfe From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: MESS machine stuff

Another machine parameter added to a MESS function call.
2008-04-03 05:21:51 +00:00
Curt Coder
1859e012d2 - converted CDP1869 to the new device system
- refactored to represent how the hardware actually works
- added PMA latching on OUT5
- separated Cidelsa video to its own file
2008-04-02 14:43:06 +00:00
Curt Coder
12589d9abd More COP400 fixes:
- fixed serial timer
- fixed clocks
- fixed COP410 RMB3, XAD instructions
- general cleanup
2008-04-02 14:36:50 +00:00
Nathan Woods
36af5b18bc Tweaked the hooks that MESS has in the MAME initialization process 2008-04-02 10:59:32 +00:00
Aaron Giles
fa67773ba7 From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: Further ACIA changes

Added dynamic control of RX and TX pins to 6850 ACIA emulation - this is
needed for correct operation of the MPU4 Video communications system, 
and may be handy for some MESS systems. To use, set the rx and tx clocks
to 0 in the acia interface, then use acia_tx_clock_in() and 
acia_rx_clock_in() respectively.
2008-04-02 08:37:28 +00:00
Aaron Giles
35b88f45fe From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: small change for MESS cleanup

This adds the "Machine" parameter to a MESS function call in MAME 
code to go along with Machine -> machine ckeanups in MESS
2008-04-02 08:34:24 +00:00
Aaron Giles
bddaca5de2 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: Machine -> machine cleanups

This patch changes "Machine" to "machine", when the runnin-machine 
parameter is already available. In some cases I could even remove the 
dprecat.h.

I will look for some occurances where it can be easily changed and 
afterward take a step at adding the running_machine parameter in a 
few places.
2008-04-02 08:33:06 +00:00
Aaron Giles
2a9d6c09bf Added missing #include. 2008-04-02 08:17:56 +00:00
Nathan Woods
ff3b615c69 Removing false assertion; NULL is also DEVICE_TYPE_WILDCARD 2008-04-02 01:39:31 +00:00
Couriersud
f4b7ad20e2 discrete sound system:
* Fix timing of stream_update in discrete_sound_w
  All sound cores update before processing changed data
* Add streeam_update to discrete_sound_r
* Now supports multiple output nodes per module. 
  There is the possibility to support multiple outputs per module.
  In this case, NODE_XXX is the default output. Alternative outputs may
  be accessed by using NODE_XXX_YY where 00<Y<08.
  
  You may also access nodes with macros:
  
      NODE_XXX = NODE_SUB(XXX, 0)
      NODE_XXX = NODE(XXX)
      NODE_XXX_YY = NODE_SUB(XXX, YY) with YY != 00 
      
  This should e.g. make discrete sound emulation easier
  when dealing with e.g. flip flops (Q & QQ) and binary counters

* added sanity checks to check consistency issues introduced by this change
* modules specify number of outputs ==> Certain special modules (WAVELOG) 
  may no longer be used as input nodes
* removed explicit (NODE_XX + expr) from a couple of drivers
2008-04-01 21:17:17 +00:00
Nicola Salmoria
a284b2fd9e fix tilemap viewer to draw the whole tilemap when categories are used 2008-04-01 16:01:34 +00:00
Nathan Woods
68db1ed583 Typo fix 2008-04-01 01:24:10 +00:00
R. Belmont
2a869f8673 Various SCSI devices register state items by their disk ID, which are not unique across device types. This introduces a device-type offset for CD-ROMs so their registrations don't clash with harddisks. 2008-03-31 03:04:34 +00:00
smf-
6c238b4395 Fixed state loading now that the digital i/o board's serial number has been changed to a const by not saving it. As the serial number cannot be changed at run time it was rather pointless. I can only imagine I did it so you could hack the state file instead of having to recompile, though it should probably load it from an external file so you can supply your own. 2008-03-30 22:37:06 +00:00
Nathan Woods
52f6db9e2b MESS specific change; part of MESS' device changeover 2008-03-30 17:14:03 +00:00
Couriersud
cac4d00e7d Add ITEM_IDs for additional axes and switches
Add ITEM_IDs for up to 4 hats/POVs
2008-03-30 14:28:08 +00:00
smf-
ad4ef5d256 New macros added for checking mem_mask. ACCESSING_BYTE_n, ACCESSING_WORD_n & ACCESSING_DWORD_n. These check for any access within the bounds, currently the pattern for checking whether both bytes of a word is written is to make two byte checks ( this pattern existed before because there was no macro for testing a 16 bit word, though you could have used ACCESSING_LSW32 ).
All occurrences of ACCESSING_LSB, ACCESSING_MSB, ACCESSING_LSB16, ACCESSING_MSB16, ACCESSING_LSB32, ACCESSING_MSB32, ACCESSING_LSW32, ACCESSING_MSW32 & simple mem_mask checks have been replace with the new macros.
The old macros are gone.
2008-03-30 09:19:23 +00:00
R. Belmont
40f3c081f4 [AICA, SCSP] Fixed encoding/decoding of negative denormal floats in the DSP. Shouldn't actually affect any games. (kingshriek, Deunan Knute) 2008-03-30 00:12:07 +00:00
Couriersud
4e4c63ba21 Added NODE(x) macro to avoid avoid (NODE_00 + 3) in code. 2008-03-29 23:06:29 +00:00
Couriersud
6a8fa36bcc adds DISCRETE_RCFILTER_SW to discrete sound
* this implements multiple RC networks with CD4066 switches to connect/disconnect capacitor
2008-03-29 21:10:06 +00:00
Nathan Woods
1e57031838 MESS-specific changes; mame.h no longer include's MESS's device.h 2008-03-29 14:46:37 +00:00
Curt Coder
e241656170 Reverted to old execute, new broke more than it fixed. 2008-03-29 14:13:09 +00:00
Curt Coder
6bdcdb0769 Removed debugging code. 2008-03-29 12:18:41 +00:00
Curt Coder
d23a72d1cd Rewrote the COP400 execute function. 2008-03-29 12:17:59 +00:00
Phil Bennett
ed397c466a 1. Added driver for JPM 'Give us a Break' hardware, supporting:
* Give us a Break [2 sets]
* Ten Up [2 sets]
Neither are playable; they don't register coins for some reason.

2. Fixed interrupt handling and 16-bit memory accessors in 6840ptm.c
Also cleaned up code for the sake of readability.

3. JPM games now have their own object archive file.
2008-03-29 01:35:02 +00:00
Aaron Giles
6350ab3302 Minor cleanup and simplification. Removed palette_config(). 2008-03-28 18:59:31 +00:00
Aaron Giles
c5335ee5d4 Fixed compile error in MSVC. 2008-03-28 18:32:09 +00:00
Curt Coder
cb38b8b0d5 - implemented interrupt
- implemented serial input/output
- fixed XAD/LDD, XIS1, RMB3 opcodes
- fixed clock divider
- fixed internal memory map size
- added some cpu variants

As a result, Draco at least initializes the AY-8910 now.
2008-03-28 16:10:23 +00:00
Aaron Giles
4821d456dd Fixed:
- 01622: [Core] -refreshspeed has no effect (aaron) - Resolved.
2008-03-28 10:10:21 +00:00
Aaron Giles
ec36f9c06f Converted special-case DIP switches (service, unknown, unused) into their
own token type rather than expanding into other tokens. The reduces the
number of redundant strings and data.
2008-03-28 00:04:22 +00:00
Aaron Giles
984380354e Added fatal error if AM_READ_PORT() references a non-existent port. 2008-03-28 00:03:25 +00:00
smf-
5ed703d6d5 fixed another bug in new debug hook code, data wasn't shifted properly in all cases. 2008-03-27 21:04:02 +00:00
smf-
07459e6491 Passes mem_mask to the read and write debug hooks. This allows the address & size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger. 2008-03-27 20:23:36 +00:00
smf-
7d38bf085f reverted, I misunderstood something and it's broken. I'm on it. 2008-03-27 19:56:24 +00:00
smf-
8b7582a477 Passes mem_mask to the read and write debug hooks. This allows the address & size of the memory access to be correctly calculated when using a memory call that takes a mem_mask. While testing I found that the address had already had it's lower bits masked out, so watch points were broken already. Unexpected results will occur if you pass in a mem_mask that has a gap in. For example 0x00ff00ff is treated as a 3 byte operation, a watchpoint for the gap will still trigger. To simplify the mem_mask decoding it is inverted before passing to the debugger. 2008-03-27 19:22:20 +00:00
Couriersud
1355872b9a Fix cfg file corruption if joystick is not connected
* itemclass now part of token if item is not found

Settings for joysticks which use a custom item id will still be lost. A fallback has to be provided here since those will use a token generated from the input item name.
2008-03-26 19:06:24 +00:00
Nathan Woods
ec82be4ab3 Removed a MESS-ism 2008-03-26 02:57:08 +00:00
Aaron Giles
a070ad63d8 Fix for incorrect sound bug in 0.124. 2008-03-25 03:24:21 +00:00
Luca Elia
757d289163 Driver for Astro Corp. hardware.
New game:

- Show Hand (roms/current/s/showhand.zip)
2008-03-24 18:29:07 +00:00
Aaron Giles
9476c50ee6 Cleanups for 0.124. Marked Mermaid as working per checkin comment. 2008-03-24 04:07:46 +00:00
Aaron Giles
126d821654 From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Minor static/const/include fixups

Hi mamedev,

Another batch of minor static/const/include fixes.  Very boring, very
pedantic.  ;)

~aa
2008-03-24 01:51:12 +00:00
Aaron Giles
e04bb4f699 From: Lei Wu [mailto:lanewu@hotmail.com]
Subject: MSVC9 fix [Emuman]

the original macro is too long, which caused a MSVC9 internal compiler error
2008-03-24 01:36:47 +00:00
Aaron Giles
d77d9fdb64 Added validity check to ensure input port tags don't have duplicates.
Fixed several drivers where there were duplicates.
2008-03-24 01:33:12 +00:00
Aaron Giles
abda9cf18b Undid recent change to remove pen lookups in 16bpp modes. This code
is shared between INDEXED16 and RGB15 rendering and we're not ready 
to remove the lookups yet.
2008-03-24 01:20:39 +00:00
Zsolt Vasvari
c27dfa66fa Added mc6845_set_hpixels_per_column() for the Hercules gfx adapter 2008-03-23 15:24:56 +00:00
Aaron Giles
9f4e71d8b3 From: Duke [mailto:startaq@gmail.com]
Subject: Unnecessary assert in video.c

The assert

assert(machine->config->devicelist != NULL);

in video.c causes the MESS mk1 driver to fail because it doesn't have
any devices - no screens and no sound devices. It works fine when the
assert is removed.

--Dirk
2008-03-23 13:48:43 +00:00
Nathan Woods
0fd62f5d4f Added a machine_config* parameter to certain MESS specific hooks 2008-03-23 11:32:46 +00:00
Zsolt Vasvari
ffaddce8f4 Adds the 'static' as per AtariAce, but he screwed up the alignment of an important table :(, which is why I am sending it myself 2008-03-23 05:26:19 +00:00
Zsolt Vasvari
dc01a6b148 - Converted crystal.c from RGB32 to INDEXED16
- Added PALETTE_INIT( RRRRR_GGGGGG_BBBBB )
2008-03-23 02:41:49 +00:00
Nathan Woods
bbecd3b886 MESS-specific: Interim change in the process of changing over to MAME's device
system
2008-03-22 22:26:25 +00:00
Zsolt Vasvari
8fcc91c77f Added option to programatically set the clock pin. This is needed by at least one MESS driver 2008-03-22 09:49:45 +00:00
Zsolt Vasvari
d2b44c842f DGPIX: Converted to INDEXED16
Removed temp bitmaps
       Changed ugly recursive video RAM code

DDZ:   Removed RGB15 -- it's a "skeleton" driver, so why have it?

video\generic.c: Added PALETTE_INIT(RRRRR_GGGGG_BBBBB) and PALETTE_INIT(BBBBB_GGGGG_RRRRR)
2008-03-22 06:05:05 +00:00
R. Belmont
20e3fa7eb1 [SCSI] Fixed case when no device exists (e.g. running the sys573 BIOS directly). 2008-03-22 03:55:23 +00:00
Aaron Giles
509dc4c064 De-deprecat-ed ui.c.
Changed xmlfile.c to pass in memory handlers to expat so that
our memory overrides are properly managed.
2008-03-21 14:51:26 +00:00
Zsolt Vasvari
5cd63ef3de Fix 01557: dealem: Assertion 2008-03-21 00:25:13 +00:00
Aaron Giles
b28f2c2504 Explicitly fixed unmapped handler masks so that we don't report
all unmapped addresses as 0.
2008-03-20 14:16:00 +00:00
Curt Coder
bc8eb54a5e Cleaned driver up to the latest spec. 2008-03-19 21:55:16 +00:00
Nicola Salmoria
72889926e1 Added Noise Output to the MSM5232 emulation
Added placeholder effects for cymbal and hihat to equites.c. These will need further work to properly emulate the discrete circuitry.
2008-03-19 09:35:57 +00:00
Aaron Giles
4a5001927c Cleanups and version bump. 2008-03-19 08:52:53 +00:00
Aaron Giles
4967410073 From: Oliver Stoeneberg [mailto:oliverst@online.de]
Subject: SH-4 debugger output fix

This patch fixes "garbage" (newlines) in the debugger window when 
debugging the SH-4 CPU.

It also conatins a small comment fix in video/playch10.c and the 
removal of some yet unused or just obsolete macros in emu/cpuint.h.
2008-03-19 08:38:01 +00:00
Aaron Giles
5807e98052 Removed excessive assertions in the device_list code -- it is ok to pass
a NULL list head (in which case you have an empty device list). All the
code works fine with a NULL head and returns appropriate values. Removed
changes to video_screen_count() and video_screen_first() which were added
to work around this behavior.
2008-03-19 08:15:37 +00:00
Aaron Giles
d75b3d1dff Added return value to video_screen_update_partial() indicating whether
or not the VIDEO_UPDATE was called as a result.

Modified amiga.c to use this information so that we guarantee a call
to amiga_render_scanline() regardless of the video state.

Fixes 01521: ar_sdwr: Game hangs on title screen
2008-03-19 07:58:51 +00:00
Zsolt Vasvari
772311642a Removed unneeded pen lookups.
Some code formatting clean-up.
2008-03-18 08:34:01 +00:00
Nicola Salmoria
23a0601055 Alpha Denshi major update
This is still WIP bug I've been working on it for sveral weeks and I want to get it out before leaving for holidays.

- Fixed Alpha 8201/830x MCU simulation.
  - all hacks from the equites driver removed
  - fixed equites restart position after going underground
  - fixed hvolume, splndrbt 2 players
  - removed hacks from exctsccr2
  - fixed CPU gameplay in shougi

- Gekisou promoted to working

- added dump of Alpha 8201 MCU to games that use it (the ROM isn't used yet, HMCS44 CPU core needs to be written first)

- major cleanup of the mess in equites.c:
  - many thanks to Corrado Tomaselli for precious hardware info.
  - implemented bg perspective scrolling using PROMs
  - fixed sprite flip & disable
  - fixed bg color
  - converted bg to tilemaps
  - fixed fg banking
  - fixed screen flip
  - removed meaningless banking of player inputs
  - added UI adjuster for MSM5232 frequency
  - MSM5232 volume control

- fixed MSM5232 noise LFSR formula (done by Jarek Burczynski; thanks to Corrado Tomaselli for samples)

- changed MSM5232 emulator to output channels separately

- added output of SOLO channels to MSM5232 emulator.

- mametesters bugs fixed:
  - 00217 splndrbt: On boot the pcb displays a clean light blu screen while in mame there is a black road. 
  - 00220 splndrbt: Concerning the gfx, on the pcb the background is not linear as shown in mame.
  - 00223 splndrbt: On the first level when you pass the asteroid belt the star road should be light blue instead of black like mam 

- fixed champbas inputs

- merged talbot with champbas, some driver clenaup

- fixed shougi inputs

- switched exctsccb to use the correct gfx ROMs (matches screenshot found in 01058 exctsccb: Exciting soccer bootleg should be placed in champbas.c.)

- fixed sprite bpp in exctscrr, removed the horrible hacks that were used to fix colors and transparency.

- fixed sound clipping in exctsccr
2008-03-17 19:07:23 +00:00
Aaron Giles
e4e17a4fcd Fix 00150: alpinr2b, alpinesa : Assertion with -debug 2008-03-17 16:51:19 +00:00
Aaron Giles
91bc82c487 Better multisession fix. Reverted previous change (1002) and simply
initialize the digital joystick state in input_port_init().
2008-03-17 16:36:26 +00:00
Aaron Giles
ec550fa07b Fixed pick_best_mode in both d3d and ddraw cases to manually extract
refresh information from the device's inline_config, since this is
done before the screen devices are start. Fixes 01491: switchres 
causes Exception at EIP=009413BF: ACCESS VIOLATION.

Also, fixed render_target_get_minimum_size() to return nominal values
if no screens are found.
2008-03-17 15:50:12 +00:00
Aaron Giles
75056eb1b5 Moved per-screen initialization into DEVICE_START and per-screen cleanup
into DEVICE_STOP.
2008-03-17 15:38:18 +00:00
Aaron Giles
7a0931f08d Fix chicken and egg problem with device_start callbacks.
Added DEVINFO_INT_TOKEN_BYTES, which is queried before device
startup. It should return the size of the structure that will
be hung off of device->token. It must not return 0.

Changed the core device interface to allocate and zero a block
of memory the size of DEVINFO_INT_TOKEN_BYTES before calling
device_start. The pointer to this memory is already attached
to device->token at the time device_start is called.

The primary motivation for this is to allow the device_start
function to make internal calls and pass the device_config *
around as if the object were fully constructed. Since the token
is used to indicate whether or not a device is live, this makes
the device "live" at the time device_start is called rather
than after it completes.
2008-03-17 15:23:07 +00:00
Zsolt Vasvari
c7b072564c Restores the previous verifyroms() code. Left verifysamples() untocuhed for now. 2008-03-17 15:21:07 +00:00
Aaron Giles
ce011916b4 Made it a fatalerror to registr save state callbacks at the wrong time
if the current driver claims to support save states.
2008-03-17 14:45:27 +00:00
Nathan Woods
6a7c3d1589 Added a crosshair_set_screen() to allow drivers to control which screen(s) on
which crosshairs are displayed.
2008-03-17 12:47:22 +00:00
Nathan Woods
e7508371ed Fix for screenless (and deviceless) systems - this fix assumes that it is
illegal to pass a NULL listhead to device_list_first() and that the assert there
should stand.  Please review and correct if appropriate.
2008-03-17 10:52:16 +00:00
Zsolt Vasvari
c031746599 Fix: 01538: -verifysamples: Inconsistent handling of missing sample sets
I applied the same fix to verifyroms.  Now a status message is printed for every sample/ROM set regardless if an individual or all the sets are audited.
2008-03-17 09:19:11 +00:00
Zsolt Vasvari
9eb278b911 Fixed memory leak 2008-03-17 08:56:10 +00:00
Zsolt Vasvari
b78ff83cd0 Fix: 01529: AICA memory leak 2008-03-17 00:58:24 +00:00
Zsolt Vasvari
c230321cdc The on-screen "Reset by watchdog" message only appears in debug builds 2008-03-17 00:44:00 +00:00
Pierpaolo Prazzoli
0895d395a9 Added missing prototype for get_info function. It didn't compile. 2008-03-16 10:43:36 +00:00
Zsolt Vasvari
cb3fffef61 Missing semicolon -- how did it even compile? 2008-03-16 04:34:19 +00:00
Zsolt Vasvari
c64886cc69 Fix: 01499: Various Drivers: Launching games from in-game [TAB] menu 2-3 times in a row throws access violation.
My fix is a bit heavy handed.  The real access violation happens in update_digital_joysticks() after the comment "read all the associated ports" and before the next comment
2008-03-16 04:31:40 +00:00
Zsolt Vasvari
c66bb0adc5 Fix: 01530: Various Drivers: bitmap memory leaks 2008-03-15 14:14:03 +00:00
Zsolt Vasvari
16e18f24af Fixed: 01508: most vector-based drivers: Assertions 2008-03-15 09:32:24 +00:00
Zsolt Vasvari
f61e037749 Fix 01526: futflash, laserbas, laserbsa: Assertion
Fix 01524: btoads: Assertion 
Fix 01523: nkdodge, nkdodgeb, spdodgeb: Assertion 
Fix 01522: all ddragon.c drivers: Assertion 
Fix 01528: pzlestar, sexyboom: Assertion 
Fix 01527: all meritm.c drivers: Assertion
2008-03-15 03:54:44 +00:00
Zsolt Vasvari
3512bc695d Changes MDRV_TIMER_DURATION to MDRV_TIMER_START_DELAY
Renames duration to start_delay in timer_adjust_periodic() as well
Moves MDRV_ macros into proper header files
2008-03-15 03:13:57 +00:00
Nathan Woods
81fcbd9a2c MESS-specific changes 2008-03-15 00:14:32 +00:00
smf-
5d52f08b7e fixed collision of TIMER define 2008-03-14 21:53:19 +00:00
smf-
a0afb4c516 fixed collision of TIMER define 2008-03-14 21:50:22 +00:00
smf-
b4418ff847 fixed unused variable warnings when assert is not enabled. 2008-03-14 21:35:36 +00:00
Zsolt Vasvari
d4893e2535 Makes suggested changes to MDRV_TIMER macros. Hasn't moved them yet. 2008-03-14 15:13:46 +00:00
Zsolt Vasvari
e4a07ea688 Implements scanline based timer devices.
Converted Centipede, as an example.

To define a scanline timer, use something like this:

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

The first number is the first scanline the timer will fire on, the 2nd number is the increment.
So in this case, the timer will fire on 0, 16, 32, ..., 224, 240, then wrap around
because the screen is defined as 256 lines high.
The current scanline is passed to the callback in its 'param' argument
2008-03-14 11:15:31 +00:00
Zsolt Vasvari
e42b02f565 Implements the periodic timer device functionality 2008-03-14 09:52:28 +00:00
Aaron Giles
8fcd45cab1 Renamed *_vbl_cb to *_vblank_callback.
Fixed 01475: Screenless systems are broken because of a vblank callback.
We now create an artificial update mechanism when there are no screens.
2008-03-14 05:19:53 +00:00
Zsolt Vasvari
c0ca716e62 Added skeletion device interface for timers. Just wanted to get feedback.
- Where applicable, added a parallel set of timer functions that take a device_config instead of emu_timer:
	void timer_device_adjust_oneshot(const device_config *timer, attotime duration, INT32 param);
	void timer_device_adjust_periodic(const device_config *timer, attotime duration, INT32 param, attotime period);
	void timer_device_reset(const device_config *timer, attotime duration);
	int timer_device_enable(const device_config *timer, int enable);
	int timer_device_enabled(const device_config *timer);
	int timer_device_get_param(const device_config *timer);
	void *timer_device_get_param_ptr(const device_config *timer);
	attotime timer_device_timeelapsed(const device_config *timer);
	attotime timer_device_timeleft(const device_config *timer);
	attotime timer_device_starttime(const device_config *timer);
	attotime timer_device_firetime(const device_config *timer);

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

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

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

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

Attached please find a small patch to include M68000 CPU only when you're 
compiling a build with the M68K. this is needed to e.g. compile tiny 
builds .
2008-03-13 15:45:39 +00:00
Aaron Giles
3a082a644f From: notaz [mailto:notasas@gmail.com]
Subject: patch for SVP (Sega Virtua Processor) emulation

hello,

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

The diff has already been reviewed by Reip and SSP1610 removal was one
of his suggestions (SSP1610 is not used by any drivers).
2008-03-13 15:35:17 +00:00
Aaron Giles
9d3f7f8680 From: Mariusz Wojcieszek
Attached is update for Merit hardware based on V9938 (CRT-250 and CRT-260 - meritm.c).

New playable games:

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

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

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

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

Moved some memory system constants into memory.c.
2008-03-10 02:29:15 +00:00
Zsolt Vasvari
198f401cf5 Changes TMS34010 to take a screen tag instead of the screen number
Everything appears to work, except X The Ball, which sets horz the resolution twice as wide as it should -- no clue why
2008-03-10 02:16:06 +00:00
Zsolt Vasvari
9b3ac2606e Voodoo now takes a device_config for the screen
Added video_screen_get_visible_area()
2008-03-10 00:39:20 +00:00
Zsolt Vasvari
84a1d99c67 Added a bunch more asserts 2008-03-09 23:49:59 +00:00
Zsolt Vasvari
343bcb4cda Changes MC6845 to take a screen tag instead of a screen number 2008-03-09 23:01:34 +00:00
Aaron Giles
ddfc0c3259 WIP check-in. Things work now, but I'm still working on the code.
Converted address maps to tokens. Changed the address_map structure
to house global map-wide information and hung a list of entries off
of it corresponding to each address range. Introduced new functions
address_map_alloc() and address_map_free() to build/destroy these
structures. Updated all code as necessary.

Fixed several instances of porttagtohandler*() in the address maps.
Drivers should use AM_READ_PORT() macros instead.

ADDRESS_MAP_EXTERN() now is required to specify the number of 
databits, just like ADDRESS_MAP_START.

Removed ADDRESS_MAP_FLAGS() grossness. There are now three new macros
which replace its former usage. ADDRESS_MAP_GLOBAL_MASK(mask)
specifies a global address-space-wide mask on all addresses. Useful
for cases where one or more address lines simply are not used at
all. And ADDRESS_MAP_UNMAP_LOW/HIGH specifies the behavior of
unmapped reads (do they come back as 0 or ~0).

Changed internal memory mapping behavior to keep only a single
address map and store the byte-adjusted values next in the address
map entries rather than maintaining two separate maps. Many other
small internal changes/cleanups.
2008-03-09 21:59:57 +00:00
Zsolt Vasvari
ac9778cdb0 Changes first argument of video_screen_* functions to take a device_config
All callers that used 0 for the screen number now use machine->primary_screen
As a gap meassure, Where necessary, create a parallel set of video_screen_*_scrnum functions that take scrnum
All callers that specified a specific screen number now call the *_scrnum versions
Changed game info screen and overlay UI to display the screen tag instead of screen number
2008-03-09 15:41:17 +00:00
Zsolt Vasvari
48f7d189e6 Changes VIDEO_UPDATE signature to
typedef UINT32 (*video_update_func)(const device_config *screen, int scrnum, bitmap_t *bitmap, const rectangle *cliprect);

Adds const device_config *primary_screen to running_machine (not yet used)
2008-03-08 15:57:43 +00:00
Zsolt Vasvari
d0870c6936 Moves 'refresh' from public to internal video state and renames it to 'frame_period'
Changes all drivers that previously accessed 'refresh' to use video_screen_get_frame_period()
2008-03-07 14:34:04 +00:00
Zsolt Vasvari
d0f5196025 - the public screen_state is made to only contain items that are currently accessed by drivers
- populating screen_state is moved from mame.c to video.c
- defstate is gone -- the default screen parameters live in screen_config directly
2008-03-07 12:53:00 +00:00
Zsolt Vasvari
9ad9532722 Seperates out the notion of screen specific vs. "global" VBLANK callbacks
"Global" VBLANK callbacks, of course, make no conceptual sense -- it should probably fire every once in a while even if there is no screen
2008-03-07 08:18:28 +00:00
Zsolt Vasvari
5f53680e03 - Removes video_data from running_machine
- Private state screen information now hangs off the public one, instead of the other way around
- Combines video_global and video_private into a single structure
2008-03-07 07:19:38 +00:00
Zsolt Vasvari
6302df116d This changes the MC6845 to take and pass device_config's only
The following shook out from this that are applicable to other devices as well:

- running_machine is no longer taken, passed or stored
- mc6845_t is now private
- since passing device_config's is not device type safe, I added a
  get_safe_token() to mc6845.c to check the device passed in for the valid type.
  I think something like this should be added to the core.

- As a side note, I really don't think that device_config is a good name,
  naming it simply device_t or something like that might be better.
2008-03-07 02:45:35 +00:00
Zsolt Vasvari
8f43de6a46 Removed runnning_machine as the first parameter of a VBLANK callback
video.c: some Machine->machine changes
2008-03-07 00:08:19 +00:00
Tomasz Slanina
183f506a2f debug build - fixed compilation error and warning. 2008-03-06 23:23:57 +00:00
Aaron Giles
befcee37ad Changed device interfaces to pass the device_config * rather
than tokens and individual bits to the device callbacks. Updated
all existing devices accordingly.

Removed machine from the parameters of some of the device_get_info
and device_set_info calls because that information is stored
with the device now.
2008-03-06 15:28:00 +00:00
Zsolt Vasvari
9c172be162 vblank_state_changed_func now has a device_config argument 2008-03-06 14:22:08 +00:00
Aaron Giles
fb26ec7c01 Cleanups and version bump. 2008-03-06 07:31:20 +00:00
Aaron Giles
0046339284 Removed AM_SPACE and matchmask support. Updated relevant drivers
to use AM_MIRROR() and AM_MASK() to achieve the same thing.
2008-03-06 07:02:10 +00:00
Nicola Salmoria
3a22b93b59 Fix 8085 RST75 not working with PULSE_LINE
According to datasheet, RST7.5 is latched on rising edge, while the other maskable interrupts are sampled.
2008-03-06 06:51:05 +00:00
Couriersud
19331ed134 Remove (UINT32) type casts which break build with mingw - again 2008-03-05 22:49:38 +00:00
Couriersud
dbd1965d0e * pass running_machine parameter to construct_map_##_name, i.e. ADDRESS_MAP_START
* Change "Machine->" to "machine->" in AM_BASE_MEMBER, AM_SIZE_MEMBER
* Pass Machine in construct_address_map

This is not perfect yet, but there is no need any longer to include deprecat.h in drivers using AM_*_MEMBER.
2008-03-05 22:01:37 +00:00
Aaron Giles
5b6183f898 From: Oliver Stoneberg
Subject: missing display types in DTD

This patch adds the new display types to the listxml DTD.
2008-03-05 15:32:33 +00:00
Aaron Giles
84ece5c78e From: Corrado Tomaselli
Subject: Frequencies diff

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

Changed/verified Oki pin 7 on the following pcbs: 1000 miglia, 
Galspanic, Action Holliwood, Hotmind, HardTimes, World Rally, Stagger1
2008-03-05 15:31:22 +00:00
Aaron Giles
a083bd20a9 From: Mark Fugmann [mailto:sailorsat@t-online.de]
Subject: "fix" for the "game information" resolutions.

Hi.
In 0.123u3 the bug "multiscreeninfo0123u2gre" was fixed, however it changed
its behaviour as it now shows the "default" resolution the driver uses
rather than the resolution the screen(s) actually use at the moment.

As I don't know if this change was intentional I've attached a simple diff
that changes from defstate.visarea to the real visible visarea.

Greets,
Ariane "SailorSat" Fugmann
2008-03-05 15:14:58 +00:00
Aaron Giles
31bb5d3f3c Added new macros AM_DEVREAD, AM_DEVWRITE, and AM_DEVREADWRITE,
which specify device read/write handlers in address maps, along
with the type/tag of the device they reference.

Converted MC6845 read/write handlers to READ/WRITE8_DEVICE_HANDLERs.
Updated all MC6845-using drivers to use the new macros and call
the updated functions. Removed the many little helper functions
that used to do this work.

Added validity checks to ensure that the devices referenced
actually exist.
2008-03-05 15:12:58 +00:00
Aaron Giles
a724936cb3 Added running_machine * to the device_config, live while the device
is live, and NULL otherwise, just like the token.
2008-03-05 07:54:12 +00:00
Aaron Giles
ee0a5642ab Added running_machine * parameter to the front of all read/write handlers.
Updated all call-through handlers appropriately. Renamed read8_handler to
read8_machine_func, replicating this pattern throughout. 

Defined new set of memory handler functions which are similar but which
pass a const device_config * in place of the running_machine *. These are
called read8_device_func, etc. Added macros READ8_DEVICE_HANDLER() for
specifying functions of this type. Note that some plumbing still needs to
happen in memory.c before this will work.

This check-in should remove the need for the global Machine and in turn
"deprecat.h" for a lot of drivers, but that work has not been done. On
the flip side, some new accesses to the global Machine were added in the
emu/ files. These should be addressed over time, but are smaller in
number than the references in the driver.
2008-03-05 07:45:34 +00:00
Zsolt Vasvari
793cf2e715 VBLANK based watchdogs can be disabled once again
Removed debugging fprintf
2008-03-05 04:20:01 +00:00
Zsolt Vasvari
34b3ab9841 Added running_machine* to the CUSTOM_INPUT callback - updated drivers to use it 2008-03-03 05:17:57 +00:00
Zsolt Vasvari
62466dd08f - Added PORT_CHANGED macro which calls a callback if the given port changes.
Usage is very similar to PORT_CUSTOM.  See the Astro Invader driver for an example
- Removed input_port_set_changed_callback and converted all users to PORT_CHANGED
  The only difference between the old callback and the ones supplied by PORT_CHANGED is
  that values passed by PORT_CHANGED are normalized to start at bit 0, just like
  PORT_CUSTOM.
2008-03-03 04:10:51 +00:00
Aaron Giles
e31f9a6313 Normalized function pointer typedefs: they are now all
suffixed with _func. Did this throughout the core and
drivers I was familiar with.

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

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

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

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

The idea behind this is that using a VBLANK interrupt with more than one interrupt per frame in conceptually wrong.
The screen tag will allow us to move the interrupt timing code from cpuexec.c to video.c, where it really belongs.
2008-02-29 15:09:04 +00:00
Zsolt Vasvari
f8cbcafd5e Replaces mame_bitmap with bitmap_t
Removes mame_bitmap
2008-02-29 04:01:09 +00:00
stephh
9d6f8060d6 "Input (this Game)" menu now handles conditional inputs.
See 'qcrayon2' in taito_f2.c driver (play with the last Dip Switch and look how inputs change).
2008-02-28 18:23:37 +00:00
Zsolt Vasvari
c1eddd0763 Adds mc6845_assert_light_pen_input. This latches the next character display address into the light pen latch. 2008-02-28 13:25:19 +00:00
Zsolt Vasvari
8cf42a706d Fixed incorrect comments 2008-02-28 10:05:12 +00:00
Zsolt Vasvari
22f1803388 Signals both the 0->1 and 1->0 transitions of the synching pins 2008-02-28 09:30:14 +00:00
Zsolt Vasvari
0516bab238 - MC6845 - Added HSYNC and VSYNC callbacks -- I actually tested this :)
- Added macros and typedefs for callback function types
- Updated all users for the new macros
2008-02-28 06:34:58 +00:00
Aaron Giles
b96aa2fb5c Spacing and version bump. 2008-02-28 06:20:19 +00:00
Aaron Giles
4741ad3a7e From: Robert [mailto:pac0446@bigpond.net.au]
Subject: A fix for the z80pio

Hi there,

Here is a one-line fix for the z80pio.

At the moment when the interrupt control word is sent (with interrupts
enabled), an interrupt occurs. In reality, interrupts are disabled until
the interrupt mask byte is sent.
2008-02-28 05:48:21 +00:00
Aaron Giles
ef3562b02b From: JEA Wallace [mailto:jeaw100@york.ac.uk]
Subject: MPU4 Changes part 2

Right, I've added a bit of CTS pin checking logic, so that the status
flag is actually set when the pin changes state.

I've also simplified the MPU4 ACIA clock logic, but it's still not ideal
(Ideally, the ACIA should only run one transmit or receive event each
time the PTM O1 pin goes high, but that's not possible right now, so I
just set the clocks as close to off as I can when the pin is low, and to
something that approximates the distance between output state changes
when it's on). There's also a few more little cleanups based on
schematics and flyers from TAFA, and an emulation of the master reset
behaviour. Incidentally, if anyone wants to see just why this isn't
kicking into life now, by all means do, since there's nothing left that
I can see that it can get hung up on, other than the video chip, and the
aforementioned ACIA logic.
2008-02-28 04:19:39 +00:00
Aaron Giles
0104d6ff63 From: Wilbert Pol [mailto:wilbert@jdg.info]
Subject: uPD7801, uPD78C05, and uPD78C06 cpu cores added to the uPD7810
cpu core

This patch adds basic support for the NEC uPD7801, uPD78C05, and  
uPD78C06 cpus to the uPD7810 cpu core.
2008-02-28 03:22:38 +00:00
Zsolt Vasvari
34781e5f4c - Better variable name for the cursor counter
- Pedantic clean-up of comments
- R6545 is still in the "MC6845 CRTC" family, therefore removed DEVINFO_STR_FAMILY
2008-02-28 03:16:36 +00:00
Nathan Woods
ee187c0bf6 Added a stub implementation of the Rockwell 6545 2008-02-28 02:22:10 +00:00
Zsolt Vasvari
7d092ece83 Adds support for cursors. All 4 blinking modes are supported (always on, always off, fast, slow) 2008-02-28 02:01:37 +00:00
Aaron Giles
2702453660 Couple more address map merges, plus an MSVC compile fix. 2008-02-27 15:01:08 +00:00
Zsolt Vasvari
f78611cfd3 - Clean-up of the Crazy Climber video driver, mainly via tilemap conversion.
This fixes the ape sprite positioning in Crazy Kong -- no more gap between feet and platform
- Merged Yamato driver with Crazy Climber
- XX Mission tilemap conversion
- Removes VIDEO_START(generic) -- no longer used
2008-02-27 13:51:06 +00:00
Aaron Giles
b61bc6d703 Turned on use of designated initializers for tokenized structures in gcc,
since it appears to support them with std=gnu89. Fixed several places
where drivers were violating the rules.
2008-02-26 11:16:37 +00:00
Aaron Giles
e8d437422c Fixed typo. 2008-02-26 10:55:38 +00:00
Aaron Giles
41d2a2d8c1 Change priority_bitmap accesses back to UINT8s, now that we are
again allocating an 8bpp bitmap. Fixes crashes in several games.
2008-02-26 10:48:45 +00:00
Aaron Giles
adcdfd3e5b Converted MACHINE_DRIVER definitions from function
constructors to tokenized lists. For the most part
this is a non-invasive change, except for those drivers
using MDRV_WATCHDOG_TIME_INIT. In order to allow for
tokenization of attotimes, a set of new macros is
provided called UINT64_ATTOTIME_IN_x() which follows the
same pattern as ATTOTIME_IN_x() but packs the attotime
down into a single 64-bit value for easier tokenization.

Separated MDRV_DEVICE_CONFIG_DATA into 32-bit and 64-bit
versions. Added floating-point versions with configurable
resolutions.

Fixed several errors in the machine drivers which were
caught by the additional checks now done in the machine
config detokenization code.

Converted speakers into devices. Machine->config no
longer houses an array of speakers; instead they are
iterated through using the new macros (defined in sound.h)
speaker_output_first() and speaker_output_next(). Updated
all relevant code to do this.

Improved game info display with multiple screens. Fixed
bug which caused all screens to display equally.

Added typedefs for all the machine config callback 
functions at the top of driver.h.
2008-02-26 06:31:28 +00:00
Couriersud
3bd4143eb6 * remove flip_screen macro
* flip_screen_x and flip_screen_y made static
* add flip_screen_x_get() and flip_screen_y_get()
* change writes to flip_screen_x from last commit to flip_screen_set_no_update()
* added save state calls for flip_screen_x and flip_screen_y
2008-02-25 23:01:59 +00:00
Couriersud
8e96884cc6 * Fix issues related to flip_screen being a define
* add "int flip_screen_get(void)"
* define flip_screen flip_screen_get()
* clean up drivers with collisions 
* mark write accesses to flip_screen_x with FIXME
2008-02-25 21:15:59 +00:00
Aaron Giles
9a359b370d Added new module: tokenize.h. This centralizes the behavior of
tokenizing data structures, as currently used by the input
port system. Redid the input port tokenization to be more
compact and make use of the new macros.
2008-02-25 01:35:48 +00:00
Zsolt Vasvari
2b1192dec8 - Backs out BITMAP8 removal from most places.
- I still left drawgfx.c as is, the only piece of code that used any of the functions in drawgfx
  was s2636.c -- everything else uses 8-bit bitmaps as a replacement for a two dimensional array
2008-02-24 23:24:29 +00:00
Aaron Giles
4a7301495b Different fix for X the Ball sound. Pulse no longer works for the 34010. Undid previous fix. 2008-02-24 15:57:25 +00:00
Zsolt Vasvari
803ece9d96 Removes 8-bit bitmap support and converts all previously 8-bit bitmaps to 16-bit 2008-02-24 13:30:08 +00:00
Zsolt Vasvari
51cae46fac - Added some asserts to drawgfx and drawgfxzoom
- Moved some variable declerations so that they are only visible where they are actually used

Note that the diff is large only because I removed a level of indentation from a huge chunk of code.
I could do that because the case it was checking for was already caught by one of the asserts added.
2008-02-24 06:33:02 +00:00
Zsolt Vasvari
58fc9362eb This fixes the DAC sound in X The Ball that got broken in 114u2. Not 100% if the fix is right, though. 2008-02-24 01:54:54 +00:00
Nathan Woods
3f652750d3 Fixed compilation error when compiled for MESS 2008-02-23 20:36:43 +00:00
Aaron Giles
29bc8049cd Fixes for screenless games. 2008-02-23 18:21:32 +00:00
Couriersud
dd0ebc1d8d Remove some deprecat.h includes from osd layer:
* add machine as parameter to osd_update and osd_update_audio_stream
* change Machine to machine and remove include deprecat.h
2008-02-23 17:46:52 +00:00
Couriersud
1a18371edc * output raw video parameters pixclock, htotal, hbend, hbstart, vtotal, vbend, vbstart if they have been given. 2008-02-23 12:04:52 +00:00
Couriersud
9c460a6248 Makefile & build system update:
* verinfo: New syntax.
	verinfo now uses the following syntax: verinfo.exe -b windows|winui|mess. 
	Does not depend on compile time defines any longer.

* makefile will include - if it exists - src/osd/$(CROSS_BUILD_OSD)/build.mak.
	This was necessary to enable cross builds for winui. winui adds mkhelp to build tools and the rules for mkhelp thus had to be moved outside src/osd/winui/winui.mak

* Tested on Linux 64bit, Linux 32bit, Windows 32bit mingw, Windows 32bit MSVC

* Cross build environment to be posted to the list
2008-02-21 23:53:29 +00:00
Brian Troha
a9d8713a91 Adds 7MHz XTAL to xtal.h
Corrects clock speeds for the megasys1.c boards.

Yes... the games actually are _THAT_ slow!
2008-02-21 23:29:51 +00:00
Aaron Giles
8436bec1e3 Cleanups and version bump for 0.123u2. 2008-02-21 17:43:00 +00:00
Zsolt Vasvari
e619861862 - Added void state_save_combine_module_and_tag(char *dest, const char *module, const char *tag);
Its purpose is to create a unique name for state saving purposes in modules that are tag based (no index)

- Updated MC6845 to make use of this
2008-02-21 12:00:00 +00:00
Aaron Giles
b7c4a537cd Most important thing to note about this change:
ALL DRIVERS MUST NOW EXPLICITLY DECLARE THEIR SCREENS.

Read on for more detail....

Added device tag as a parameter to the start function for devices.
Updated MC6845 to accept this tag.

Added new functions for iterating through the device list and 
counting devices of a given type. Updated search and iteration
functions to accept DEVICE_TYPE_WILDCARD to work across all
devices.

Added new macro MDRV_DEVICE_CONFIG_DATA() which is used to set a
single item in an inline data structure.

Removed the per-screen palette_base. This was an idea that never
really worked out, nor have we really needed it.

Defined a new device type VIDEO_SCREEN. Currently this has no
live functionality, but merely serves as a placeholder/identifier
for video screens. Eventually some of the screen management code
may move into the start/stop/reset functions.

Changed MDRV_SCREEN_* macros to build up VIDEO_SCREEN devices
rather than storing values in the screen[] array.

Changed MDRV_SCREEN_ADD to specify a screen type (RASTER, VECTOR,
LCD for the moment).

Removed the older VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR; this
information is now determined by walking the screen list.

Removed the screen[] array from machine_config. Modified all code 
referencing Machine->config->screen[] and changed it to iterate 
over the devices using the new video_screen_first() and 
video_screen_next() functions.

(The next step will be to add video_* functions that accept a tag
instead of screen index, and then move systems over to always
referencing screens by tag instead of index.)

Removed implicit screen #0. This means that ALL DRIVERS MUST
EXPLICITLY DECLARE THEIR SCREENS. Updated all drivers to do
so. While there, grouped all MDRV_SCREEN_* parameters together.
Also removed unnecessary VIDEO_TYPE_RASTER and VIDEO_TYPE_VECTOR.
Also removed VBLANK and bitmap format information from vector
games. This was painful and very tedious.

Changed game information to display info about all screens.
2008-02-21 08:50:36 +00:00
Zsolt Vasvari
4606ca9dc2 - Reorganized Gameplan driver
- Changed Trivia Quest use the Gameplan video code
- Added crystal for Gameplan pixel clock
2008-02-21 00:46:44 +00:00
Zsolt Vasvari
10e5c35068 - Changed all drivers using the MC6845 chip to use the device interface
- Removed mc6845_config
- Minor changes to the Qix driver
2008-02-20 13:17:06 +00:00
Zsolt Vasvari
72a9167032 - Added running_machine* as first parameter to mc6845_config and all callbacks. Updated all users.
- Reorganized Qix driver.  Driver state, decoupled audio section, etc.
2008-02-20 08:39:22 +00:00
Aaron Giles
85112f6f1c Removed clock and flags as fundamental device parameters. 2008-02-20 06:08:30 +00:00
Aaron Giles
99675196a8 Added support for inline device configuration. 2008-02-20 06:06:13 +00:00
R. Belmont
cc998eae3a Missed a few things in the last commit. 2008-02-20 05:13:17 +00:00
R. Belmont
5f4c195fe6 [SH4] Added missing SH4 instructions and bugfixed the FPU
[NAOMI] Improved I/O board emulation and added working controls

(Credit Samuele Zannoli, I just tweeked it to cooperate with my changes).
2008-02-20 05:11:31 +00:00
R. Belmont
4ba34771dc [AICA] Fixed ADPCM looping. 2008-02-20 05:08:58 +00:00
Aaron Giles
671afc2661 Updated validity.c to current core style. 2008-02-19 18:02:59 +00:00
Curt Coder
949599e0ff Added some XTALs for MESS. 2008-02-19 17:59:06 +00:00
Curt Coder
1424fce298 Added i8749 CPU type for MESS. 2008-02-19 17:54:47 +00:00
Aaron Giles
aad4c81ac4 Pulled remaining vestiges of old-style colortables:
* PALETTE_INIT no longer has a colortable parameter
 * removed game_colortable and remapped_colortable from machine_config
 * updated a few stragglers that still referenced these fields
 * removed tile_draw_colortable from tilemap.c

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

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

Hi/2.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

updated all drivers accordingly.

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

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

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

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

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

Hi mamedev,

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

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

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

Hi mamedev,

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

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

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

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

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

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

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

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

have something resembling free time.

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

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

to log at different levels.

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

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

- Changed copybitmap and copyscrollbitmap:

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

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

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

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

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

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

--

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

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

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

Hi mamedev,

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

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

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

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

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

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

Updated informations in Equites.c for the sound board
2008-01-14 17:18:29 +00:00
Laurent Desnogues
c000a7a284 cpuintrf_init: use the machine parameter instead of the Machine global variable 2008-01-14 16:07:33 +00:00