13-11-2026, 04:45 PM
More progress.
Working through the bug list at the moment before adding the last of the items on the feature list (such as the sound FiFo's etc).
2 Major items have been dealt with over the last month.
There were problems with the floppy disk emulation whereby disk activity would hang (reads or writes) and would also corrupt
disk images on writes. This surprised me as it was proven code from the Premium Plus, so there was an expectation that it would
just work. Unfortunately, the MC68SZ328 processor has less processing throughput by about half compared to the Coldfire Processor
used on the Premium Plus Coreboard. The MC52259 processor has internal flash and ram that are both 32 bit wide, and it runs at 80Mhz.
Compared to that the MC68SZ328 for these new models runs at 66Mhz with a 16 bit bus.
The slower execution highlighted some programmatical problems (interlocks required for write processes and timer routines) that slipped
through on the Premium plus because the processor finished the tasks before any timer went off. Handling of the SDcard SPI bus is much
faster on the Premium Plus too. Anyway, after much debugging and code upgrades, the Floppy disk emulation now seems solid.
I'll back-port the changes to the Premium Plus code at some point after these models are released.
I'll also be implementing a hardware SPI controller interface for the SDcard in the FPGA next to increase the card throughput.
The other issue that I've just fixed is that the machine would work at 20Mhz fine, but would not boot at 20Mhz.
This took some digging, and had me puzzled for some time as all memory tests ran perfectly at 20Mhz, and the machine
worked fine once it was switched to 20Mhz after boot.
It turns out that there are small routines that run in video ram when the Boot rom code is switching memory banks etc.
The problem was the Z80's Opcode fetch cycle which is 1 clock shorter than a regular memory fetch, so 2 clock cycles long ( and
another 2 clocks for the refresh address to go out to the buss).
Because of the logic paths between the processor and the FPGA, and internally within the FPGA to select logic and back out to
the Boot Rom and internally to the block ram for the video, timing for these (M1) cycles was not quite being met.
To cure the problem, I reworked the 'Chip Select' logic, and also implemented a single wait state for these 2 situations
only for when the machine is running at 20Mhz, and the Z80 is doing an OpCode Fetch cycle.
Having those 2 conditions for the insertion of a wait state makes sure there is minimal impact to operational speed.
Normal graphics operations will not be impacted, and the boot rom is only for boot time.
It's great to have both of these bugs sorted.
Working through the bug list at the moment before adding the last of the items on the feature list (such as the sound FiFo's etc).
2 Major items have been dealt with over the last month.
There were problems with the floppy disk emulation whereby disk activity would hang (reads or writes) and would also corrupt
disk images on writes. This surprised me as it was proven code from the Premium Plus, so there was an expectation that it would
just work. Unfortunately, the MC68SZ328 processor has less processing throughput by about half compared to the Coldfire Processor
used on the Premium Plus Coreboard. The MC52259 processor has internal flash and ram that are both 32 bit wide, and it runs at 80Mhz.
Compared to that the MC68SZ328 for these new models runs at 66Mhz with a 16 bit bus.
The slower execution highlighted some programmatical problems (interlocks required for write processes and timer routines) that slipped
through on the Premium plus because the processor finished the tasks before any timer went off. Handling of the SDcard SPI bus is much
faster on the Premium Plus too. Anyway, after much debugging and code upgrades, the Floppy disk emulation now seems solid.
I'll back-port the changes to the Premium Plus code at some point after these models are released.
I'll also be implementing a hardware SPI controller interface for the SDcard in the FPGA next to increase the card throughput.
The other issue that I've just fixed is that the machine would work at 20Mhz fine, but would not boot at 20Mhz.
This took some digging, and had me puzzled for some time as all memory tests ran perfectly at 20Mhz, and the machine
worked fine once it was switched to 20Mhz after boot.
It turns out that there are small routines that run in video ram when the Boot rom code is switching memory banks etc.
The problem was the Z80's Opcode fetch cycle which is 1 clock shorter than a regular memory fetch, so 2 clock cycles long ( and
another 2 clocks for the refresh address to go out to the buss).
Because of the logic paths between the processor and the FPGA, and internally within the FPGA to select logic and back out to
the Boot Rom and internally to the block ram for the video, timing for these (M1) cycles was not quite being met.
To cure the problem, I reworked the 'Chip Select' logic, and also implemented a single wait state for these 2 situations
only for when the machine is running at 20Mhz, and the Z80 is doing an OpCode Fetch cycle.
Having those 2 conditions for the insertion of a wait state makes sure there is minimal impact to operational speed.
Normal graphics operations will not be impacted, and the boot rom is only for boot time.
It's great to have both of these bugs sorted.
