I was recently doing some testing on a contra board around the 007121 IC and found the following
- There is no sprite limit, but instead a 264 8x8 sprite block limit
- There is no buffering of sprite data on the attached SRAM
From this the follow changes have been made
- Use the 264 8x8 sprite block limit to determine number of sprites that should be rendered
- Remove sprite ram buffering, and move logic for picking sprite ram bank into k007121.cpp
- Comment updates related to the limit and non-buffering
Additionally the high bit of tiles are stored in one of the control registers, if this bit changes all tiles should be marked as dirty.
These changes fix a number of sprite related issues on games using this chip
mametesters 00185 (combatsc: missing sprites)
mametesters 00401 + issue #7957 (contra: left over sprites)
It's possible for a device format property update to block an activate
call. There's still a race condition in that if streams get device
invalidated errors before the property update arrives, the core may try
and fail to create replacement streams. This at least stops it from
causing a deadlock, at worst you lose sound.
* sega/model2: renderer improvements
Texture mirroring is now implemented correctly (carpet in Sonic the Fighters and pitch markings in Virtua Striker)
Fixed broken textures for trees in Sega Rally and mountain in Super GT 24h
* sega/model2_v.cpp: use std::clamp for luminance
* bx: Small platform detection/usage improvements
* Use BX_PLATFORM_POSIX where needed
The semaphone implementation already uses BX_PLATFORM_POSIX to include
<pthread.h> on all the POSIX platforms; do the same also in other places
for consistency. This is done also for <sched.h>, which is a POSIX API,
and sched_yield() from it is already guarded by BX_PLATFORM_POSIX.
* Drop support for GNU libc older than 2.12
glibc 2.12 was released on 2010, and at this point any supported Linux
distro has that version or way greather than that.
From bkaradzic/bx@b59b7debd3
* bx: fix <pthread/pthread.h> include on Hurd
<pthread/pthread.h> does not exist, the standard <pthread.h> does exist
so switch to it.
* osd/modules/file: use dirent::d_type on any GNU libc platform
This BSD extension is provided by GNU libc, so enable its usage with
that C library.
* osd/modules/file: use <pty.h> on any GNU libc platform
openpty() is implemented by GNU libc for all the OSes, so include
<pty.h> when using that C library.
* osd/modules/file: cast dirent::d_name to const char* before using it
According to POSIX [1], the type of dirent::d_name is loosely defined
as "char d_name[]", as array with an undefined size. In particular, few
ways are seen in the wild:
(a) "char d_name[size]", i.e. as proper array with a full size
(b) "char d_name[1]"/"char d_name[0]", i.e. as C flexible arrays
Regardless of its type, dirent::d_name is used as if it was a classic
const char *, i.e. as pointer to a null-terminated string.
util::string_format() uses C++ templates to collect all the arguments,
and thus it will use the actual type of dirent::d_name. In case of (a)
there is no issue, however for (b) the result is that only the first
character is used.
To ensure that dirent::d_name is fully used, explicitly cast it to
const char * before passing it to util::string_format(), so the whole
string is used.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dirent.h.html
New working software list additions
--------------------------------------------
Attack of the Petscii Robots [no-intro]
Black Jewel Reborn (demo 2.1) [PSCD Games]
Black Jewel Reborn (demo 2.11) [PSCD Games]
Captain Barrel (demo) [OzzyOuzo]
Earthworm Jim 2 (USA, prototype 19950809) [Hidden Palace]
Fire Shark (Retro-Bit) [no-intro]
Gaiares (Retro-Bit) [no-intro]
Kirito - The Game (demo) [Tulfared]
Lethal Wedding (demo 1) [Mega Cat Studios]
Lethal Wedding (demo 2) [Mega Cat Studios]
Magic Girl: featuring Ling Ling the Little Witch (Europe, USA) [no-intro]
Smart Mouse (USA) [no-intro]
Syd of Valis (Retro-Bit) [no-intro]
T.C.K - The Cursed Knight [no-intro]
T.C.K - The Cursed Knight (pre-release beta) [no-intro]
T.C.K - The Cursed Knight (demo 1.0) [no-intro]
T.C.K - The Cursed Knight (demo 1.1) [no-intro]
T.C.K - The Cursed Knight (demo 2.0) [no-intro]
T.C.K - The Cursed Knight (demo 2.1) [no-intro]
T.C.K - The Cursed Knight (demo 3.0) [no-intro]
The Lost Vikings (USA, rev. A) [no-intro]
The Smurfs (Brazil) [no-intro]
Thunder Paw [no-intro]
Truxton (Europe, USA) (Retro-Bit) [no-intro]
Valis (Retro-Bit) [no-intro]
Valis III (Retro-Bit) [no-intro]
Xeno Crisis [no-intro]
Redumped set
--------------------------------------------
Donald in Maui Mallard (Brazil)
Removed set
--------------------------------------------
Fire Shark (USA) [bad dump]
Added chip serial, PCB serial, developer and language info on several sets