|
Post by Emu on Apr 7, 2017 17:38:02 GMT
Thanks for the offer. Let me know when you are back and I'll post up some questions.
Regards.
|
|
|
Post by mirkosoft on Apr 14, 2017 1:24:40 GMT
So, I'm back.
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
|
|
|
Post by Emu on Apr 14, 2017 18:40:39 GMT
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.
|
|
|
Post by mirkosoft on Apr 14, 2017 21:31:46 GMT
Ok, I understand. Miro
|
|
|
Post by bjonte on Apr 15, 2017 6:46:51 GMT
|
|
|
Post by remark on Apr 15, 2017 10:38:35 GMT
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.
|
|
|
Post by Pyrofer on Apr 15, 2017 10:41:05 GMT
You mention the 2Mhz and then the VIC-IIe. You can't use 2Mhz when displaying the VIC screen. You would have to use the VDC for that or a border hack to get about 1.4Mhz.
Z80, VDC and 2Mhz would all work and as you say, no pause during screen refresh but you would have the slower VDC access to begin with. Swings, meet roundabouts.
|
|
|
Post by mirkosoft on Apr 15, 2017 11:03:59 GMT
But other way - if I read correctly - it was about 2MHz of Z80, not 8502... 8502 can run with VIC2E on 1MHz only or your note about overclocking... Z80 runs on 2MHz correctly with VIC2E or VDC...
Miro
|
|
|
Post by Emu on Apr 15, 2017 18:33:39 GMT
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.
|
|
|
Post by bjonte on Apr 16, 2017 20:10:00 GMT
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). Oh, I didn't know that the Spectrum was halted by the video chip reads.
|
|