Subject: [patch] Collapse timer callbacks
Hi mamedev,
The following patch collapses timer callbacks in some cases to avoid
duplicating code. In the case of crystal.c, it also refactors two DMA
handlers and shuffles the init/reset code around a bit. I noticed
while doing this that h8_itu_read8 is missing cases 0x96,0x97 which is
almost certainly a bug, but I left it alone.
~aa
Subject: [patch] Fix i386 bsr implementation
Hi mamedev,
The i386 cpu emulator will return the wrong result for bsr when the
highest bit is set (0 instead of 15 or 31). The attached patch fixes
this.
~aa
Subject: [patch] Fix 1802 cybrcomm, raveracw, raveracj, raveraja,
ridgerac, ridgerab, ridgeraj, acedrvrw, victlapw: No sound in games
after reloading via the MAME UI
Hi mamedev,
The problem with namcos22 games losing sound when running multisession
is actually an m37710 cpu initialization bug. The attached patch
fixes it, and also collapses all the timer callbacks together as an
unrelated code cleanup.
Note: namcos22 has a lot of uninitialized state, so I wouldn't be
surprised if there are other multisession issues.
included by generic components in emu/ and thus should have no
dependencies on the MAME code.
Added new target ldplayer, which is based on MAME but serves as
a standalone laserdisc player for CHDs. Right now only the
Pioneer LD-V1000 is connected, and limited commands are available.
Each player type is a driver, so you specify the player type on
the command-line. The driver then opens the first CHD it finds
in your ROM path and uses that as the laserdisc. The intention is
that you specify the -rompath each time on the command-line, so
a typical approach might be:
ldplayer ldv1000 -rompath j:\mach3
where it will pick up the mach3.chd lurking in your j:\mach3
folder. Several basic commands are supported:
Space = play/pause
Alt = toggle frame display
Left = scan forward (when playing) or step forward (when paused)
Right = scan backward (when playing) or step backward (when paused)
0-9 = enter numbers for search
Enter = execute search to frame
item will be visible but not selectable.
Fixed bug that prevented the cheat engine from working when the
debugger was disabled.
Modified xmlfile.c to accept integer values in decimal or hex. The
default is decimal. Numbers may be prefixed by '#' for decimal
values, or by '$' or '0x' to indicate hexadecimal values. Also
added function xml_get_attribute_int_format() to return the format
of the attribute, so that it can be later replicated.
Updated cheat parser to preserve the format of attribute values
used for cheat parameters and items.
Added support for information-only cheat items, which will be
displayed in the menu but which are not selectable and have no
action associated with them. Empty information-only items are
automatically converted to menu separators.
The structures/names were getting too complex for my macros to handle. They would require hand editing and my computer is too slow to keep re-compiling.
Passes a clean compile.
Removed channels parameter from avcomp decode configuration.
Fixed incorrect test in winwork that led to spinning instead
of using the nicely allocated events we had on hand.
Forced a sound synchronization on each vsync in the laserdisc
playback. This prevents overwriting the tail end of the
buffer which was fouling up the MACH 3 audio decoding.
Removed obsolete size check for uncompressable audio data.
streams and a delta-RLE pre-encoding. Added optimized
case for the Y/Cb/Y/Cr video encoding case. Cleaned up
the code.
Updated avcomp.c to use the new huffman.c functions.
Reworked configuration options to allow for both input
and output of naturally aligned data streams. Updated
chdman and laserdsc to use the new interfaces. New
compression gives an additional 3-7% over previous
attempt and compresses the dummy CHDs down significantly.
I did not do much to the following files because I did not know the best way to name them.
aicadsp.h
sid.h
sidenvel.h
sidvoice.h
ymdeltat.h
I did not update structures only used in the src\emu\sound\*.c files. They are only used locally in the file so they were not worth the effort.
- Pass chip type around and restore Jarek's original behavior for YM2203/YM2610
- Always recalculate attack rate in set_ar_ksr, fixes Megadrive/Genesis "Batman & Robin"
What a PITA. :) I'll have to go back and do A-J to lower case the handlers to match the new structure names I already did.
Sorry Mess and other port developers, but the code should match what is stated on the official WIKI. But don't worry, I don't plan on updating anything but the sound cores.
You may have to do a clean compile, or delete the affected driver object files.
struct C140interface to c140_interface
struct cem3394_interface to cem3394_interface
struct ES5503interface to es5503_interface
struct ES5505interface to es5505_interface
struct ES5506interface to es5506_interface
struct ssg_callbacks to ssg_callbacks
struct gaelcosnd_interface to gaelcosnd_interface
struct ics2115_interface to ics2115_interface
I'll stop until my posted question about chip names and upper case is answered.
FWIW, I first check for variables named name_interface and rename them as name_cofig, so they don't conflict with the new interface names.
struct YMF262interface to ymf262_interface
struct YM2151interface to ym2151_interface
struct YM2203interface to ym2203_interface
struct YM2608interface to ym2608_interface
struct YM2610interface to ym2610_interface
struct YM2612interface to ym2612_interface
struct YM3812interface to ym3812_interface
struct Y8950interface to y8950_interface
struct YM3526interface to ym3526_interface
struct TMS5110interface to tms5110_interface
struct TMS5220interface to tms5220_interface
struct AICAinterface to aica_interface
struct CustomSound_interface to custom_sound_interface
struct Samplesinterface to samples_interface
struct SN76477interface to SN76477_interface
struct AY8910interface to AY8910_interface
memory regions. Extended error codes to report incorrect memory
spaces, memory names, or memory sizes. Added verification callback
to the debugger to validate CPU and memory region names, as well
as verifying that a requested address space exists for a given
CPU.
Added support for oneshot cheats (those with only an "on" script).
They are activated via UI_SELECT in the cheat menu, and pop up a
message when activated. Also added a "Reset All" item in the cheat
menu to reset all cheats back to their default state, and added
support for UI_SELECT on a non-oneshot cheat so that it resets that
cheat to its default value.
Restored previous behavior that allowed popmessage() messages to
overlay menus and other UI.
+ plus
- minus
* times or mul
/ div
% mod
! not
~ bnot
&& and
& band
|| or
| bor
^ bxor
lt <
le <=
gt >
ge >=
eq ==
ne !=
Changed cheat escaping to automatically escape && & < and <=
to and band lt and le.
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: to simplify cischeat inputs
Hi,
the enclosed diff has a twofold effect on cischeat.c:
on one side: it adds diplocations to bigrun, scudhamm,
cischeat & f1gpstar
on the other side: it removes the current hacky handling of
f1gpstar coinage dips (check video/cischeat.c to see what I
mean with hacky!) to use conditional ports instead. BUT in
order to do this, I had to add more possible values for the
PORTCOND in iptport.c. The problem is that f1gpstar has a set
of coinage settings when you set the region to JPN or USA and
another one when you set the region to EUR or FRA. To implement
this I added the following self-explanatory new PORTCOND:
ISLARGER (>), ISNOTLARGER (<=), ISSMALLER (<), ISNOTSMALLER (<=).
Only two were really needed to implement f1gpstar dips, but
the other two seemed costless to me while offering even more
flexibility to the PORT_CONDITION macro.
Also notice that the handling of conditional ports in 'TAB>Dip
Switches' menu doesn't work well (in the current source, not
affected by my patch) with contracted expressions like
PORT_DIPUNKNOWN_DIPLOC: the wrong items remain listed in the
UI menu even when you change the condition! If you leave the
DEF_STR( Unknown ) with ON/OFF cases, everything is displayed
correctly in the menu. However, I was not able to track down
what part of code is responsible for this bug.
Regards,
Fabio Priuli
PORT_START_TAG to PORT_START.
From: Fabio Priuli [mailto:doge.fabio@gmail.com]
Subject: let's say goodbye to untagged input ports ;)
Hi,
enclosed please find a few patches against 126u3 source
* port01.diff -> port09.diff : these patches continues the
cleanup of inputs in drivers starting with C (the remaining ones),
D and E. No ambiguous situations this time, so I guess there should
be no problem with the changes. Improvements include conditional dips
added to dynduke and diplocations for chinagat, chqflag, circus,
citycon, cloak, contra and dynduke
* tag01.diff -> tag09.diff : these patches add tag to EVERY input port
in drivers starting with F->Z. Notice that only tags are added, no
AM_READ_PORT, nor PORT_INCLUDE (and I saw a lot of drivers would need
it ;) ), nor other cleanups contained in the patches above. I'll keep
cleaning input next week, probably, but at least we can definitely
remove the untagged version of PORT_START :) Notice I was able to
compile the source commenting out the definition of PORT_START, so
I guess every occurrence is covered...
- new tag <comment> (within <cheat>) is read and preserved
when saved
- removed variable attribute from <parameter>; it is now
assumed to be 'param'
- added default attribute for <parameter>
Added new variable 'frame' accessible from cheat scripts. This
can be used in the conditional to prevent execution on every
frame, or for other effects (like displaying temporary messages).
Added new variable 'argindex' which is the index when processing
an <argument> with a count attribute greater than 1. Can be used
in expressions like:
<argument count="3">main.pb@(1000+argindex)</argument>
Reinstated the cheat menu. It now displays all loaded cheats and
allows for them to be activated. All known cheat behaviors should
be working now.
* moved a couple of exp(x) from _step into _reset where appropriate
* use tabulated function values for the transfer function in DSS_INVERTER_OSC
==> 40% speed increase in dkong - from 520% to
$ ./mame64 -noautosave -nothrottle -str 30 -video none dkong -nomt -nosleep
Average speed: 722.48% (29 seconds)
tool which walks through either an AVI or CHD capture from a
laserdisc and ensures that there are no anomalies lurking in
the VBI data.
Added new option to chdman, where if you use -createav with
a special filename (either 2:2 or 3:2) it will create a fake
laserdisc files with the equivalent cadence. This can be used
for testing until full captures are available. Most games used
2:2 apart from Dragon's Lair and Space Ace, which were 3:2.
Note that even though these files are essentially blank, they
are Huffman-compressed, meaning that the maximum compression
ratio you will get is 8:1, so they still end up ~5GB.
Moved error strings from chdman.c to chd.c, where they can be
fetched from any caller via the new chd_error_string()
function.
Updated vbiparse to improve Manchester code decoding. It now
assigns a confidence level per bit based on how solid the
data is. Also added a new function vbi_parse_all which parses
the white flag and all three lines of metadata from a
laserdisc frame. It then compares line 17 and 18 against each
other and selects the most likely candidate based on per-bit
confidence and other factors.
Added frame number display to laserdsc.c. It is off by
default, though most players can be configured to turn it on
(not sure if any actually do). It can be manually toggled via
the backslash key during playback.
Commander (MACH 3 hardware). Old laserdisc hacks are now removed.
The code now talks to the standard Pioneer PR-8210 interface. Also
removed hacky "target list" from the MACH 3 ROMs; this information
is now decoded on the fly from the right channel laserdisc audio.
Other Gottlieb cleanups:
- moved sound inputs to audio/gottlieb and included them in
all relevant drivers
- ordered input ports and ROM definitions consistently
Other laserdisc changes:
- changed PR-8210 interface to work consistently for both Gottlieb
and Stern games
- added audio callback mechanism to allow drivers to peek at the
raw audio streams
- extended the VBI parser to be even more lenient
Instead, they are identified by the region they were loaded in. This
generally means one disk per region. get_disk_handle() now takes a
region name in place of an index. Updated all callers to do this.
The SCSI modules in particular posed a challenge to make this work,
so watch out for potential bugs there.
Changed the IDE interfaces to default to choosing the region with the
same tag as the device for its master disk (assuming no slave). Added
support for specifying explicit master/slave disk regions as part of
the configuration, though slave disks are still not supported yet.
Change the laserdisc interface to no longer require a disk number or
a custom sound device. Both are now assumed to be tagged the same as
the laserdisc device. Updated all drivers accordingly.
maps and behaviors according to the schematics. Hooked up coin
counters.
Added new functions cputag_set_input_line() to assert input lines
via CPU tag instead of index.
now simply requires an AVI file input.
Relaxed VBI Manchester code clocking to allow for a little bit
of wiggle when finding the clock.
Changed laserdisc support to parse white flags and other data
from the VBI data directly, rather than relying on the textual
metadata. Expanded video frame cache to 3. Changed the way
frames are assembled to decrease the likelihood of getting an
interlaced weave. Fixed sound creation so that it is done at
reset time instead of device start, when the sound devices aren't
yet live.
Fixed bug in winwork that caused the creation of single work
items to return NULL, and thus lead to massive memory leaks when
using A/V CHDs.
Removed the Enable line from the DISCRETE_ADJUSTMENT modules. They should never be disabled.
Some before/after speed tests:
dkong - from 203% to 204%
firetrk - from 418% to 429%
phoenix - from 253% to 257%
polaris - from 448% to 476%
to whole functions. The other one I'm not so sure about. Commented
code is usually hilighted differently, making it very easy to spot.)
Hi mamedev,
This set of patches has one aim only, to identify chunks of code that
have been disabled by the use of C/C++ comments, and to disable them
instead by using the preprocessor. The C comment approach to
disabling code isn't safe (embedded comments will trip it up), and the
C++ comment approach isn't elegant (you shouldn't need to touch every
line to disable a chunk of code). Using #if...#endif is preferable
always, excepting perhaps if (0) { ... }.
The patch has three parts. The first only handles cases where full
functions were disabled. The second handles cases where parts of
functions were disabled. The third then tries to restore the
whitespace that the use of comments converted from tabs to spaces via
srcclean.exe. It also cleans up the whitespace in a handful of the
files in areas outside of the original two patches.
~aa
Subject: a few cleanups
This patch contains:
- removal of unprintable chars (newlines) in SH-2 disassembler (I
submitted this in the past nd it wasn't included)
- a few unnecessary checks after malloc_ort_die() calls
- changes two romload.c warnings to use GAMENOUN instead
- adds "deprecat.h" in a few src/mame/drivers files (would be
necessary, if the debugger.h one would be removed)
- cleans up the mame.mak by adding all missing defines and grouping
them based on cpu.mak
- renamed video_exit() to winvideo_exit() for consistency in function
names
files. Removed old option 'cheat_file'.
Updated xmlfile.c to specify the line number for each node, for more
accurate error reporting.
Removed old cheat.c/.h and replaced them with code that will read and
write the new XML-based cheat format using the new cheatpath option
(cheats still need to be enabled in order to load at all). Note that
the cheats are not implemented yet, but they are fully parsed. To test
saving, whenever a cheat file is successfully loaded, it is immediately
written back out as 'output.xml' to the cheat directory for validation.
The ROL/ROR/SHL/SHR opcodes provide the carry flags typically generated by
almost all CPUs. The RORC/ROLC opcdes map directly to the rotate through
carry of most CPUs as well.
auto-filled by the device manager before starting the device. This
simplifies the auto-binding process for devices.
Added new selector for device-specific ROM regions. Not yet wired
up in the ROM loader.
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Stricter ADDRESS_MAP checks
Hi mamedev,
The current implementation of address maps is lacking some useful
checks of the initial tokens. In particular, it doesn't validate that
a particular entry doesn't try to define the same handler multiple
times.
The attached patch adds this and some other validations as fatalerrors
in address_map_detokenize, and fixes the affected maps. The errors
generally fall into the following categories.
1. AM_RAM AM_WRITE(...). Should have been AM_RAM_WRITE(...)
2. AM_RAM AM_READWRITE(...). The AM_RAM is a NOP.
3. AM_RAM AM_RAMBANK(...). The AM_RAM is a NOP.
4. AM_ROM AM_ROMBANK(...). The AM_ROM is a NOP.
5. AM_ROM AM_READ(...). The AM_ROM is a NOP.
One peculiar error was in equites.c, where there were two AM_BASE
entries.
~aa
second SH2 for ST-V games.
Fixed buffer overrun in latest SCSP code. Not sure how that ever
worked.
colmns97 still asserts in SCSPDSP, but this happened before the
region change.
integer value, regions are now referred to by a region class and
a region tag. The class specifies the type of region (one of CPU,
gfx, sound, user, disk, prom, pld) while the tag uniquely specifies
the region. This change required updating all the ROM region
definitions in the project to specify the class/tag instead of
region number.
Updated the core memory_region_* functions to accept a class/tag
pair. Added new memory_region_next() function to allow for iteration
over all memory regions of a given class. Added new function
memory_region_class_name() to return the name for a given CPU
memory region class.
Changed the auto-binding behavior of CPU regions. Previously, the
first CPU would auto-bind to REGION_CPU1 (that is, any ROM references
would automatically assume that they lived in the corresponding
region). Now, each CPU automatically binds to the RGNCLASS_CPU region
with the same tag as the CPU itself. This behavior required ensuring
that all previous REGION_CPU* regions were changed to RGNCLASS_CPU
with the same tag as the CPU.
Introduced a new auto-binding mechanism for sound cores. This works
similarly to the CPU binding. Each sound core that requires a memory
region now auto-binds to the RGNCLASS_SOUND with the same tag as the
sound core. In almost all cases, this allowed for the removal of the
explicit region item in the sound configuration, which in turn
allowed for many sound configurations to removed altogether.
Updated the expression engine's memory reference behavior. A recent
update expanded the scope of memory references to allow for referencing
data in non-active CPU spaces, in memory regions, and in EEPROMs.
However, this previous update required an index, which is no longer
appropriate for regions and will become increasingly less appropriate
for CPUs over time. Instead, a new syntax is supported, of the form:
"[tag.][space]size@addr", where 'tag' is an optional tag for the CPU
or memory region you wish to access, followed by a period as a
separator; 'space' is the memory address space or region class you
wish to access (p/d/i for program/data/I/O spaces; o for opcode space;
r for direct RAM; c/u/g/s for CPU/user/gfx/sound regions; e for
EEPROMs); and 'size' is the usual b/w/d/q for byte/word/dword/qword.
Cleaned up ROM definition flags and removed some ugly hacks that had
existed previously. Expanded to support up to 256 BIOSes. Updated
ROM_COPY to support specifying class/tag for the source region.
Updated the address map AM_REGION macro to support specifying a
class/tag for the region.
Updated debugger windows to display the CPU and region tags where
appropriate.
Updated -listxml to output region class and tag for each ROM entry.
- Fixed ADPCM decoder to remove bad optimization and match YMZ280B. DC offset is fixed and output quality is higher
- Improved handling of slot monitor and timers B and C
- Simplified interpolation code
- Rewrote core logic, communications, and interfaces.
- Added three parallel memory moves to the disassembler.
- Initial interrupt logic in place.
Plygonet.c updates.
- All communication hacks have been removed.
- Memory maps have been temporarily reverted while new DSP56k cpu core catches up.
Subject: [patch] Conditional code cleanup resubmit
Hi mamedev,
This is a resubmit of a previous patch. The earlier version would not
compile with 32-bit MSVC, due to the fact that its linker required
external dependencies in dead code to be met before dead code
elimination was done, causing linker errors. The proper fix for this
would be to add the necessary dependencies, so I instead simply left
the conditional code in place in winalloc.c and chd.c.
~aa
Original submission email below:
----
Conditionally compiled code tends to bitrot, so MAME should try to
avoid it as much as possible. I sent a patch six months ago to
eliminate conditional code associated with logging, here's another
patch that does more of this. Some notes:
1. drc_ops.c: I couldn't find a LOG_CODE anywhere, so I used if (0).
2. romload.c: I converted all the users of debugload to use
LOG((...)) instead, following the traditional conditional logging
pattern.
3. windows/sound.c: I eliminated the separate sound log and directed
the few outputs to the error log.
~aa
Subject: [patch] .data removals to fix reset/multisession bugs
Hi mamedev,
One nice artifact of properly constifying data structures in MAME is
that it makes it relatively easy to spot a class of reset/multisession
bugs, namely that almost any object in .data is probably in error.
Unless the value is properly initialized in a reset routine the
initial non-zero value can't be relied upon, so there's no need to
have a non-zero value to begin with.
With that in mind, here's a patch to move more items out of .data by
either applying const, removing the non-zero initializer (if its
overwritten by init/reset) or by adding appropriate initialization
code. In most cases I tried to add initialization code to a reset
routine, but in some cases I chose an init routine, possibly leaving a
reset bug intact.
Some interesting bits:
1. tms9900 core. The use of .data to initialize the irq_level wasn't
correct in some cases as the layout of the structure was core
dependent.
2. bfcobra.c. By introducing a VIDEO_START routine a hack in
VIDEO_UPDATE could be removed.
~aa
Subject: 8257dma
Hi Aaron,
Small changes for 8257.
Fixed terminal count stop for autoload mode and added callback function existance check [Miodrag Milanovic]
Regards,
Miodrag
convert between attotimes and a clock tick at an integral frequency.
Changed the 6532 RIOT device into a proper device. Rewrote the
logic to be simpler and leverage the new attotime functions. Changed
the I/O port setters to specify a mask, and changed the I/O port
callbacks to pass in the previous value. Updated tourtabl and
gameplan drivers to use the new device interface.
Converted audio/starwars.c, audio/exidy.c, and audio/gottlieb.c to
use the new RIOT implementation instead of rolling their own.
Began gottlieb.c cleanup. Converted palette calculations to resistor
weights. Corrected video timing. Reduced the number of separate
machine drivers. Fixed incorrect spriteram sizes. Populated full
memory maps for the main CPU and the rev 1 sound board. More to
come.
- Rearranged decoding behavior.
- Updated code style to MAME standards.
- Tested each single-word opcode with custom ROMs.
(This is a precursor to other major dsp56k changes I have made. I just gotta' get plygonet commanders up and running to do some tests)
- TGP now correctly uses table roms (model1/2 updated accordingly)
- removed FIFO hack on srallyc (game now runs)
- added analog ports reading for model 2A/B/C
- fixed some loading instructions in the TGP. that fixes srallyc automatic transmission bug
Added validity checks to ensure no duplicate sound or CPU tags.
Fixed several duplicate sound tags from the last checkin.
-listxml now outputs the tag names for CPUs and sound chips.
well, the fix is not that but changing them this way:
program_write_dword_32le(i960.r[I960_FP]-16, i960.PC);
program_write_dword_32le(i960.r[I960_FP]-12, i960.AC);
in take_interrupt.
It seems it came from a partial fix in the ret instruction. the manual says that PC is saved at FP-16 and AC at FP-12
it was reversed in mame, so when trying to fix it, i suppose Ernesto forgot to change the push too.
I've tested this fix and apart from having daytona working, pilot kids 2A works too (that I think has been broken for ages).
MDRV_SOUND_ADD. All sound chips must now include a tag.
Laboriously changed all existing drivers to define a
unique tag for each sound chip.
CPUs are next, but will require a more hands-on manual
process to produce reasonable tags.
properly ignore the "break into debugger" keypress and not allow
related characters to filter through. Removed some hacks related to
making that work in the past.
Changed osd_wait_for_debugger() to take a machine parameter and a
"firsttime" parameter, which is set to 1 the first time the function
is called after a break. The Windows debugger uses this to ensure
that the debugger has focus when you break into it.
EEPROM data, and the size is in terms of units, not bytes. Updated all
drivers accordingly.
Changed the ROM loading code to actually alter the region flags based
on the CPU endianness and bus width when creating the region, rather
than fixing them up on the fly. This means that callers to
memory_region_flags() will get the correct results.
Changed the expression engine to use two callbacks for read/write rather
than relying on externally defined functions.
Expanded memory access support in the expression engine. Memory accesses
can now be specified as [space][num]<size>@<address>. 'space' can be
one of the following:
p = program address space of CPU #num (default)
d = data address space of CPU #num
i = I/O address space of CPU #num
o = opcode address space of CPU #num (R/W access to decrypted opcodes)
r = direct RAM space of CPU #num (always allows writes, even for ROM)
e = EEPROM index #num
c = direct REGION_CPU#num access
u = direct REGION_USER#num access
g = direct REGION_GFX#num access
s = direct REGION_SOUND#num access
The 'num' field is optional for p/d/i/o/r, where is defaults to the
current CPU, and for e, where it defaults to EEPROM #0. 'num' is required
for all region-related prefixes. Some examples:
w@curpc = word at 'curpc' in the active CPU's program address space
dd@0 = dword at 0x0 in the active CPU's data address space
r2b@100 = byte at 0x100 from a RAM/ROM region in CPU #2's program space
ew@7f = word from EEPROM address 0x7f
u2q@40 = qword from REGION_USER2, offset 0x40
The 'size' field is always required, and can be b/w/d/q for byte, word,
dword, and qword accesses.
- All games on all drivers should work as before except "colmns97" and "stress" which crash due to sound system trouble.
- All idle skips are still included. They are quite a bit less effective than they were on the interpreter, but they still give a boost.
- Fast RAM bypass is not included yet so this does not represent final performance. That said, it's consistently faster than the interpreter even now. Example: sfiii3 on 0.126 gets 609% on the interpreter and 961% on the DRC.
Major thanks to Aaron for his assistance with several sticky core bugs and other issues encountered writing this.
lurking. If you run into anything odd, please let me know.
Added new module uiinput.c which manages input for the user interface.
The OSD is responsible for pushing mouse events and character events
to this interface in order to support mouse movement and text-based
input (currently only used for the select game menu). Added support
for navigating through the menus using the mouse.
[Nathan Woods, Aaron Giles]
Redesigned the UI menus so that they can maintain a richer state. Now
the menus can be generated once and reused, rather than requiring them
to be regenerated on each frame. All menus also share a comment eventing
system and navigation through them is managed centrally. Rewrote all the
menus to use the new system, apart from the cheat menus, which are now
disabled. Reorganized the video menu to make it easier to understand.
[Aaron Giles]
- Roll back older periodic function
Now standard/old format work in this function
Otherwords, several operations which doesn't exist in older
function and added recently are now disabled
- Separated load_cheat_code() to 3 indipendent functions
And added new cheat options, "Load New/Standard/Old Format Code"
(Default : load all format codes)
NOTE : delete all cheat options in the database before start
or reload default options (Shift + Reload key)
in cheat general menu
- Added format strings structure to accept huge size strings
in loading a database to prevent from breaking other strings
- Changed Link in new format
Label code is now "Link-Label" and sub-label is "Label-Sub-Link"
"Standard-Link" is no longer label
- Added choose_label_index() to manage label selection
- Fixed build_label_index_table() to prevent from crashing
And disabled to build label index table in case of
standard/old format
- Fixed memory free problem in case of standard/old code
- Fixed several reported/found bugs
* marked IDT instructions for R4650 only
* accounted for time taken in throwaway likely branch slots
* fixed jalr to respect the correct link register
* fixed c.eq, c.lt, c.le to fail if unordered
* fixed swxc1, sdxc1 to use the correct source register (fixes many Gauntlet problems)
* fixed CCR31 display in debugger
* fixes assert: src/emu/video.c:664: visarea->min_x < width
* Test whether screen type is vector and ignore min_x < width in this case
* This affected a number of vector games and the only other fix would be to rewrite the vector code
Subject: another Machine -> machine cleanup
This cleans up most of the Machine stuff in src/emu/machine. There is
a bit left to clean up, but it's mostly stuck at some interfaces now.
Subject: [patch] make MSVC_BUILD=1 -j<n> build fix
Hi mamedev,
The following build tweak fixes make MSVC_BUILD=1 -j2. It also fixes
an oversight in the cross-build support.
~aa
Subject: [patch] Fix minor CPU/SOUND core build issues
Hi mamedev,
This small patch fixes a few build problems with the cpu/sound cores
M65CE02, ALPHA8201, TMC0285, TMS5200 and corrects the dependencies for
the mips core.
~aa
macro from the source code. All MAME builds now include
the debugger, and it is enabled/disabled exclusively by
the runtime command-line/ini settings. This is a minor
speed hit for now, but will be further optimized going
forward.
Changed the 'd' suffix in the makefile to apply to DEBUG
builds (versus DEBUGGER builds as it did before).
Changed machine->debug_mode to machine->debug_flags.
These flags now indicate several things, such as whether
debugging is enabled, whether CPU cores should call the
debugger on each instruction, and whether there are live
watchpoints on each address space.
Redesigned a significant portion of debugcpu.c around
the concept of maintaining these flags globally and a
similar, more complete set of flags internally for each
CPU. All previous functionality should work as designed
but should be more robust and faster to work with.
Added new debugger hooks for starting/stopping CPU
execution. This allows the debugger to decide whether
or not a given CPU needs to call the debugger on each
instruction during the coming timeslice.
Added new debugger hook for reporting exceptions.
Proper exception breakpoints are not yet implemented.
Added new module debugger.c which is where global
debugger functions live.
- Merged 3 different search menu functions to search_main_menu()
- Added new cheat options, "Vertical/Horizontal Key Repeat Speed"
NOTE : delete all cheat options in the database before start
or reload default options (Shift + Reload key)
in cheat general menu
- Changed assignment of Entry for Activation Key and Pre-enable
command code. Now there are check the tag in comment field
instead of index number. But it's only for new format command
and old is as before
- Added tag output in save_activation_key() and save_pre_enable()
- Cleaned up save_cheat_options() to output description
- Changed memory read function in watchpoints
No longer "Debugger" watchpoint mis-hit "Cheat" watchpoint
- Fixed several reported/found bugs
- Renamed funcitons/enum based on coding guidlines
All functions are completed in this update
- connected EEPROM (doesn't seem to affect much)
- cleaned up system register access
GTI Club driver:
- altered network IRQ clear to fix several problems
- added Guru readme
- fixed crashes due to missing inputs
- gticlub "works" again
ZR107 driver:
- added Guru readme
- cleaned up system register access
- these games work again with altered network IRQ timing
NWK-TR driver:
- added Guru readme
DRC frontend:
- now passes pointer to previous instruction when describing
PPC frontend:
- attempts to roughly take into account branch and CR logical
folding in timing computations
- Added configurable i8x41/i8x42 subtype support.
- Fixed carry flag handling in ADDC A,#N instruction.
- Fixed carry flag handling in RLC A instruction.
* added save state support to the SHARC CPU core
* added save state support to the PowerPC recompiler
* added save state support to the virtual TLB system
* added save state support to the RF5C400 sound core
* added save state support to konppc module
* added save state support to K056800 host controller
* added save state support to the Konami hornet driver
Fixed poor default CLUT handling in the voodoo driver
Subject: [patch] memory_region madness reloaded
Hi mamedev,
The memory_region and memory_region_length functions are probably the
two most common functions in MAME that don't take a machine parameter
but should given the syntax of the related apis memory_region_type and
memory_region_flags. Clearly they didn't get the parameter because of
the sheer number of changes needed to change the apis. This pair of
patches makes the change, and deals with the consequences.
The second patch then changes the api for memory_region and
memory_region_length, and fixes the fallout. It generally plumbs
through machine parameters where needed, except for the case of sound
apis which I deferred doing so till later. This increased the number
of deprecat.h includes by ~50. Given it is a massive patch, there are
bound to be a few mistakes in it (I had to make ~20% of the changes by
hand), but I exercised care and reviewed the patch several times to
minimize the problems.
Subject: [patch] memory_region madness reloaded
Hi mamedev,
The memory_region and memory_region_length functions are probably the
two most common functions in MAME that don't take a machine parameter
but should given the syntax of the related apis memory_region_type and
memory_region_flags. Clearly they didn't get the parameter because of
the sheer number of changes needed to change the apis. This pair of
patches makes the change, and deals with the consequences.
The first patch makes some changes to help the second patch
along, as well as moves some uses of the memory_region apis within for
loops outside the loops.
* added save state support to the MIPS3 recompiler
* added save state support to CAGE audio system
* added save state support to the voodoo emulator
* added save state support to the smc91c9x emulator
* added save state support to the kinst, seattle, and vegas drivers
* fixed core video handling of save states with dynamic screen resolutions
SMC91C9x:
* converted to proper device
* updated seattle and vegas drivers to allocate devices
* added separate 91C96 device for eventual 2049 use
* cleaned up code
Removed call to discrete_reset() in the initialization code. It is already
called by the sound system during reset, at which point it is safe to read
input ports.