SOME progress on the STE extension...

STOS-related stuff in here please

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

SOME progress on the STE extension...

Postby EstTeeEfEm » Fri Mar 25, 2016 2:57 pm

Made some progress using the STE scroller...

The main problem is it requires some Picture manipulation.

The picture is built using bank copying and is basically 10 pictures with no palette data at the front.

Line 31 sets a palette and just clears the pic, quickest way to get a palette ;)

Does anyone know how to get graphics on TOP of this program? I've tried to do it but its not working, perhaps i'm doing something dumb lol.

Code: Select all

10 key off : curs off : hide : mode 0
20 reserve as work 1,512000 : bload "b:\level1.pak",start(1)
25 D=depack(start(1))
30 reserve as screen 2 : load "playarea.pi1",2 : get palette (2)
31 wait vbl : erase 2
40 X=hard physic(start(1))
50 hard screen size 320,3200,0
60 hard screen offset 0,0
70 hard inter on
80 TY=3000
90 rem ***************************
95 if TY<0 then TY=0
100 hard screen offset 0,TY
110 if inkey$=" " then hard inter off : default : end
120 screen swap : wait vbl
130 wipe logic
140 dec TY
150 goto 90


And the data files along with the ASCII format listing..
STESCROL.rar
You do not have the required permissions to view the files attached to this post.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: SOME progress on the STE extension...

Postby dml » Mon Mar 28, 2016 8:47 am

The STE extension seems to work fine. You just need to be aware that while 'logic' and 'physic' continue to function for drawing purposes, 'physic' is no longer the physical screen. The physical screen is the one you specify to the 'hard inter' service. This is the only way to get around the display scrolling limitations of 'physic'.

This re-coded version works for me. It's not how I would actually implement scrolling (and the program itself is a bit poorly defined) but it should serve as a working example at least. (I honestly couldn't remember any STOS commands and couldn't find any usable docs online so I'd recommend redoing things from scratch)

10 key off : curs off : hide : mode 0
15 rem *************************************************
16 rem * create fake playfield in VBUF1,VBUF2
17 rem *************************************************
20 reserve as work 1,512000 : bload "c:\stos\level1.dat",start(1)
30 reserve as work 3,512000 : bload "c:\stos\level1.dat",start(3)
35 rem *************************************************
36 rem * load HUD image for blit every frame
37 rem *************************************************
40 D=depack(start(1))
50 reserve as screen 2 : load "c:\stos\playarea.pi1",2 : get palette (2)
55 rem *************************************************
56 rem * init hardscroll stuff
57 rem *************************************************
60 X=hard physic(start(1))
70 hard screen size 320,3200,0
80 hard screen offset 0,0
90 hard inter on
100 logic=back
110 rem *************************************************
120 rem * initialize the buffer names and start-Y
130 rem *************************************************
140 TY=3000 : VBUF1 = 1 : VBUF2 = 3 : VDISP = VBUF1
150 rem *************************************************
160 if TY<0 then TY=0
170 hard screen offset 0,TY
180 if inkey$=" " then goto 330
190 rem *************************************************
200 rem * blit clips at Y>=200, so offset buffer
201 rem * addr to the correct Y pos in the playfield
210 rem *************************************************
220 VLOG=start(VDISP)+(160*TY) : rem 'hard' log screen
230 blit start(2),0,0,80,200,VLOG,0,0
240 rem *************************************************
250 rem * swap the 'hard' framebuffers manually
250 rem * and inform STOS of the new physic
260 rem *************************************************
270 if VDISP = VBUF1 then VDISP = VBUF2 else VDISP = VBUF1
280 X=hard physic(start(VDISP)) : wait vbl
290 rem *************************************************
300 dec TY
310 goto 160
320 rem *************************************************
330 hard inter off : default
Last edited by dml on Mon Mar 28, 2016 5:01 pm, edited 1 time in total.

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: SOME progress on the STE extension...

Postby EstTeeEfEm » Mon Mar 28, 2016 4:48 pm

This tells me I ALMOST had it lol...
Thank you for looking into it though and thanks for getting this going. I havent enough time to test today (I'm building maps and tiles with a tiler program ;) ). Building level one needs to be done so I have some context with enemy Y,X positions. I'll update my own site either later today or early tomorrow with results.


Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 1 guest