* read_pla() leaves the PLA outputs packed, instead of using eight output parameters to return them
* flatten nested switch statements in read_memory() and write_memory()
* mos6566: inline bus_r() and various READ_LINE_MEMBERs
(nw)
from 285% to 300% idling at basic prompt with default slot devices (c1541, no cartridge)
About half the speedup comes from read_pla() refactoring, the other half comes from flattening the switch()es.
The verify drive command (0x07) is used by the "format check" options
of both the Corvus diagnostics program and the SSE HardBox configure
program. Previously, format check would halt with an error because we
did not return a valid response for the verify drive command. Format
check now completes successfully and reports no bad sectors.
nw: The speedup is only really gaudy on CPS-3 where the SH-2 is a major percentage of the frame time (800% -> 1250% unthrottled). SKNS games that access spriteram a lot (cyvern) get a decent speedup as well. Saturn/ST-V and Cool Riders are dominated by the rendering in profiles and get around 10% improvement depending on the game.
(nw)
This precalculation seems to be part of OG's "CPU core template", as all CPU
cores written by him do it. It's used to optimize things like onboard serial
ports and high-frequency timers; however, the m6502 and its derivatives have
neither onboard serial ports nor high-frequency timers, and the precalculation
is simply a boat anchor on drivers with 6502-family CPUs and tight interleaving.
mess c64 benchmarks (3.4 GHz Sandy Bridge i5; 64-bit Linux GCC 4.8 build)
before:
[awj@localhost trunk]$ ./mess64 -window -bench 60 c64
Average speed: 238.17% (59 seconds)
[awj@localhost trunk]$ ./mess64 -window -bench 60 c64
Average speed: 236.36% (59 seconds)
after:
[awj@localhost trunk]$ ./mess64 -window -bench 60 c64
Average speed: 279.93% (59 seconds)
[awj@localhost trunk]$ ./mess64 -window -bench 60 c64
Average speed: 279.30% (59 seconds)
[MESS] vtvideo.c): finally fix smooth scrolling (ED084 = 1). See DIAG DISK -> VIDEO TEST -> screen 3 (Rainbow driver - SKIP 0). [Bavarese]
[MESS] atari400.c - Slightly revised Atari XL cartridge loading so that it doesn't crash when loading 8K carts. Confirmed to fix MT#05108. [alegend45]
Description fix from MASH for chihiro.c. (nw)