Minimal multitask configuration for Hatari

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sat Sep 24, 2016 8:32 pm

Eero Tamminen wrote:The icon RSC files were missing and teradesk.inf had lot of stuff (that didn't exist in the mini setup), but after adding icons it was working fine.

I tried then replicating OL setup. Teradesk from that worked fine too. After adding "myaesmin.prg" and gemsys directory with OL's MyAES & MiNT-mini builds, Teradesk started crashing to bus error. Doesn't help much I admit.

OL, I'm wondering why in your setup there are two of these, and why they differ:

Code: Select all

$ ls -l gemsys/ldg/screen.ldg gemsys/myaes/libs/screen.ldg
163816 gemsys/ldg/screen.ldg
163812 gemsys/myaes/libs/screen.ldg

?



Hello,

for screen.ldg, just a small difference for dithering.

Continue to not understand, renaming gemsys/myaes/kernel/mintmini.prg to something else to not load it, no crash.

Thanks

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sat Sep 24, 2016 10:04 pm

Finally I found the reason of the crash of Teradesk and Thing!

This is not really a bug of MyAES but a bug of this application, they do an integer divide by 0. Some time ago I add to do a test management of signal on SIGFPE and forget to remove it after!

The archive is now fixed and should better work

Olivier
OL

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Sep 25, 2016 5:13 pm

OL wrote:The archive is now fixed and should better work


CLIBBRD doesn't crash in color resolution, but crashes still in mono:
http://myaes.lutece.net/telechargement/myhatari.zip

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Sep 25, 2016 6:49 pm

Eero Tamminen wrote:
OL wrote:The archive is now fixed and should better work


CLIBBRD doesn't crash in color resolution, but crashes still in mono:
http://myaes.lutece.net/telechargement/myhatari.zip


Thanks reporting this, Thing continue to crash exactly as before but only in black and white too! So looks not have found the main issue :(

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Oct 09, 2016 7:27 am

Hello,

I have still found a bug in MyAES sprintf code so I have desactivated it, but it not explain the B&W crash. It is possible the crash is in VDI (but it do the same with TOS and Emutos and under Hatari or Aranym so really no doubt now the issue is in MyAES), debug is quite difficult so I wan't try to debug inside VDI and to be more easy I would like to use fVDI, I'm able to compil the kernel, I think it is enough to print some message for debug, but I'm not able to compil up to now the driver 1 plane. If someone has an archive with it, could you send it to me? I not need compil it for my tests.

For the moment no update of archive.

Thanks

Olivier
OL

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: Minimal multitask configuration for Hatari

Postby helmut » Sun Oct 09, 2016 8:59 am

Maybe the buffer for sprintf is too small? In this case anything can happen. Can you use snprintf instead?

I tried to build 1_plane.sys but I ran into gas-errors (multiply defined symbols) and gave up.

I copied the Makefile from aranym and changed it for the 1_plane-target. The original Makefile was actually a shell-script that did not work at all.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Oct 09, 2016 5:54 pm

Could it be running out of stack? There have e.g. been some issues with stack size with USERDEFs.

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Oct 09, 2016 5:58 pm

helmut wrote:Maybe the buffer for sprintf is too small? In this case anything can happen. Can you use snprintf instead?

I tried to build 1_plane.sys but I ran into gas-errors (multiply defined symbols) and gave up.

I copied the Makefile from aranym and changed it for the 1_plane-target. The original Makefile was actually a shell-script that did not work at all.



It's not an error of size buffer, it's quite difficult to write something working, I should take some working code somewhere and remove what is not need, it's in the todo list for the moment I compil as in the past with mintlib it's only huge size but it work!

I try to compil it too with same issue :-(

Thanks

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Oct 09, 2016 6:05 pm

Eero Tamminen wrote:Could it be running out of stack? There have e.g. been some issues with stack size with USERDEFs.


Not possible, I have think to such issue and double the size with no change, stack size issue is one of most crazy bug to found, I had this case in the past! And it not crash in USERDEF, it crash outside AES, it will be far more easy to find issue if it was in AES.

I think system crash in VDI but not sure, if I'm not able to manage with fVDI I should try to do with Emutos but Emutos is not very easy to read.

Is there any tool working with Mint able to record last trap call of an application?

Olivier
OL

helmut
Captain Atari
Captain Atari
Posts: 169
Joined: Thu Jan 07, 2010 4:30 pm

Re: Minimal multitask configuration for Hatari

Postby helmut » Sun Oct 09, 2016 10:36 pm

There's some experimental code in my kernel in init.c to hook into the vdi-trap. It currently logs v_opnwk-calls, but maybe could be expanded to also print other vdi-calls. Look for MINT_VDI. Don't know if it works with hatari, but maybe hatari has better debug-facilities anyway.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Tue Oct 11, 2016 6:49 pm

Hatari has support for tracing all OS (TOS) trap calls, and several HW related things. It doesn't show names for non-TOS OS calls (e.g. MiNT GEMDOS extensions), nor arguments for all calls, but at least for most things.

For OS calls to be traced, they need to go through trap. If OS internally short-circuits e.g. VDI call so that it doesn't go through trap, then Hatari cannot track it.

Because GEMDOS is a special case (due to exec requiring some extra support from Hatari cartridge image), if something replaces the GEMDOS vector, like MiNT does, one needs to re-set the handling afterwards to continue GEMDOS tracing.

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Wed Oct 12, 2016 5:24 am

helmut wrote:There's some experimental code in my kernel in init.c to hook into the vdi-trap. It currently logs v_opnwk-calls, but maybe could be expanded to also print other vdi-calls. Look for MINT_VDI. Don't know if it works with hatari, but maybe hatari has better debug-facilities anyway.

Good to know, I have include it and looks not crash in VDI :-(
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Wed Oct 12, 2016 5:27 am

Eero Tamminen wrote:Hatari has support for tracing all OS (TOS) trap calls, and several HW related things. It doesn't show names for non-TOS OS calls (e.g. MiNT GEMDOS extensions), nor arguments for all calls, but at least for most things.

For OS calls to be traced, they need to go through trap. If OS internally short-circuits e.g. VDI call so that it doesn't go through trap, then Hatari cannot track it.

Because GEMDOS is a special case (due to exec requiring some extra support from Hatari cartridge image), if something replaces the GEMDOS vector, like MiNT does, one needs to re-set the handling afterwards to continue GEMDOS tracing.


What is the option to do it?

I think it's a bit difficult in multitask system as other application still running and there is always call to system.

I think perhaps I should add in Mint record of last call, and when a crash occure display last system call.

Olivier
OL

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Fri Oct 14, 2016 11:11 pm

You can see all possible options with: "--trace help". Normally you would want to use also "--conout 2", or "os_base" trace option (as that also redirects TOS console vector calls output to console from which Hatari is run from).

If you're on Linux, you can select the trace options from Hatari's Python GUI ("hatariui") Debug -> Trace settings dialog. Trace output with that goes still to the console from which you run it, there's no separate window for the trace output.

You can also trace calls to any arbitrate memory location (e.g. OS function), just set a tracing breakpoint for it in Hatari debugger:

Code: Select all

  b pc = <address> :trace


PS. There are also many other things you can trace with Hatari debugger's breakpoints, see the manual Debugger section:
https://hg.tuxfamily.org/mercurialroot/ ... e_debugger

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Tue Nov 08, 2016 7:59 pm

Hello

some time I not give information.

Still not understand several issues I have notice some more information:

Teradesk issue on empty folder B&W Emutos resolution : Work with my Aranym configuration (with Aranym mint), so my point of view there is an issue in Mint I provide or something in confilct with Hatari (but I think it is Mint issue)
Thing crashing in B&W on page up page down, try under Aranym same issue, try to run it under XaAES, at launch Thing not start perhaps some problem with my XaAES version so not able to verify if it the same.
Try to put Aranym version of Mint I provide for Hatari, I find dragdrop fail desktop freeze, classical Mint work fine, so really issue is around Mint.

So next step update Mint Helmut branch to see if it fix the empty folder and dragdrop issue.

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Thu Nov 17, 2016 11:18 pm

Hello,

I have found the mysterious bug of Teradesk crashing on empty folder in Black and White thanks to Djordje that send me today source code of Teradesk with his lib and PureC include to be able to compil correctly Teradesk and I found the bug link to divide by 0.

The more strange for me that it crash only in B&W, I know there was divide by 0 in Teradesk but there is no effect in other resolutions! I suppose strange value sent to VDI are not verified in B&W.


I hope provide a version soon of the minimal config.

Olivier


OL wrote:Hello

some time I not give information.

Still not understand several issues I have notice some more information:

Teradesk issue on empty folder B&W Emutos resolution : Work with my Aranym configuration (with Aranym mint), so my point of view there is an issue in Mint I provide or something in confilct with Hatari (but I think it is Mint issue)
Thing crashing in B&W on page up page down, try under Aranym same issue, try to run it under XaAES, at launch Thing not start perhaps some problem with my XaAES version so not able to verify if it the same.
Try to put Aranym version of Mint I provide for Hatari, I find dragdrop fail desktop freeze, classical Mint work fine, so really issue is around Mint.

So next step update Mint Helmut branch to see if it fix the empty folder and dragdrop issue.

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Nov 20, 2016 9:53 pm

Finally I have updated the configuration, probably still buggy but I think far better.

- Fix Teradesk issue on empty folder thanks to Djordjé help.
- Mint is now use normally (no special patch for mint mini configuration), Helmut fix dragdrop issue.
- No more MyAES special minimum version for the moment until sprintf emulation still not fixed.

This version can start in 4MB but difficult to said it is usefull.

http://myaes.lutece.net/telechargement/myhatari.zip

Olivier
OL

wotanch
Atarian
Atarian
Posts: 1
Joined: Wed Feb 17, 2016 7:26 am

Re: Minimal multitask configuration for Hatari

Postby wotanch » Thu Nov 24, 2016 10:43 am

Hello,

While it is not directly related to hatari, I have installed this minimalistic build on my real Falcon and it works fine. I have until now struggled to install Mint on my machine (IDE CF card as HD). I'm using PP HD driver which doesn't seem to work well with other versions of Mint I have tried. Would it be possible to post a slightly less minimalistic version which would read Mint.cnf file so I include the network drivers etc.

Thanks !

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Thu Nov 24, 2016 8:21 pm

wotanch wrote:Hello,

While it is not directly related to hatari, I have installed this minimalistic build on my real Falcon and it works fine. I have until now struggled to install Mint on my machine (IDE CF card as HD). I'm using PP HD driver which doesn't seem to work well with other versions of Mint I have tried. Would it be possible to post a slightly less minimalistic version which would read Mint.cnf file so I include the network drivers etc.

Thanks !


This version read mint.cnf in folder "mint" this is classical version without any change from me, but I not put any driver, this version should be able to load them too.

Olivier
OL

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sat Nov 26, 2016 6:40 am

OL wrote:Finally I have updated the configuration, probably still buggy but I think far better.

- Fix Teradesk issue on empty folder thanks to Djordjé help.
- Mint is now use normally (no special patch for mint mini configuration), Helmut fix dragdrop issue.
- No more MyAES special minimum version for the moment until sprintf emulation still not fixed.

This version can start in 4MB but difficult to said it is usefull.

http://myaes.lutece.net/telechargement/myhatari.zip

Olivier


After more tests, I found this configuration not work with TT emulation. It work in ST, STE, Falcon emulation.
BUS error of MyAES launch but nothing related to MyAES as it not do anything (crash before be in main()!)

Olivier
OL

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Nov 27, 2016 5:10 pm

OL wrote:- Fix Teradesk issue on empty folder thanks to Djordjé help.
- Mint is now use normally (no special patch for mint mini configuration), Helmut fix dragdrop issue.
- No more MyAES special minimum version for the moment until sprintf emulation still not fixed.

This version can start in 4MB but difficult to said it is useful.

http://myaes.lutece.net/telechargement/myhatari.zip


Tested quickly in Hatari 2.0+ with TOS 1.04:
* Directory browsing works fine now
* Doesn't start up with 4MB, but works with 8MB & 14MB. This is weird one. With 4MB, the setup tries to boot from A: which doesn't exist, with more RAM, it boots from C: as expected
* With color monitor, starts in ST-low, and changing to ST-med from TeraDesk doesn't work. In ST-low, directory windows use huge font for file & directory names
* Included ST-Guide crashes on startup. Is it supposed to work?
* When dialogs & menus are closed, the underlying parts of screen aren't often redrawn. Eventually it looks like multiple dialogs & menus were still open, although they've all already closed
grab0001.png
You do not have the required permissions to view the files attached to this post.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Nov 27, 2016 5:38 pm

OL wrote:After more tests, I found this configuration not work with TT emulation. It work in ST, STE, Falcon emulation.
BUS error of MyAES launch but nothing related to MyAES as it not do anything (crash before be in main()!)


Maybe it's in MiNTlib crtinit.o, something related to terminal initialization?

M68000 Bus Error reading at address $ff8c85 PC=$166ea

-> This is SCC port B register.

Hatari doesn't yet support SCC emulation for TT (or Falcon). If I change Hatari to ignore access to those registers for TT (like it currently does for Falcon), MyAES boots fine.

EDIT: After looking at some data files, I think that bus error is Hatari TT emulation bug. I'll need to verify it before changing anything though.

OL
Captain Atari
Captain Atari
Posts: 463
Joined: Fri Apr 01, 2005 6:59 am
Contact:

Re: Minimal multitask configuration for Hatari

Postby OL » Sun Nov 27, 2016 9:01 pm

Eero Tamminen wrote:
OL wrote:- Fix Teradesk issue on empty folder thanks to Djordjé help.
- Mint is now use normally (no special patch for mint mini configuration), Helmut fix dragdrop issue.
- No more MyAES special minimum version for the moment until sprintf emulation still not fixed.

This version can start in 4MB but difficult to said it is useful.

http://myaes.lutece.net/telechargement/myhatari.zip


Tested quickly in Hatari 2.0+ with TOS 1.04:
* Directory browsing works fine now
* Doesn't start up with 4MB, but works with 8MB & 14MB. This is weird one. With 4MB, the setup tries to boot from A: which doesn't exist, with more RAM, it boots from C: as expected
* With color monitor, starts in ST-low, and changing to ST-med from TeraDesk doesn't work. In ST-low, directory windows use huge font for file & directory names
* Included ST-Guide crashes on startup. Is it supposed to work?
* When dialogs & menus are closed, the underlying parts of screen aren't often redrawn. Eventually it looks like multiple dialogs & menus were still open, although they've all already closed
grab0001.png


I'm going to verify, rez change. Should work but so many changes and not tested.

STGuide, oups looks like it need 68020 I have to check this point

Screenshot: With wich software do you try, I not notice this and wich CPU speed?

Olivier
OL

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Nov 27, 2016 9:16 pm

If I've understood correctly, TT crash happens in ./gemsys/myaes/myaes68k.prg

Looking at the strings in binary:

Code: Select all

$PatchLevel: GEM library: 0.44.0 $
$Version: MiNTLib 0.60.1 $
$SocketLib: MiNTLib 0.60.1 $


I quickly checked MiNTlib & GEMlib sources and they don't seem to access SCC register. And AFAIK socketlib is part of MiNTlib.

MiNT kernel hardware detection (detect.S) does SCC accesses, but it traps bus errors and HW detection should happen at MiNT startup, so that shouldn't be a problem either. And SCC XDD isn't loaded.

-> So, before updating Hatari, I need to know which component is doing the SCC register access, and then check why it's not trapping bus errors as it should (with those Hatari indicates that SCC isn't present so that Atari program knows to use something else). If there's a common library that has this issue, then it may make sense to skip bus error for SCC registers...

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1536
Joined: Sun Jul 31, 2011 1:11 pm

Re: Minimal multitask configuration for Hatari

Postby Eero Tamminen » Sun Nov 27, 2016 9:19 pm

OL wrote:Screenshot: With wich software do you try, I not notice this and wich CPU speed?


Just TeraDesk that starts automatically when myhatari.zip content is "booted". Machine was 8MB (or 14MB) ST (i.e. 8Mhz) with mono monitor.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest