[A]tari [G]ame [T]ools - 2D prototyping engine for STE

GFA, ASM, STOS, ...

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

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

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Anima wrote: Sun Aug 21, 2022 12:31 pm Wouldn’t it be a good idea to drop Cygwin support at all due to WSL being available on Windows machines? I suppose that you‘ll keep it for older Windows platforms being able to use AGT?!
For new users, I expect they may go straight to WSL now that it works well. I will probably set up my 'actual' PC with that config. But most of my Atari dev stuff is on an older Win7 PC and it will be painful to move it all. So many old dev and gfx tools installed :-/

At least two real users have Cygwin setups so I don't want to break that :-p
Anima wrote: Sun Aug 21, 2022 12:31 pm In respect of compression ZX0 might be a good alternative as well.
I'll take a look at that, thanks!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Latest update:

https://youtu.be/owUw7XNo7gc

...these changes are not pushed but will show up as soon as I can tidy up the code & definitions to configure it.
User avatar
shoggoth
Nature
Nature
Posts: 1219
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by shoggoth »

Bricks were s... hats off!
Ain't no space like PeP-space.
User avatar
saulot
Captain Atari
Captain Atari
Posts: 347
Joined: Sat Sep 18, 2004 9:09 pm
Location: Warszawa
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by saulot »

Nice, how this logging to separate monitor/console works? It's ultraDev/cart additional video output? How it is done (redirected)? Looks useful. How it different to let's say redirecting output to serial?
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

saulot wrote: Mon Aug 22, 2022 9:26 am Nice, how this logging to separate monitor/console works? It's ultraDev/cart additional video output? How it is done (redirected)? Looks useful. How it different to let's say redirecting output to serial?
The ultraDev has a VGA port on the back, so you can connect a second monitor there. The ST can write commands to the ultraDev for printing text to that display. It supports 40x32 character and 80x25 character modes in 8 colours.

The cart can do a lot of other things (!) but I'm really only using two features - host file sharing and VGA debug screen - in the AGT project.

AGT also has an internal debug console which works without ultraDev but it occupies the low border area (which expands to 272-line fullscreen if you hold TAB). However the ultraDev debug screen lets you monitor things without wasting any part of the STE display.

The AGT console can potentially output to other devices but currently only these 4 are supported:

- native (in the border, or TAB to fullscreen)
- Hatari Natfeats (messages go to hatari console/log)
- Steem Boiler log (virtual HW register specific to this debugger)
- ultraDev, second monitor
User avatar
viking272
Atari Super Hero
Atari Super Hero
Posts: 705
Joined: Mon Oct 13, 2008 12:50 pm
Location: west of London, UK

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by viking272 »

Looks impressive Doug, nice one!
Is it this UltraDev board? Looks really cool: http://ultradev.ultrafex.de/index.html
User avatar
saulot
Captain Atari
Captain Atari
Posts: 347
Joined: Sat Sep 18, 2004 9:09 pm
Location: Warszawa
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by saulot »

doug: Thanks, I've just downloaded manual for it. How reset is connected (docs state it's undocumented)?
User avatar
TheNameOfTheGame
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2203
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by TheNameOfTheGame »

Yeah, ultraDev looks cool, but the page says no more are being made due to high FPGA costs.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

saulot wrote: Mon Aug 22, 2022 12:33 pm doug: Thanks, I've just downloaded manual for it. How reset is connected (docs state it's undocumented)?
You can solder a wire to the STE (I think to a 555 or 556 timer I forget - have the info somewhere) and the other end attaches to a pinsocket on the ultraDev. When you transmit stuff, the ultraDev force-resets the ST.

There is a software option also - call a small fragment of library code in your VBL and it will sense when the ultraDev wants a reset (i.e. cart state changed).
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

TheNameOfTheGame wrote: Mon Aug 22, 2022 12:34 pm Yeah, ultraDev looks cool, but the page says no more are being made due to high FPGA costs.
Anyone really interested should just contact the developer directly. I'll leave it at that :)

