I have one simple Q: You reworked whole code from Z80 to 6502, why not to use Z80 in Commodore 128 or in CP/M Cartridge? I own both - C128 and with I'm using CP/M Cartridge 'cause if is SCPU turned on, Z80 inside C128 is not accessible, so I have available at least inside cartridge. Even CP/M Cartridge was designed for C64... can try C64 mode too. I'll provide all req'd info if you try to do it. So, ask, I'll reply or test. Miro
Commodore 64 was great, Commodore 128 is bigger, better, faster and more powerful... Commodore 65 was almost here, but C256 is coming and it will be earthquake...
Thanks for your offer but I more or less have C128 SCPU versions fixed now. The Vic-II version didn't like $D030 being manipulated in the Raster IRQ and in the VDC version the scpu was running too fast for the VDC chip, so I have had to switch to 1mhz mode when writing to the VDC chip! I'll have a new version with fixes available in the next few days.
In answer to your Z80 question...This was really a Atari 800/C64 conversion first and full most. The C128 version was quite a nice addition after the C64 version was finished. Also I'm not sure what speed the Z80 in the C128 runs at but even at 4Mhz it's not going to be as fast as the 8502 at 2Mhz so running the 6502 code is going to be faster in the C128 anyway.
It might be slower, but not terribly (I think). The Z80 in the ZX Spectrum is clocked at 4.5 MHz, in the C128 at 2 MHz. But in the Spectrum, the CPU is halted when the video-ram is accessed, in the C128 this is not the case (except for bad-lines). Also because of the peculiar layout of the video-ram in the Spectrum (the bitmap in the C128 is not ideal either), most Spectrum games use a ram-buffer to build the active part of the screen. This ram-buffer is then copied to the video-ram. In the C128 this ram-buffer still needs to be build (at a slower speed), but with a simple store operation in a register of the VIC-IIe it can be made the active screen. This saves a lot of time.
Based on my work on Pentagram & Gunfright I would say on a PAL C128 switching to 2mhz in the border for the Vic-II the 8502 runs at about 1.28Mhz per frame.
With the VDC you can more or less run at 2Mhz per frame (with the Vic-ii off) but copying data into the VDC is mega slow. In the case of Gunfright you have to copy almost 3k per game frame so most of the CPU speed advantage is lost. In the case of Pentagram only the sprite data needs to be copied into the VDC every game frame, so I expect that version to be very fast when it's done.