[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
JACE crashes fixed!!!
- Subject: JACE crashes fixed!!!
- From: BLuRry <brendan.robert@gmail.com>
- Date: Wed, 25 Apr 2012 22:18:27 -0700 (PDT)
- Complaints-to: groups-abuse@google.com
- Injection-info: glegroupsg2000goo.googlegroups.com; posting-host=70.123.154.97; posting-account=HyIOQgoAAAAfAUGOevdCSBhPYcDSPtM9
- Newsgroups: comp.sys.apple2
- Organization: http://groups.google.com
- User-agent: G2/1.0
The culprit this whole time was the evil nature of multithreaded code. It is possible for events to trigger various soft switches, namely a few the might also cause the emulator to reconfigure the MMU memory map.
The toxic part about this is that there was no mutex around memory configuration, and because MMU has a lot of rules, the memory configuration starts off with a base layer (aux or main mem) and then layers on the correct pages of Zero-page, language card, rom, etc. This was implemented perfectly as far as I could tell. And I was under the impression this was the problem, but I was only kind of right.
The real problem was that memory reconfiguration was occurring while the CPU thread was still running! Because of this, there was a horrible race condition that was only manifesting in airheart when I was holding down the closed-apple to go fast. And apparently, in some cases when I was pressing closed-apple in prince of persia to grab a ledge (I usually hold open-apple a lot when playing POP). All this combined: Race condition. Solved.
I won't hold my breath and assume this fixed the random prodos desktop crashes, it could just be a buggy program in and of itself (I don't know it very well). However, I did tweak the language card write switch behavior to work a tiny bit more correctly, so it could fix other problems.
Anyway, JACE is working well enough to play two of the games that push the //e to the max and much help to all who helped keep me going with ideas. I swear I almost gave up a couple of times on this.
A build will be release again soon, I have a mockingboard routine to debug now.
-B