STOS STe Extension code

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

STOS STe Extension code

Postby EstTeeEfEm » Sat May 30, 2015 11:41 am

Hi all,
I'm almost at the point of starting to write a complete STe game in STOS however...

I cannot for the life of me work out HOW to use the STe extension for hardware scrolling...

The doc/manual i have is scarce and is using the unregistered version.. so far I have this...

Code: Select all

10 cls : key off : curs off : hide : mode 0
20 reserve as screen 15
30 load "backtile.pi1",15
40 hard screen size 640,200,0
50 X=hard physic(start(15))
52 hard inter on
55 A=0
60 hard screen offset A,0
65 wait vbl
70 inc A
71 if A=319 then A=0
80 if inkey$=" " then default : hard inter off : end
90 goto 60


Yes i know the physic/logic switch is missing....

this code gives some wierd half screen scrolling, dodgy wrapping as well...

Im stuck basically and would like to know in an 'easy' format .. how to use it correctly...
The type of game im writing depends on the STe hardscroll otherwise it wont work, im going for parallax :D

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Sat May 30, 2015 1:21 pm

could you post the extensions and a bas file so i can take a look. I never used the STE extensions but would be easier to understand your problem.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Sat May 30, 2015 8:07 pm

Hi there

could you post the extensions...


of course .. np..


This ZIP includes the extension, the DOC i have and the PI1 file im using...

The BAS listing is literally the code above but i've included it as an ASC fle

STOS_STE.zip


I hope you can do better than me... maybe i didnt give it enough time, or maybe missing something obvious about how it works .. cheers guy!!
You do not have the required permissions to view the files attached to this post.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Sat May 30, 2015 8:30 pm

I think the problem is, you are setting up a 640x 200 area to scroll, but you are only loading in a 320 x 200 pil image. So half the screen ends up as corruption as there is simply no data for the second half of the scroll area.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Sat May 30, 2015 8:37 pm

Code: Select all

10 cls : key off : curs off : hide : mode 0
20 reserve as work 15,32768*2
30 bload "backtile.pi1",15
35 bload "backtile.pi1",start(15)+32768
40 hard screen size 640,200,0
50 X=hard physic(start(15))
52 hard inter on
55 A=0
56 load "backtile.pi1",logic : get palette (logic)
60 hard screen offset A,0
65 wait vbl
70 inc A
71 if A=319 then A=0
80 if inkey$=" " then default : hard inter off : end
90 goto 60


That isn't ideal,but you get the general idea..
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Sat May 30, 2015 11:25 pm

Thanks for that... double screenin, kinda obvious isnt it - i almost had it with the 640 :?

It still jerks on the wrap though but thanks for helping me out! STe STOS stuff is quite annoying ..

I think i'll plough ahead and try and do something creative even if i cant implement it in a game...
btw, does the STe scroll work truly independantly of the CPU, i.e ill use little processor speed?

I WAS gonna double map with the missing link extension in order to get parallax but its really slow.

Unless you know of a better/easier way of implementing STe scroll within STOS?

Thanks anyhow guy!

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Sun May 31, 2015 8:30 am

Your pi1 image might not be aligned from left to right. I'm not sure what the image is, though I am guessing than the left side of your image doesn't line up with the right side, so the "glitch" isn't the scrolling as such, is the image itself not wrapping around correctly.

The cpu vs blitter is a huge topic that's been around for a long time. The cpu has to "program" the blitter, so it does use some CPU time. Though if the game isn't using a lot of CPU power to start with, then CPU can work faster than the blitter. I cant really say if using the blitter is faster or not, it depends on a lot of factors. I know I did do something with the blitter once and the game ran slower, so i never used it again. I seem to recall the blitter stuff actually ran slower when compiled than running in the editor also! So its something to keep in mind. Though I think scrolling backgrounds should be done with the missing link extension, in particular the world commands. There is no blitter support AFAIK, but it works well. Then your background is made up of "blocks" rather than a full pi1. It is a lot easier to control , and probably uses less ram overall.

Scrolling 2 pi1 images isn't a huge background for a game anyway. If you wanted to do a larger "world" then 32k each time for a pi1 image soon adds up to a lot of RAM. As the background looks like maybe a simple 16 x 16 block tiled, the missing link extension would use less ram to do the same job. Then you could add other tiles, trees, sky, rocks, whatever you wanted to make up your world.

