FullHD81 - an improved video driver

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

zsolt wrote:
Still a question about your 9600 bytes size. When 6 lines are stored in 256 bytes, then I can store 200 lines in max 34x256=8706 bytes, so where is the rest needed for?
If you read again the first post, then you see that the unexpanded picture (320x240) requires 9600 bytes.

Btw. there are 2 other problems in your code:

Code: Select all

Cp 210 ; test for final line done in front, flag will be used after display
:
Jp lines+#8000
These 2 instructions use more machine cycles. The 2nd (and the 3rd in case of the jump) is a simple memory read (without /M1+A15), so the CPU will read some other than expected.
Just my thoughts written down ...
And I always really glad to read :D

Regards,
Zsolt
The instructions are the famous 48K bug when memory above 32K is available. On 16K this works. Used the trick in my 1K hires games. Solution is a copy of the routine on same memory above 32K. rework with extra register might get problems with timing.

Edit:
Preset HL to lines +#8000
Preset C to 209

Alter code
CP C
JP (HL)

Remain a gap of 17 tstates to be filled with
RET Z ; never true
LD B,B
LD B,B
LD B,B
User avatar
zsolt
Posts: 214
Joined: Wed Apr 20, 2011 11:43 am
Location: Fót, Hungary

Re: FullHD81 - an improved video driver

Post by zsolt »

zsolt wrote: and I'm always really glad to read :D
ZX81 (8K), ENTERPRISE 128, [ZX SPECTRUM (48K,+,+128K,+2,+2A), TS1000, TS1500, TS2068, Cambridge Z88, PRIMO A64 (red)]
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Thinking of doubling the displayroutine to make setting stack in unused bytes possible and just 50 bytes overhead in double displayroutine.

Screen will become larger at just a few bytes overhead.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Looks like that in this way I can make screen up to 336 pixels without extra overhead but 50 bytes double displaybuffer.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Timing is an issue. Need to fill 2 tstates.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

I think I can make it 328 with stack in open spaces.
Only thing needed is double displayline, so for app. 50 bytes more you get 200x8 pixels more displayfile.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Yes,

Timing is perfect and stack on free spaces in screenarea.

Displayroutine will be 104 bytes. Screen will become 328x200.

Now I need a screen and first display and test on real machine.
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Code: Select all

Cp (hl) ; retnxtblock, start of hires
Ld a,h
Ld i,a
Ld a,l
Ld r,a
Defs 41
Ld sp,hl
Ld a,h
Add a,d
Ld h,a
Ret z
Ret z
Ld a,l
Add a,e ; ixpointer
Ld r,a
Defs 41
Ret

Ret z ; retinblock
Cp (hl)
Jp ix

Set in advance
Hl=#nn05
Ix=ixpointer+#8000
De=#129 , d=1, e=41
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Stack holds 4x retinblock, 1x retnxtblock
Final stack only holds outofhiresdisplay
dr beep
Posts: 2080
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: FullHD81 - an improved video driver

Post by dr beep »

Wider screen can only be reached with a full display routine per line.
The stack will be too small.
Post Reply