(and I'm not saying another batch *will* happen - but is obviously more likely if interest is noted)
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Yesterday's ultraDev support was pushed to the AGT repo today. It seems stable.

To enable remote testing, add these to your Makefile:

Code: Select all

POST_REMOTE = ultradev
REMOTE_PRG = mydemo.prg
..to build for remote-test, use the 'remote' build target:

> make clean-all
> make remote

Note that 'remote' is similar to 'disk1' except the final directory is a shared directory at $(AGTROOT)/remote_share instead of being project-local. This is deliberate, so the ultraDev host-side fileshare server doesn't need to be restarted/repointed every time you switch projects. You can start it once and it just watches a single directory. The directory gets cleaned and your project build outputs get mapped into it when you build 'remote'.

Also note that the 'remote' target collects all materials from all disks of a multi-disk project (e.g. disk1, disk2...) so it behaves like a combined disk and all assets will be transferred there. Again, deliberate so you can remote-test a whole project in one go, when it is intended to be disk images.

...to enable the debug console on the utraDev VGA port:

Code: Select all

# select debug console (no/none, native, udev)
USE_DEBUG_CONSOLE = udev
If you don't have ultraDev, you can still use AGT's native debug console with:

Code: Select all

USE_DEBUG_CONSOLE = native
Hold down the TAB key to expand the console fullscreen at any time.


I haven't tested these changes with all the samples as I haven't had time but it works with the ones I did test!

That's all for now.
User avatar
mrbombermillzy
Atari Super Hero
Atari Super Hero
Posts: 581
Joined: Tue Sep 13, 2016 9:24 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by mrbombermillzy »

Its one thing developing a game engine (no small task) and its another thing mucking about like this, fixing it to compile/run on a myriad of platforms.

Must be like pulling your own teeth out!

I take my hat off to you Doug, for your endurance!
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

mrbombermillzy wrote: Mon Aug 22, 2022 7:34 pm and its another thing mucking about like this, fixing it to compile/run on a myriad of platforms.
Must be like pulling your own teeth out!
It is not my favourite thing, for sure :)

I think the hard part is done now so there should be less inertia to set it up in a new environment. I can hopefully focus on other stuff very soon.
User avatar
prog99
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by prog99 »

Hi Doug, messing around with something which may or may not help folk (I had a few hours to potter around last night)
Hit a blocker though here on all the examples when testing stuff. I'm using Mikro's toolchain on debian.
Any suggestions?

Code: Select all

m68k-atari-mint-g++ -x c++ -std=c++0x -I../.. -I../../3rdparty -I../../agtsys -m68000 -Ofast -fomit-frame-pointer -fstrict-aliasing -fcaller-saves -DAGT_CONFIG_WORLD_XMAJOR  -D__ATARI__ -D__M68000__ -DAGT_CONFIG_STACK=16384 -DAGT_RELEASE_BUILD -DUSE_TINY_CRT -Wall -Wno-reorder -Wno-unused-variable -Wno-multichar -fno-exceptions -fno-rtti -fno-threadsafe-statics -c -o build/agtsys/compress.o ../../agtsys/compress.cpp
../../agtsys/compress.cpp: In function 'u8* load_asset(const char*, AssetFlags, u32*, u32)':
../../agtsys/compress.cpp:522:15: error: cannot convert 'bool' to 'u8* {aka unsigned char*}' in return
        return false;
               ^~~~~
All my real skills are undervalued
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Hi - yeah, sorry about that. The builds were temporarily broken on GCC versions above 4.6.4. Have pushed a fix this morning.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

On that subject - support for GCC installs has changed (for the better).

In the latest revision, you should configure your GCC package as follows (at the top of 'makedefs' in the agtools root directory):

Vincent's MiNT GCC v4.6.4 (this is the AGT default-configured toochain):
IMPORTANT: This is a system-wide install to /opt/cross-mint/ which must have the gcc bin/ directory on $PATH

Code: Select all

# 'default'(or 'vincentcc')/'browncc'/'mikrocc'
USE_COMPILER=default

# set GCC version here
GCC_VERSION=4.6.4

# set=yes if GCC install is portable/install-anywhere (=no for default/vincentcc)
GCC_PORTABLE_PACKAGE=no
Mikro's GCC builds. These are fully-localised/install-anywhere builds. They are configured differently. They do not need to be installed on the $PATH.

Code: Select all

