XeO3 Layer 2 scroll demo source

Discuss ZX Spectrum Next Games, Tools and more.
User avatar
mdf200
Posts: 115
Joined: Fri Jun 02, 2017 9:52 am
Location: Dundee
Contact:

XeO3 Layer 2 scroll demo source

Postby mdf200 » Tue Jul 04, 2017 8:27 pm

Okay, a few folk have asked from my crap emulator.... so here is everything I have so far. Crap emulator, assembler - that needs some serious error checking added, and the current source to my framework.

This is the source to my XeO3 Layer 2 scrolling level demo. Layer 2 programming info included in the readme.

File system stuff is probably the most useful thing which I'll expand over time. It's also be verified to work on a real esxDOS 48K spectrum - so I know that bit works.

Use at your own risk of sanity.... Enjoy!

http://www.javalemmings.com/public/zxnext/Demo.7z

Stefan123
Posts: 119
Joined: Mon Jun 05, 2017 9:38 pm

Re: XeO3 Layer 2 scroll demo source

Postby Stefan123 » Wed Jul 05, 2017 7:51 am

Thanks for sharing :)

User avatar
RetroRusty
Posts: 9
Joined: Tue May 30, 2017 12:25 pm

Re: XeO3 Layer 2 scroll demo source

Postby RetroRusty » Wed Jul 05, 2017 12:22 pm

I've just had a play with this and it's awesome. Thanks Mike for sharing and I look forward to seeing your progress on this.

User avatar
Nodalmighty
Posts: 41
Joined: Tue May 30, 2017 7:53 am

Re: XeO3 Layer 2 scroll demo source

Postby Nodalmighty » Thu Jul 13, 2017 8:33 am

I shall have a play with this tonight. I look forward to you supporting the raster interrupt. Any plans to support radistan ?

Stefan123
Posts: 119
Joined: Mon Jun 05, 2017 9:38 pm

Re: XeO3 Layer 2 scroll demo source

Postby Stefan123 » Fri Jul 14, 2017 5:31 pm

Mike, how do you control the scroll direction, i.e. left or right when scrolling horizontally and up or down when scrolling vertically?

I don't think this is clear from the I/O port system description:

Code: Select all

(R/W) 22 => Layer2 Offset X
  bits 7-0 = X Offset (0-255) (Reset to 0 after a reset)

(R/W) 23 => Layer2 Offset Y
  bist 7-0 = Y Offset (0-191) (Reset to 0 after a reset)

JoeZX
Posts: 574
Joined: Mon May 29, 2017 9:11 pm
Location: Slovakia

Re: XeO3 Layer 2 scroll demo source

Postby JoeZX » Fri Jul 14, 2017 7:51 pm

Nodalmighty wrote:
Thu Jul 13, 2017 8:33 am
I shall have a play with this tonight. I look forward to you supporting the raster interrupt. Any plans to support radistan ?
https://www.youtube.com/watch?v=jZlA1AF-Rrc
Radastan mode on ZX-UNO .. really cute and practical demonstration ..

User avatar
mdf200
Posts: 115
Joined: Fri Jun 02, 2017 9:52 am
Location: Dundee
Contact:

Re: XeO3 Layer 2 scroll demo source

Postby mdf200 » Fri Jul 14, 2017 10:20 pm

Scrolling is a single byte offset that wraps the screen, so setting 1 will move it 1 pixel to the left, setting 255 will move it 1 pixel to the right.
This MAY be inverted when we get our hands on the hardware, but that's an easy change....

Same with vertical scrolling.

Stefan123
Posts: 119
Joined: Mon Jun 05, 2017 9:38 pm

Re: XeO3 Layer 2 scroll demo source

Postby Stefan123 » Sat Jul 15, 2017 9:11 pm

Okay, so it makes sense to think of this byte as a signed value where 1 to 127 scrolls that many pixels in one direction and -1 to -128 scrolls that many pixels in the opposite direction.

User avatar
mdf200
Posts: 115
Joined: Fri Jun 02, 2017 9:52 am
Location: Dundee
Contact:

Re: XeO3 Layer 2 scroll demo source

Postby mdf200 » Sat Jul 15, 2017 9:27 pm

No, it's a "wrapping" scroll....moving from 0 to 255 will scroll the screen continuously to the left. But once it wraps back to 0, the screen is back in it's place (as the screen is 256 pixels wide).

As a pixel goes out the left, it reappears on the right.

Counting down from 0 to 255 to 254....to 0, scrolls whole screen to the right. Again, as a pixel goes our the right, it reappears on the left.

Stefan123
Posts: 119
Joined: Mon Jun 05, 2017 9:38 pm

Re: XeO3 Layer 2 scroll demo source

Postby Stefan123 » Sat Jul 15, 2017 9:46 pm

Aha, that was something else :-) I didn't realize that scrolled out pixels would reappear automagically on the other side.


Who is online

Users browsing this forum: No registered users and 5 guests