GFA Basic, STOS or Asm?

GFA, ASM, STOS, ...

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

User avatar
madaxe
Retro freak
Retro freak
Posts: 14
Joined: Sat Apr 13, 2019 8:08 pm

GFA Basic, STOS or Asm?

Postby madaxe » Tue Apr 23, 2019 5:52 pm

Hi, greetings to everyone.

I have made a little and simple shoot'm'up for PC Windows, Speccy and Amiga and now I would like to convert it to Atari :)

I would like to know if there is something like Blitz Basic 2 to Atari. I heard about GFA Basic and STOS and are these powerfull enought to code a simple shooter or is it needed sometingh faster like 68K asm?

You can check my little game here to have an idea:
http://sardonic.planetaclix.pt/

Thanks in advance,
José Mário Machado a.k.a. MadAxe

czietz
Hardware Guru
Hardware Guru
Posts: 918
Joined: Tue May 24, 2016 6:47 pm

Re: GFA Basic, STOS or Asm?

Postby czietz » Tue Apr 23, 2019 8:18 pm

There are some quite advanced (and fast paced) games written in GFA Basic, e.g., Anarcho Rider:
https://www.hd-videofilm.com/anarcho/in ... -features/
https://www.hd-videofilm.com/anarcho/me ... al-videos/

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 442
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA Basic, STOS or Asm?

Postby Rajah Lone » Tue Apr 23, 2019 8:45 pm

GFA Basic should do the trick. But if you know 68K ASM, that will be smoother than Basic.

If your goal is to run your game on stock Atari, then it's easy.
If you want to run your game on every Atari ST and compatible, that will be harder. There are some unspoken rules, most of it is located at http://toshyp.atari.org/en/index.html

Better look at some Atari games sources, then choose your language accordingly.

mlynn1974
Captain Atari
Captain Atari
Posts: 260
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: GFA Basic, STOS or Asm?

Postby mlynn1974 » Tue Apr 23, 2019 8:52 pm

The Amiga version looks great. It needs fast vertical scrolling and lots of sprites. It would be possible using STOS and the Misty Extension but for best performance you should use 68000 assembly language.

You can achieve 4 pixel vertical scrolling with a double buffered display. The screen on the STFM can only move in boundaries of 256 bytes and one scanline is 160 bytes so 1280 is 8 scanlines and also a boundary of 256 bytes. If the screen is double buffered and the other screen is offset by 4 pixels you can get 4 pixel smooth vertical scrolling.
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 118
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: GFA Basic, STOS or Asm?

Postby thomas3 » Wed Apr 24, 2019 7:15 am

Rajah Lone wrote:GFA Basic should do the trick. But if you know 68K ASM, that will be smoother than Basic.

If your goal is to run your game on stock Atari, then it's easy.
If you want to run your game on every Atari ST and compatible, that will be harder. There are some unspoken rules, most of it is located at http://toshyp.atari.org/en/index.html

Better look at some Atari games sources, then choose your language accordingly.


From the above:
"Never write directly to screen memory, but always fall back to the relevant GEM functions (AES, VDI)"

... oops.

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 442
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA Basic, STOS or Asm?

Postby Rajah Lone » Wed Apr 24, 2019 8:39 am

thomas3 wrote:From the above: "Never write directly to screen memory, but always fall back to the relevant GEM functions (AES, VDI)"
... oops.

You can apply this sentence for yourself (ie https://ptonthat.fr/x2-project/ ) but you don't have to obtrude on someone else.

No need to code for GEM compatibility for an arcade type game on stock Atari ST. Just write directly on screen memory as if the computer was all your own house.

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 575
Joined: Sun Aug 03, 2014 5:54 pm

Re: GFA Basic, STOS or Asm?

Postby ThorstenOtto » Wed Apr 24, 2019 1:06 pm

Rajah Lone wrote:No need to code for GEM compatibility for an arcade type game on stock Atari ST. Just write directly on screen memory as if the computer was all your own house.


... and see your game fail on almost any atari that is currently in use...

Rule of thumb: if VDI is fast enough for your purposes, than just use that.

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5080
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: GFA Basic, STOS or Asm?

Postby simonsunnyboy » Wed Apr 24, 2019 3:09 pm

madaxe wrote:Hi, greetings to everyone.

I have made a little and simple shoot'm'up for PC Windows, Speccy and Amiga and now I would like to convert it to Atari :)

I would like to know if there is something like Blitz Basic 2 to Atari. I heard about GFA Basic and STOS and are these powerfull enought to code a simple shooter or is it needed sometingh faster like 68K asm?

You can check my little game here to have an idea:
http://sardonic.planetaclix.pt/

Thanks in advance,
José Mário Machado a.k.a. MadAxe