Also not everyone has a STE, so using the blitter IMHO should be reserved for something which is not critical to the game, but if the blitter is there, the game could use it for something, maybe a fancy intro or something like that. I *think* there is some command (maybe in missing like or misty) for loading multiple images into a memory bank, then it can be used for scrolling. I know at some point I had 4 pi1 images (arranged as a huge square) then scrolled left to right , up to down, etc etc. So the actual physical screen you see is only looking at a part of the image which would be 640x400 (so you only see a 320x200 chunk actually on screen) Every has probably seen that effect. Ideal for a into, if it works faster with blitter, then you might be able to play a tracker tune with the 7khz extension on the cpu.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Sun May 31, 2015 8:49 pm

Well, I've given up on the blitter lol... unless i use it for fast clearing of screens which seems a little pointless..

I've managed to use mapping before as well.
I already have the 16x16 tiles in order to 'map' however the intention was to
1) scroll moving pi1 picture left to right @ 1pixel - that wraps (simple background)
2) overlay map/world blocks at 2 pixels . giving the illusion of parallax
3) display sprites
I am not too concerned with ram usage; as it is the 'player' sprites already take 100k ?!?! precalc'd and bobbed ... again for a 1pixel move..? this is going into 1mb territory which is kind of ok i suppose .. i image the blocks+map will take a further 200k

i also have what you'd call a status screen at the bottom indicating health/scores etc and that uses 32 pixels giving me a playing (scrolling) area of about 320,168, shouldnt be too shabby if STOS plays nice ?

Maybe the green tiled background BEHIND the world map might be a stretch too far for the poor old st & STOS..
I've spent much of today working on the graphics for the main sprite/player so at least thats coming along, although my palette split between the main playing area and the status bar is a bit wierd (another topic altogether..)

The STF/STE thing really only matters with the tracker ext im using atm, there is nothing else STE specific.
i can use ABK's and another ext for STFM owners. I really want to say more about the game but without anything to really show its all just hot air ;) maybe if i can get a demo/1st level off the ground? I've coded quite compentently in STOS for a while but mostly throwaway projects.

incidently i managed to get a 512 spectrum intro screen and menu system built ... thats awesome enough for a few days work :D

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Sun May 31, 2015 9:51 pm

Yeah I Guess blitter could be good for a quick screen wipe if blitter is installed on machines.. not a huge thing eitherway..

You might want to use 2px for your world blocks, I'm not sure 1px is really needed ?

I've got loads of projects to finish, but never get the time. Plus there is so many folders with so many projects from over the years, its hard to actually find the stuff I wanted.

I did a pac-worm game years ago, a cross between pac-man and the worm game (or snake). I guess it was more like snake but more like pac man, I don't know lol I can find the single screen ones, but I did another version with the world functions, but could never get any real speed out of the the thing to make the worm part a real challenge. I normally run into some stupid problem where years ago (before internet) it was very hard to get help with any problems. These days, there are so many people about its ultra-fast to solve problems, just don't have the time to get back into it.. but maybe one day :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Mon Jun 01, 2015 6:59 pm

Well, finally managed to get the status screen/sprite and scrolling background altogether and compiled it runs quite nicely... dont know whats its gonna be like once i start adding enemies and game logic stuff...?

Gotta love shoot-em-ups ;)

The only thing im truly struggling with is speed which is never gonna be STOS's forte ;)

in .BAS form it runs like a dog ..

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Mon Jun 01, 2015 7:26 pm

Yeah speed always hindered most of my efforts :roll: I think golden rule just use missing link extension as much as possible and try not to use "IF's" ;)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Mon Jun 01, 2015 8:40 pm

Well, it appears i've reached the end of the parallax dream lol, i cannot for the life of me get two maps to display over each other wth transparency. I thought color 0 would have been transparent but its not :(

Alternatively I could drop parallax altogether and admit defeat :? . As it stands with the map, status overlay, 9 24x24pixel sprites plus bullets its running fairly good when compiled. The parallax was going to be nice too.. aah well, think i've reached the end of what can be considered decent speed unless I can create one screen from multiple sources but i think that would take a lot of work and some stuff i might not know ?

Without the parallax backgrounds the game would LOOK nicer than the original but not really do anything above what the original game actually did. I'm not beaten yet :wink:

P.S its a conversion of an old ST game which I thought would look nice wth some updating...

at least i've got to a place wher the sprites are on, the scrolling works and the overlays are in.. optimising can wait until near completion

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: STOS STe Extension code

Postby exxos » Mon Jun 01, 2015 9:17 pm

I think those effects are only possible with world blocks which actually drawn that way. I think there is a expample of that in the missing link files somewhere. It looks like they have 3 "layers" scrolling at different speeds, but its actually they way the world blocks were drawn to give that effect. I don't think you can overlay actual maps ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

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

Re: STOS STe Extension code

Postby EstTeeEfEm » Mon Jun 01, 2015 9:40 pm

I sense a re-code lol...



Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 1 guest