# 'default'(or 'vincentcc')/'browncc'/'mikrocc'
USE_COMPILER=mikrocc

# set GCC version here
# [4.6.4], [7.5.0]
GCC_VERSION=7.5.0

# set=yes if GCC install is portable/install-anywhere (=no for default/vincentcc)
GCC_PORTABLE_PACKAGE=yes

# set GCC install path for portable/install-anywhere case (browncc/mikrocc)
GCC_INSTALL=~/gnu-tools/m68000
#GCC_INSTALL=~/gnu-tools-464/m68000
ggn's ELF compiler distros, also install-anywhere (supports up to GCC version 12.1.0 !!!)
IMPORTANT: This version produces ELF binaries which we convert to TOS using a special tool (shipped with AGT and also in the compiler package). The conversion step is automatic in AGT.

Code: Select all

# 'default'(or 'vincentcc')/'browncc'/'mikrocc'
USE_COMPILER=browncc

# set GCC version here
# [4.6.4], [6.2.0], [7.1.0], [10.2.0], [12.1.0]
GCC_VERSION=12.1.0

# set=yes if GCC install is portable/install-anywhere (=no for default/vincentcc)
GCC_PORTABLE_PACKAGE=yes

# set GCC install path for portable/install-anywhere case (browncc/mikrocc)
GCC_INSTALL=$(AGTROOT)/gcc/browncc-12.1
ggn's latest GCC 12.1 (for Windows) can be found INSIDE the zip at this link: https://d-bug.me/various/toolchains.7z
Just extract the [browncc-x.y] directory somewhere and point GCC_INSTALL at it.

I might get to do a bit more at the weekend, with the missing tutorials etc.
User avatar
prog99
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by prog99 »

Thanks, new error now but I'll see if I can figure it out before pestering you.
In case its of interest I was tinkering with this which is looking promising...

Code: Select all

mike@Mikes-MBP hiworld (master) $ docker run -v $(pwd):/agt-tools/build -t prog99/agt-tools
RMACCING /agt-tools/agtools/agtsys/libcxx/rmac/zeroboot.s -> build/agtsys/libcxx/rmac/zeroboot.o
/agt-tools/agtools/bin/Linux/x86_64/rmac -I/agt-tools/agtools -I/agt-tools/agtools/3rdparty -I/agt-tools/agtools/3rdparty/m68k -I/agt-tools/agtools/agtsys -I/agt-tools/agtools/agtsys/m68k -fa +o0 +o1 +o2 +o3 +o4 +o7 +o8 +o9 -DAGT_CONFIG_WORLD_XMAJOR  -D__ATARI__ -D__M68000__ -DAGT_CONFIG_STACK=16384 -DAGT_TESTING_BUILD -DUSE_TINY_CRT -o build/agtsys/libcxx/rmac/zeroboot.o /agt-tools/agtools/agtsys/libcxx/rmac/zeroboot.s
echo "COMPILING /agt-tools/agtools/agtsys/libcxx/zerolibc.cpp -> build/agtsys/libcxx/zerolibc.o"
etc...etc...
All my real skills are undervalued
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Hi - I don't see the error in your paste (must have got chopped) but if it can't find RMAC you can download it from here:

http://rmac.is-slick.com/download/download/

