ZXPAND and Lambda 8300?

User avatar
mrtinb
Posts: 672
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXPAND and Lambda 8300?

Post by mrtinb » Sat Apr 28, 2018 11:21 pm

nollkolltroll wrote:
Sat Apr 28, 2018 8:34 pm
I seem to remember something about the Lambda using 208 cycles per line, whereas the ZX81 uses 207. This is strictly a vague feeling, not something to rely on...
I don't know much about timing on the ZX81 and the Z80 processor. I do however have Rodnay Zaks Programming the Z80 where is states that LD r,n is 2 M cycles and 7 T states. Not that this makes much sense to me.

So I'm guessing I need to find an instruction in the loop that draws the line, and replace a 2 M cycle instruction with a 3 M instruction, or replace a 4 M with a 5 M?
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
mrtinb
Posts: 672
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXPAND and Lambda 8300?

Post by mrtinb » Sat Apr 28, 2018 11:28 pm

Reading further in the book it seems that T states = clock cycles.

So it seems I need an extra T state in the loop that draws the line.

I was hoping to have the same ROM in the ZXpand for both ZX81 and Lambda 8300, but that seems down the drain now.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
mrtinb
Posts: 672
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXPAND and Lambda 8300?

Post by mrtinb » Sun Apr 29, 2018 12:02 am

Code: Select all

AND 18h    7 T-states
ADD A,1Fh  7 T-states
changed to

Code: Select all

RL A      8 T-states
LD A,37h  7 T-states
giving 1 more T-state. But it did not solve it.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

User avatar
mrtinb
Posts: 672
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXPAND and Lambda 8300?

Post by mrtinb » Sun Apr 29, 2018 12:39 am

olofsen wrote:
Sat Apr 28, 2018 10:55 am
Perhaps it is the INT routine? The routine in the ZX81 compatible Lambda ROM is I think slightly different from the normal ZX81 INT routine which the ZXpand is using?
Thanks for your feedback. I'll try to look at the disassembly of the ZX81 ROM, the Lambda 8300 ROM and the modified ZX81 ROM for Lambda 8300.

I'll change a few bytes and see if that helps.
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

dr beep
Posts: 1105
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: ZXPAND and Lambda 8300?

Post by dr beep » Sun Apr 29, 2018 11:19 am

I am master in finding 1 tstate. Will have a look

dr beep
Posts: 1105
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: ZXPAND and Lambda 8300?

Post by dr beep » Sun Apr 29, 2018 11:32 am

Ok...

3 changes in ROM.

#0039/#003A becomes JR NZ,SCANLINE
#003B is NOP , due to absolute jump to address of scanline, stays NOP

#0046 1 tstate too much.... so this becomes NOP

User avatar
mrtinb
Posts: 672
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: ZXPAND and Lambda 8300?

Post by mrtinb » Sun Apr 29, 2018 2:02 pm

dr beep wrote:
Sun Apr 29, 2018 11:32 am
Ok...

3 changes in ROM.

#0039/#003A becomes JR NZ,SCANLINE
#003B is NOP , due to absolute jump to address of scanline, stays NOP

#0046 1 tstate too much.... so this becomes NOP
You are hereby officially declared: The Master that Knows ZX81 ROM by Heart in Sleep.

It works great.

(The 1st line looks tricky though.)

Image
Martin
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube

dr beep
Posts: 1105
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: ZXPAND and Lambda 8300?

Post by dr beep » Sun Apr 29, 2018 2:18 pm

Looks like 4 tstates somewhere,
However... this also appears when I call my hires without enough empty lines on top.

You could add extra lines on top by altering LD BC,#1901 to 1909

dr beep
Posts: 1105
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: ZXPAND and Lambda 8300?

Post by dr beep » Sun Apr 29, 2018 2:26 pm

34ECDBCD-B7E6-4B09-AA08-DA57B93ED63F.png
Change 1901 here.
Also you can alter A below to shift display in columns.

dr beep
Posts: 1105
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: ZXPAND and Lambda 8300?

Post by dr beep » Sun Apr 29, 2018 6:53 pm

mrtinb wrote:
Sat Apr 28, 2018 11:02 pm
dr beep wrote:
Sat Apr 28, 2018 11:09 am
What picture do you get from loading 1 of my 1K hires games?

This could determine if it is lowres or hirescontrol (timer per line).
The jumping text is what I had too when writing lowres too soon (not enough NL) to the screen.
I've load Humpty 1K in this video with the ZXpand ROM:

https://youtu.be/L0ehypS91Fk

Remember that Lambda 8300 does NOT do Pseudo Hires, WRX or UDG. This is due to the different ULA where charset is inside the ULA.
The picture was only relevant to see if 208 tstates were used.
Since the graphic is outlined to left is is proven that is is indeed 208 tstates.

Post Reply