GFABASIC with some inline m68k should be able to produce a 25fps vertical scrolling shooter if taken good care. Stable 25fps is doable, see my game Attackwave (http://paradize.atari.org/)
I had a prototype with 16-18fps running in 1994 but lost the sources which used plain GFA only.
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

joska
Hardware Guru
Hardware Guru
Posts: 4343
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: GFA Basic, STOS or Asm?

Postby joska » Thu Apr 25, 2019 6:31 am

ThorstenOtto wrote:Rule of thumb: if VDI is fast enough for your purposes, than just use that.


The VDI is never fast enough for any sort of action games. It does not even offer the basic features needed for most games, like double buffering or a reliable VBL interrupt.

If you write a game for the ST hardware today then it's no problem to get this running reliably on the TT and Falcon too.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
madaxe
Retro freak
Retro freak
Posts: 14
Joined: Sat Apr 13, 2019 8:08 pm

Re: GFA Basic, STOS or Asm?

Postby madaxe » Thu Apr 25, 2019 1:44 pm

Hi guys;

Thank you very much for your great help and nice informations :)

My aim is to make a game compatible with normal Atari ST. Sorry my ignorance but what is a stock Atari? Is it a kind of tunned Atari?

I know a little 68K Asm but I dont't know very much of Atari's hardware so I'll start making some expreriences with GFA Basic and inline ASM.

Beasides this excelente forum where can I get more info about GFA (source codes, tutorials)?

Best Regards,
José Mário Machado a.k.a. MadAxe

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 442
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA Basic, STOS or Asm?

Postby Rajah Lone » Thu Apr 25, 2019 3:22 pm

madaxe wrote:what is a stock Atari?

"stock" as unmodified, not customized, not enhanced. As if the machine was built by Atari Corp and just get out of its official box.

http://gfabasic.net/
https://github.com/ggnkua/Atari_ST_Sources (old, but instructive)

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2417
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: GFA Basic, STOS or Asm?

Postby lp » Thu Apr 25, 2019 4:11 pm


User avatar
mrbombermillzy
Captain Atari
Captain Atari
Posts: 167
Joined: Tue Sep 13, 2016 9:24 am

Re: GFA Basic, STOS or Asm?

Postby mrbombermillzy » Thu Apr 25, 2019 7:10 pm

joska wrote:
ThorstenOtto wrote:Rule of thumb: if VDI is fast enough for your purposes, than just use that.


The VDI is never fast enough for any sort of action games. It does not even offer the basic features needed for most games, like double buffering or a reliable VBL interrupt.


Do you mean on standard hardware?

I was under the impression that with an ATI Mach32 stuffed in the VME slot and the latest NOVA drivers the VDI was a bit faster than on stock hardware and perhaps blitting was a bit better.

joska
Hardware Guru
Hardware Guru
Posts: 4343
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: GFA Basic, STOS or Asm?

Postby joska » Thu Apr 25, 2019 7:23 pm

I mean on all hardware. The point in using the VDI for graphics output is to make the game work on all displays/graphics cards. However, the VDI simply does not offer the necessary functionality. You can use a framework like SDL (which can output using GEM/VDI), but it's *extremely* slow and resource hungry and barely works on even the CT60 or Firebee.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 442
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA Basic, STOS or Asm?

Postby Rajah Lone » Thu Apr 25, 2019 7:46 pm

joska wrote:However, the VDI simply does not offer the necessary functionality.

I thought it did. I have managed to do what I wanted with pure VDI. My game productions are here to testify.
But this not the subject here. It's easier and quicker with low level coding. On standard Atari ST and for an arcade game, it's better when you phuck the rules, good and hard.

User avatar
mrbombermillzy
Captain Atari
Captain Atari
Posts: 167
Joined: Tue Sep 13, 2016 9:24 am

Re: GFA Basic, STOS or Asm?

Postby mrbombermillzy » Thu Apr 25, 2019 8:29 pm

Are the later versions any more functional/faster? (e.g. NVDI 5)

User avatar
Rajah Lone
Captain Atari
Captain Atari
Posts: 442
Joined: Wed Aug 07, 2002 12:27 pm
Location: Lyon / France
Contact:

Re: GFA Basic, STOS or Asm?

Postby Rajah Lone » Fri Apr 26, 2019 10:49 am

NVDI is a fast VDI since version 3. It's a clean rewrite of the bad-and-quick-written official VDI.
NVDI has new functionnalities in version 4 and 5, but these are not necessary for game: mostly for font management (TTF, charset) and printing (VDI is not only for screen management).

The only "new" interesting feature is the zoom capability, but NVDI5 does it only for pure Atari version (not PC, not Mac, not graphic cards). The developper has just to test a flag in standard function to know if the zoom is possible or not.
The other interesting enhancement is the "offscreen" capability, for primitive drawing and printing VDI functions, like text, circles, lines. This helps for smooth redraws in "serious" GEM applications.

For a game, the standard VDI has all for masks and sprites management, you can copy them in a not displayed (outside screen, like TT-RAM) memory zone. And copy this zone to the screen when the scene is completed. Though it's not, you can see that as a double-buffer.
The so-called offscreen capability is not necessary because only image blocks are used here.

User avatar
FedePede04
Atari God
Atari God
Posts: 1206
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: GFA Basic, STOS or Asm?

Postby FedePede04 » Fri Apr 26, 2019 11:26 am