(The Linux version of AGT doesn't ship with native binaries so the 3rdparty ones need to be sourced/built locally)
User avatar
prog99
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by prog99 »

No I snipped the full error from the paste so that I didn't distract you but if you must...

Code: Select all

/agt-tools/gnu-tools/m68000/bin/m68k-atari-mint-g++ -nostdlib -nostartfiles -m68000 -Ofast -fomit-frame-pointer -fstrict-aliasing -fcaller-saves -Wl,-Map,build/hiworld.map -Wl,--gc-sections -L/agt-tools/gnu-tools/m68000/lib/gcc/m68k-atari-mint/4.6.4 -L/agt-tools/gnu-tools/m68000/m68k-atari-mint/lib \
build/agtsys/libcxx/rmac/zeroboot.o build/agtsys/libcxx/zerolibc.o build/agtsys/libcxx/zerocrtfini.o build/hiworld.o  build/aglib_ste.a  \
-o build/hiworld.tos
build/agtsys/libcxx/rmac/zeroboot.o:build/agtsys/libcxx/rmac/zeroboot.o:(.text+0xa6): undefined reference to `__DTOR_LIST__'
collect2: error: ld returned 1 exit status
make: *** [/agt-tools/agtools/makerules.mintgcc:10: build/hiworld.tos] Error 1
All my real skills are undervalued
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Ok, thanks for that info. I'll check it with my local version of mikrocc 7.5 .

While it's a guess - it might be a side effect of upping the c++ std to c++11 for GCC>=6.2 (which is set somewhere very near the bottom of makedefs.mikrocc). This worked for browncc but I didn't test it against mikrocc 7.5 (so many permutations!)
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

So there does seem to be a linking issue with C++ ctor/dtor config for mikrocc 7.5.0 (anything above 4.6.4). I had to resolve this issue for browncc by linking specific book-end objects but I didn't notice this before with 7.5.0. Not sure if this is a recent accident or not.

I don't remember seeing this when I last checked 7.5 on RPI so hopefully it is a minor glitch - but I won't know until I spend more time with it.
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

Ok it was minor after all so I'll push a fix soon (that particular GCC was deadcode-stripping something it needs to keep).
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

That issue should be fixed now. Not sure why it didn't show with other/later gcc versions but hey.
User avatar
prog99
Captain Atari
Captain Atari
Posts: 159
Joined: Thu Jun 19, 2003 8:08 pm
Location: Ross & Cromarty
Contact:

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by prog99 »

Perfect! I've got your toolchain living in docker now.

Code: Select all

mike@Mikes-MBP hiworld (master) $ docker run -v $(pwd):/agt-tools/build -it prog99/agt-tools
echo "COMPILING /agt-tools/agtools/agtsys/libcxx/zerolibc.cpp -> build/agtsys/libcxx/zerolibc.o"
COMPILING /agt-tools/agtools/agtsys/libcxx/zerolibc.cpp -> build/agtsys/libcxx/zerolibc.o
mkdir -p 'build/agtsys/libcxx'
......
/agt-tools/gnu-tools/m68000/bin/m68k-atari-mint-g++ -x c++ -std=c++0x -I/agt-tools/agtools -I/agt-tools/agtools/3rdparty -I/agt-tools/agtools/agtsys -m68000 -Ofast -fomit-frame-pointer -fstrict-aliasing -fcaller-saves -DAGT_CONFIG_WORLD_XMAJOR  -D__ATARI__ -D__M68000__ -DAGT_CONFIG_STACK=16384 -DAGT_TESTING_BUILD -DUSE_TINY_CRT -Wall -Wno-reorder -Wno-unused-variable -Wno-multichar -fno-exceptions -fno-rtti -fno-threadsafe-statics -c -o build/mchdet.o mchdet.cpp
/agt-tools/gnu-tools/m68000/bin/m68k-atari-mint-g++ -nostdlib -nostartfiles -m68000 -Ofast -fomit-frame-pointer -fstrict-aliasing -fcaller-saves -Wl,-Map,build/mchdet.map -Wl,--gc-sections -L/agt-tools/gnu-tools/m68000/lib/gcc/m68k-atari-mint/4.6.4 -L/agt-tools/gnu-tools/m68000/m68k-atari-mint/lib \
build/agtsys/libcxx/rmac/zeroboot.o build/agtsys/libcxx/zerolibc.o build/agtsys/libcxx/zerocrtfini.o build/mchdet.o  build/aglib_ste.a  \
-o build/mchdet.tos
RENAMING build/mchdet.tos -> build/mchdet.prg
cp build/mchdet.tos build/mchdet.prg
GENERATING DISK ./disk2
cp -r build/mchdet.prg ./disk2/auto/.
rm build/hiworld.tos build/mchdet.tos
All my real skills are undervalued
User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3951
Joined: Sat Jun 30, 2012 9:33 am

Re: [A]tari [G]ame [T]ools - 2D prototyping engine for STE

Post by dml »

prog99 wrote: Tue Aug 23, 2022 12:46 pm Perfect! I've got your toolchain living in docker now.
Nice :)
Post Reply

Return to “Coding”