Posts for SaxxonPike


1 2 3
9 10
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I've added support for Epyx Fastload: https://en.wikipedia.org/wiki/Epyx_Fast_Load It'd be nice to use that cartridge together with a disk image to really boost load times. Also, I fixed some of the VIA timer interrupts. Sometimes it would trigger improperly, causing some loaders to fail. Not every fastloader is compatible just yet, but we're getting there. N0SD0S and Krill's loaders are a high priority.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Worked a bit on the core again tonight. Savestates for media that can be modified should work next release. This change will significantly increase the uncompressed size of C64 save states due to the low level information that must be stored for disk emulation. I suggest enabling at least a low amount of compression in your state settings. (It should compress well since the delta is mostly zeroes.) Also, the input code was improved, and restoring from a saved state shouldn't disable input anymore (a pretty big bug I didn't catch before, whoops)
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
feos wrote:
You rock sir.
Thanks~! Well, all the work I've showcased has been pulled in as of tonight: https://github.com/TASVideos/BizHawk/pull/582 So, users who build from source should have a little something fun to play with. More to come later. I'm going to break for a few weeks and come back to work on what's missing.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Good news! It appears that loading games from disk is now possible. It turns out that the SYNC bit (bit 7 of $1C00 in the drive) was inverted in the documentation I was using. I didn't discover this until I stepped through the drive ROM and saw discrepancies in how the bit was used. Caused two weeks of grief. I put too much trust in others' research this time :) I've tested with some Epyx and EA copy-protected disks and only found one disk that isn't loading. That particular disk has trouble loading even in VICE (1 out of 4 tries gets it) so I'm not too worried. I put a picture up on my Twitter account showing M.U.L.E. loaded from D64: https://twitter.com/SaxxonFox/status/700513813129342980 And the Destroyer title screen, loaded from G64: https://twitter.com/SaxxonFox/status/700540811490897920
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Silverfish wrote:
I've got a couple of questions. The roms I've tried come up as Unknown Rom, whereas SNES roms (for example), almost always come up as verified good dumps. Does Bizhawk have a list of good c64 roms (and their checksums), as it does for other formats?
Nope. Developing a database for cartridges is easy, but for tapes and disks, slight differences in the analog media make it tough. The only solution (I think) is to pick a reputable database and go with that. GameBase64 seems like a good candidate.
Silverfish wrote:
Also are t64 format files supported? Currently it seems tap format roms seem to work, but all the t64 files seem to get stuck where it says PRESS PLAY ON TAPE
T64 is not yet supported. It's a format that needs conversion into a real representation of a tape like TAP. Much like D64s need to be converted to G64 before they can be used, because the second format is the representation at a low level (flux changes on the magnetic strip.)
Silverfish wrote:
Finally, is the core ready for c64 TASs to be submitted on the site, and if not, what is the process for c64 TASs to be approved?
There's a lot of work that remains, but I think when we have a sufficient "pass" rate on Wolfgang Lorenz's C64 test suite, we can consider it TAS-worthy. Note that not even the best emulators out there currently (VICE and HOXS64, imo) pass the suite 100%, and they have much larger contributor teams, but it's often close enough that only the most obscure hardware abuse leads to differences.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Not yet. Maybe it'll be easier when we can capture the mouse cursor, and get paddle support also :) They go hand in hand.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Thanks all! There's still a lot of work to do on the video chip for specific demoscene stuff that stretches the limits of the machine. But the list of games that can be completed without any apparent glitches is growing. Sometime soon, I'd like to get an idea of what games and system peripherals you're interested in seeing so that I have a better idea of what to prioritize. I know disk support is particularly popular, but what else?
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I've been hard at work in the last three weeks. Here's Impossible Mission on NTSC, working 100%, with a Lua script I wrote to show important puzzle pieces and passwords for the terminals. Link to video This tape is "Impossible Mission (Version 2).tap" from Gamebase64, which is the fastest-loading version of that game. Uridium is also among the games working. I haven't done a PR for the full improvements to Bizhawk yet, but this stuff is pushed to my personal Github for now.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
phoenix1291 wrote:
The core is based on Vice, right?
Actually, it isn't :) Tape would be easier to support than disk, I think. I am surprised to see tape support's in there now though :D
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Glad to see this run is getting some traction! :D
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Save states are added now. I'm working on sound issues when restoring states that should not affect the saves. Should work for cartridges and PRGs.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I'm with the "mind blown" guy up there.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
The movie hasn't been available long enough to watch the whole thing yet it's already getting votes :P Watching in progress..
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
zeromus wrote:
In progress in SVN. Whether ieeee754 standard was used (on console X) depends on which console X you mean (but probably). If some other float format is employed, someone had better tell us. Lua's memory.readfloat() etc. is completely unrelated to ramwatch/ramsearch.
I'm also curious how this is implemented as Commodore 64 uses 40 bit floating point values in its Basic/Kernal roms. Might be useful for games written in Basic+Assembly, of which there are numerous.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
hegyak wrote:
SaxxonPike, I wanted to say thanks for all the work your doing.
Thanks for your interest! :D It's been a lot of fun working on this. There's still a lot of work to be done however.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Getting serious. Terminator 2 Link to video Uridium+ Link to video
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
How far along are we? Here's Oxyron - Dawnfall. There are only a couple things in this demo that don't appear correctly. And of course, filterless SID music. Link to video
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I completely rebuilt the PLA according to the research in this document, very recently written by "skoe", the guy who also designed the EasyFlash cartridge a lot of us use these days: http://skoe.de/docs/c64-dissected/pla/c64_pla_dissected_r1.1_a4ss.pdf Here's the current state of things according to a C64 diagnostic cartridge: This isn't going to tell us anything about 100% accurate emulation- only that the vital parts aren't obviously failing. Pretty much everything in the right column is handled by the timer chips (the interrupts that are failing are definitely the 6526 timers) so there's much work to be done there. These chips are pretty buggy to begin with. The 6581 sound chip failure is due to the lack of filters, I imagine. What blows my mind is that it passed the 6567 (video) chip test. I'm convinced it doesn't check much other than the register I/O works. I know for a fact it needs a lot of work, especially for sprites (sometimes the bottom sprite line is missing.) And even if it checks those, it's the PAL 6569 chip that's actually emulated so the scanlines aren't even the same in number of lines and length in cycles. I do know for a fact that it checks video interrupts and it'd let me know if those failed, so when it claims that interrupts failed, it's not this chip. It's no surprise everything in the left side passed- that's all 6502 core, ROM and RAM. There are more comprehensive tests that I need to compile into cartridge form to find out in depth if there's anything truly off.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I'm almost done cracking a game. I took Legend of Blacksilver, a 4-disk RPG, and put it onto a cartridge, also while applying some fixes. In doing so, I learned an immense amount about the way the C64 works on the inside. As this project nears release, I'll actually be using Bizhawk as a debugger because of its live-ram-view abilities. Big image incoming. http://i188.photobucket.com/albums/z246/switchback3/bizhawk-lob_zps87e87adc.png I think before I get too far into testing disk drive things, I'm going to try and work on the file-level just to make sure the guts of the computer itself are working as they should. There are a couple of small (yet significant) changes I'll be making tonight. This version of the game already works as a result.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Moments like these would be missed by a TAS, but are absolutely hilarious (I've started it at 8:31 because it's awesome): http://youtu.be/EJHw_ucIzbA?t=8m31s
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
Resurrecting this again. Looks like they got an even faster one up. Link to video It is correct that with very best play, you can avoid Bobby and most things that would make this run that kind of scary-exciting.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
There are many kinds of C64 games and there's no way to really tell from the program data what system it's supposed to be playing on, which kernal you are supposed to be using, and even which CIA chip (older C64s, really old ones, used 6526A which didn't have some of the bugs the standard 6526 did; I'm not really sure why they went with the buggier ones.. maybe oversupply?) The best we can do is put the Kernal, Basic, Charrom, and any peripheral firmware checksums (the 1541 for example) and also the C64 type which can be selected by the TASer. Almost all games designed for NTSC setups will play okay on the PAL setups (since most of the time the interrupts are driven by scanline index) but going the other way tends to be sketchy (mostly because the NTSC setup has 263 scanlines while PAL has 315.) Some games autodetect this and compensate for it. Ultimately, it's not up to the game to decide what region it's for, but the user to make sure that they are using a machine that is compatible. I anticipate there will be instances where a specific kernal/basic firmware are chosen due to exploitable bugs, and C64 type. Games written in BASIC probably won't care, and others that have a lot of idle will also probably have no difference between machine type execution-wise (other than the fact that frame-driven games will run faster on NTSC than PAL, but would otherwise be unaffected unless it needed or assigned the video chip to interrupt on the extra scanlines.) There is a large number of setups you could have as a result of the number of peripherals you can use. But because software houses didn't always know what kind of setup a user might be using (other than taking a really good guess at PAL vs NTSC due to geographic location) they had to be more flexible. Another issue is the availability of original media. Some games saved their high scores to the program disk. So even if you own the original game and dump it yourself, you can still end up with a different image. It would be preferable to use the original disks from the DISKS folder in GameBase64 Extras in order to settle any sort of dispute, as these are maintained in large part by Pete Rittwage (among others at c64preservation.com) with the sole mission to preserve original disks in a way they can be archived and reproduced. Anyway.. enough with that rant. Right now, things need to "just work". I'm consulting with a number of people who are working on a variety of MOS chips at the transistor level, translating them into logic gates which I can more readily work with. Items of interest are the 6510 (which is the 6502 with tri-state bus to make it play nice in a multi-chip system), 6522 (VIA, how the bugs work), 6526 (CIA, this timer chip is also quite buggy but more progress has been made here), 6581 (SID, virtually everything about this chip is now known), 6567/6569 (VIC, these video chips are essentially identical except for some constants for NTSC/PAL), and they are doing some more stuff with the 6502 as well. But we already have a solid 6502 core, used for other things. The C64 emulation is currently lacking the ability to halt the 6502 processor properly when the video chip demands the bus on both ph1 and ph2. Here's why:
BA      With this signal, the VIC indicated that the bus is available to
        the processor during the second clock phase (ø2 high). BA is
        normally high as the VIC accesses the bus mostly during the first
        phase. But for the character pointer and sprite data accesses, the
        VIC also needs the bus sometimes during the second phase. In this
        case, BA goes low three cycles before the VIC access. After that,
        AEC remains low during the second phase and the VIC performs the
        accesses. Why three cycles? BA is connected to the RDY line of the
        processor as mentioned, but this line is ignored on write accesses
        (the CPU can only be interrupted on reads), and the 6510 never does
        more than three writes in sequence (see [5]).
