Prime wrote:Andy Rea wrote:
Oh and this is ULA-Plus were talking
i seem to have sorted it now, as i have re-written that bit and it once again seems to work fine.
Andy since you have a ZXpand now, can I ask you to test something for me ? I've only been able to get the clock doubling working with ZXpand fitted and the external ROM enabled. If I unplug ZXpand or dor a CONFIG "X" to disable it's clock, then the machine crashes as soon as I enable the clock doubling, does this affect your current design.
How are you implementing /ROMCS & /RAMCS in your ULAplus now that you have it all in the CPLD ?
Feel free to reply in the ULA thread if you feel it would be more apropreate there....
Cheers.
Phill.
right where to start, with the easy bit i guess, RamCS and RomCS is as on standard ULA
Code: Select all
assign romcs = a14 | mreq ;
assign ramcs = !a14 | mreq ;
for the extra features, they are all coded to be off by default, so on power-up or reset

( wired to pin26 of the cpu...) the zeddy powers up as normal, the only way of enabling features then is by doing an ' OUT A,($7F) ' where as bits 4 - 0 control the various features, the row of keys are scanned at startup and stored so on power-up/reset 'b' is bit 4, spc is bit 0
bit 4 = turbo_enable (
extras[4] in the code '1' = inactice, 0 = active
(but it is still manually controlled by an external switch) the switch is ignored if turbo_enable is '1'
bit 3 = M1not_enable '1' = inactive, 0 = active
when active video cycles only occur in the upper 16K (a14 needs to be high in addirtion to a15) , i'm not actually altering the M1 signal at all !
bit 2 = invert uk/us mode , '1' do not invert, '0' invert
bit 1 = invert video, '1'= normal, '0' = inverted (white on black
bit 0 = invert Border '1' = normal, '0' = inverted (black)
Then we move onto clock dopubling....
Code: Select all
wire slow_clock;
wire fast_clock;
input turbo_enable;
wire addhigh;
wire turbset;
wire turbunset;
reg turbo_active;
assign addhigh = add_low[7] & add_low[6] & add_low[5] & add_low[4] & add_low[3] & add_low[2] ;
assign fast_clock = osc;
assign clock_out = (!turbo_active & slow_clock) | (turbo_active & fast_clock);
assign turbset = ((turbo_enable & !extras[4]) & !iorq & !write & addhigh & add_low[1] & !add_low[0] & halt);
assign turbunset = !turbo_enable | !halt | (!iorq & !write & addhigh & add_low[1] & add_low[0])
| (!iorq & !write & addhigh & !add_low[1] & add_low[0]);
assign turbo_act = turbo_active;
always @ (posedge slow_clock) begin
turbo_active = (turbset) | (turbo_active & !turbunset) ;
end
almost the same s before.... just the addition of extras[4], which if high turboset can never be asserted.
i don't appear to have any problems with switching between turbo and non turbo whilst programs are running, up until the M1not issue i was having it worked fine with or without ZXpand plugged in, but i have ripped out the interanl ram for the moment, i can however issue a CONFIG "X" whilst clock doubling is active, and can perform for example LOAD "25THANNI;X" whilst clock doubling is active all fine, alothought the only part of 25thanni that benefits is the second part, the rest seem to be tied to the frame rate.
If i haven't exactly answered what you were asking feel free to ask again

sometimes i miss things.
Regards Andy
what's that Smell.... smells like fresh flux and solder fumes...