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.
1) refactors many global and static variables in video\dc.c into a
structure to hold the tile accelerator state
2) textures should be better decoded with more pixel formats
3) adds placeholders for some register probably used by the dimm board
4) corrects a little error in a rom board register (very important, now at
least the gdrom games try to start)
Sent: Sunday, July 27, 2008 2:46 PM
To: submit@mamedev.org
Subject: misc patches
Hi,
enclosed please find a few more patches based on 126u2. It's just a few
minor bugfixes because I'm quite busy and I still have to test the other
changes to tagged inputs (I will send them in the next few days)
In misc2.zip you'll find a few corrections to my previous patches and a
few new bugfixes:
* cachat.diff: It fixes bug 2046. This is a bug I introduced misreading
the default value of the flip dip when updating taito_l.c to use
taitoipt.h definitions. My bad, sorry.
* witch.diff: It fixes another small 'mistake' I introduced when tagging
the ports in witch.c. I searched and replaced a few too many 'port'
occurrences, making some comments unreadable. Again, sorry for the
inconvenience.
* btime.diff: It's an updated version of my previous patch, following
your suggestions. 'Off' comes always first now and manual settings which
do not work on the emulated game are commented out
* skyfox.diff: It fixes bug 2050. Being at it, I also added dip
locations to the driver and updated memory maps to use AM_READ_PORT
* combatsc.diff: It fixes bug 456, solving both the regression which
made disappear all sprites (they were covered by the non-transparent
text layer since 118u1) and the corruption of the graphics in title
screen (due to the wrong drawing order). Mind that bug 400 (scrolling
problems present since 0.79) is not fixed yet, unfortunately.
Regards,
Fabio
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.
- Pre-defined CPU and SND clocks.
- Switched the color system to RESNET calculations.
- Completed the remaining DIP switches.
- Added lamps support. Created a layout to show them.
- Changes on the interrupt system (need to be verified on the PCB).
- Renamed the graphics regions to more descriptive names.
- Corrected the manufacturer's name.
- Splitted the driver to driver + video.
- Updated technical notes.
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
Sent: Wed 7/23/2008 8:15 AM
To: submit@mamedev.org
Subject: more input patches
Hi,
with the attached diff I started drivers with C. Added all the missing
tags, made more extensive use of PORT_INCLUDE where possible and added
AM_READ_PORT where suitable. I also added dip locations for: cabal,
canyon, cbuster, cclimber, swimmer and guzzler.
Patch for cave.c is separated in case fix for bug 1681 has been submitted
and accepted (changing maybe the driver)
Regards
Fabio
Sent: Tue 7/22/2008 11:30 AM
To: submit@mamedev.org
Subject: Demon's world set 5
Enclosed another revision of Demon's World (my pcb has the jumpers set
to japan).
I renamed the other sets because in my opinion the code needs to be
studied before saying what's older and newer revisions.
Demon's World / Horror Story (set 5)
Sent: Tue 7/22/2008 11:30 AM
To: submit@mamedev.org
Subject: more tags and AM_READ_PORT
Hi,
with the following patches I added tags to all ports (and used AM_READ_PORT
in the memory maps of all the drivers which didn't) in drivers starting with
B. I also added diplocations and factory settings for the games which had
either a manual or a dips listing at crazykong (and to squaitsa, thanks to
a scan from f205v) [1]. A couple of patches are separated from the main ones
because they contain changes which could need additional review
In details:
* diffB01->diffB07 contains standard addition of tags and AM_READ_PORTS to
driver starting with B (a diff each 4/5 drivers).
* bsktball.diff adds diplocations to the driver, but also removes the fake
handling of P1 Start/P1 Button1. Since other games have no separate P1 Start
in MAME (e.g bagman, or joust2 as noticed in the invalid bug 1734), I
personally see no reason to duplicate inputs in this game.
[1] In details, I added locations to: bwidow.c & bzone.c games, bestleag,
blackt96, bogeyman, bombjack, boogwing, bottom9, brkthru, darwin, buggychl,
squaitsa, btime, bnj, lnc, zoar and disco