I couldn't figure out how to buffer reads for the 6502 core. The way it's configured, this value is needed immediately when read and there's no way for me to predict what the CPU wants to do until I actually execute its code. Suppose it was reading a timer chip value that decrements by 1 every cycle. The value will be incorrect by however many cycles the CPU needed to be delayed. Since a "badline" happens (usually) every 8 scanlines, and the VIC has to "stun" the processor for 40 cycles (not counting the additional cycles needed for sprite access if they are used) the likelihood of the wrong timer value being read is extremely high if the game is counting cycles (this technique is often used for "stable rasterlines", a graphics trick.) Some timing-sensitive games, when they get consistently incorrect timer values, will have a cascading effect: they could cause some very obvious graphics anomalies or perhaps not even run at all. I didn't want to muck about with the 6502 core. Any ideas would be greatly appreciated.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
I've been gone for a long time. When I started this core, I found out how much I did not know about the Commodore 64. I have since brushed up on the technology used, Mosfet behavior, and the internals of the 6502. I think the issue I was running into was the main processor is a 6510 which doesn't have the exact same line behavior as the 6502 internally. It IS binary compatible but the extra lines allow the processor to behave in a multi-chip system. I plan to return to this project soon with a much-expanded knowledge of the system, with the assistance from someone who has decapped and analyzed some of the MOS chips used. It became very obvious that the data sheets weren't enough to explain the behavior of the C64. There are quite a few bugs and quirks especially with the timer chips (6522 and 6526) that are essentially taken advantage of or compensated for by pretty much every game that uses them. I'm sorry I vanished. The project was a little too much for me to handle. But I didn't research it well enough then. I'll be much more prepared when I come back to work on it.
LocalH wrote:
SaxxonPike wrote:
feos wrote:
Robocop 3 required some firmware. What file do I need?
FW is required for all games. The ones I am testing with are from the VICE 2.4 emulator (which can be found online) however any firmware for the C64 should work. The four that are required are: basic, kernal, chargen, and dos1541. They should be placed in C64\Firmwares.
Something to consider - there are slight differences in the original KERNAL ROMs available, and earlier games may have issues if they assume a specific KERNAL. I forget the specifics off-hand, but the different KERNALs handle color RAM differently when clearing the screen. That's why I say earlier games, because many games handle this themselves instead of relying on the KERNAL, and any game that handles color RAM on its own will not have issues on any KERNAL that I'm aware of.
Most programmers use the high-address vectors (think $FFxx) that jump to other addresses within the Kernal, if they use the Kernal at all. This usually reduces the chance that a new/custom Kernal would interfere. Basic ROM hasn't changed much at all, and people seem to be a lot more willing to use these addresses directly.
Experienced Forum User
Joined: 6/8/2005
Posts: 236
Location: Madison, Wisconsin
HHS wrote:
I have dumped the script, if anyone wants it: http://www.mediafire.com/?6f6cpbcjzcnkz9c,2914s2az1z0nlv5,v2sr5omwmvzms0x
Fantastic :) This is quite a bit better than what I've got. Thanks for this.
1 2 3
9 10