i would say go for the machine code, i don't think is hard to learn.
of course using Basic will give you a lot of things, and maybe easier in the beginning.
but you really need to know GFA basic to get the same result, plus when doing stuff like this.
you still need to know the hardware and you also need to add some assembler routines to you basic program.

my opinion is you will wast valuable time, learning GFA basic.
i do under stand why a lot of people still use GFA Basic, they have been using them since the 90, and probably know all loopholes.

you can always ask questions here, if you need help with you program.
there are also a Assembler tutorial on this forum.
viewtopic.php?f=68&t=4330
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

warp12
Atari maniac
Atari maniac
Posts: 99
Joined: Fri Jun 12, 2009 7:03 pm

Re: GFA Basic, STOS or Asm?

Postby warp12 » Fri Apr 26, 2019 2:14 pm

I don't know the best choice for you (for me, ASM would be out of the question). STOS does come with a simple shooter, "ZOLTAR", and it's source code. You can also compile STOS for additional speed.

Shane

User avatar
simonsunnyboy
Moderator
Moderator
Posts: 5080
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: GFA Basic, STOS or Asm?

Postby simonsunnyboy » Fri Apr 26, 2019 3:32 pm

The OP indicated existing knowledge in BASIC dialects so larning a new dialect shouldn't b out of th question.
Pure m68k would give best results but is also has a hardcore learning curve.

Regardless of the language used, I'm curious for any new release on the ST so good luck :)
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee

User avatar
mrbombermillzy
Captain Atari
Captain Atari
Posts: 167
Joined: Tue Sep 13, 2016 9:24 am

Re: GFA Basic, STOS or Asm?

Postby mrbombermillzy » Fri Apr 26, 2019 6:32 pm

@Madaxe:

I use the PC version of BlitzBasic. Is the Amiga BB2 similar to that?

If so, you may find something like Pure C more suitable, as C isnt a great jump from BlitzBasic (at least on the PC version it isnt) and there are some great libraries (e.g. GodLib) too.

Or even have a look at DMLs amazing Atari Game Framework. Infact, if I was starting afresh, I would look into that seriously first, as it has some special code for extra colours too. I believe it is coded in C++ but you can just use plain C with it.

User avatar
madaxe
Retro freak
Retro freak
Posts: 14
Joined: Sat Apr 13, 2019 8:08 pm

Re: GFA Basic, STOS or Asm?

Postby madaxe » Fri Apr 26, 2019 8:42 pm

simonsunnyboy wrote:The OP indicated existing knowledge in BASIC dialects so larning a new dialect shouldn't b out of th question.
Pure m68k would give best results but is also has a hardcore learning curve.

Regardless of the language used, I'm curious for any new release on the ST so good luck :)


Thank you, I'll need it :)

Please, check if these last versions are correct:
GFA Basic - v 3.6
STOS - v 2.3
DevPac - v 3.1

User avatar
madaxe
Retro freak
Retro freak
Posts: 14
Joined: Sat Apr 13, 2019 8:08 pm

Re: GFA Basic, STOS or Asm?

Postby madaxe » Fri Apr 26, 2019 8:44 pm

mrbombermillzy wrote:@Madaxe:

I use the PC version of BlitzBasic. Is the Amiga BB2 similar to that?

If so, you may find something like Pure C more suitable, as C isnt a great jump from BlitzBasic (at least on the PC version it isnt) and there are some great libraries (e.g. GodLib) too.


Hi @mrbombermillzy;

I only used BB2 on Amiga but yes, is very similar to BB on PC.

Yeap, I know how to code in C/C++ and I like it very much. In fact I was just about to ask if C was a suitable language to code a game on Atari :)
Any good C/C++ compilers available?

User avatar
mrbombermillzy
Captain Atari
Captain Atari
Posts: 167
Joined: Tue Sep 13, 2016 9:24 am

Re: GFA Basic, STOS or Asm?

Postby mrbombermillzy » Sat Apr 27, 2019 9:19 am

There are a few builds of GCC (v.7.xx and 8.xx) available if you want C++, otherwise Pure C or perhaps VBCC is a C compiler which compiles for ST, Amiga and even Atari Jaguar.

As for suitability, I am still learning about C options on Atari. However, I find assembly is easier to deal with than C; not so much the language, but the various differences in compilers, language nuances and ANSI/ISO version differences.

Thats how I find it, anyway! :)

User avatar
madaxe
Retro freak
Retro freak
Posts: 14
Joined: Sat Apr 13, 2019 8:08 pm

Re: GFA Basic, STOS or Asm?

Postby madaxe » Sat Apr 27, 2019 9:08 pm

mrbombermillzy wrote:There are a few builds of GCC (v.7.xx and 8.xx) available if you want C++, otherwise Pure C or perhaps VBCC is a C compiler which compiles for ST, Amiga and even Atari Jaguar.

Hi @mrbombermillzy;

Thank you for your great suggestion. I downloaded Pure C and GodLib, installed them, made some tests and I found that is exactly what I need :)
I made a Minesweeper game in Borland Turbo C++ for MS-Dos back in the days so I don't need to start from beginning :)

Cheers,
José Mário Machado a.k.a. MadAxe


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest