Update Hatari 2.1.0

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all !

In order to watch one of my colleague's latest demo released at Alchimie 12, I compiled a recent version of Hatari 2.0 on the Pandora :)

https://hatari.tuxfamily.org/

Grab it on the Repo while it's hot:

http://repo.openpandora.org/?page=detail&app=hatari-magicsam

/!\ N.B (updated in build #2): You'll need a tos.img file in appdata/hatari-magicsam for this emulator to work /!\

If you don't have any, you still could give EmuTOS a try:

http://emutos.sourceforge.net/en/

What's new in build #1 ?

- Thomas Huth et al. Hatari 2.0 (latest commit on November 11th, 2017)
- Compiled with @ptitSeb 's latest beta Code::Blocks (GCC 7.2)
- Uses SDL 1.2 instead of SDL 2.0
- Source code is in the PND

TODO:
- Bump version to 2.1.0 (released in early February 2018) (fixed in build #5)
- Add some documentation to the package (the user manual for example). (fixed in build #5)
- Use @notaz ' improved SDL instead of stock SDL ? (no, it glitches...)
- Add FreeMiNT to the package ? http://wiki.sparemint.org/index.php/FreeMiNT
- Auto overclock to 800 MHz ?
- /!\ Try to get the SDL 2.0 version to work /!\ (authors might drop SDL 1.2 support in the future)
- Add EmuTOS source code to the package (fixed in build #5)
- Update EmuTOS source code accordingly (fixed in build #5)
- Recompile with support for IPF files ? http://www.softpres.org/download or https://fengestad.no/libfs-capsimage/ (compiled libfs-capsimage v4.2 with -Wno-narrowing, but v5 is required...) (fixed in build #5)
Hatari defaults to version 5.1, but you can also use the older 4.2 version
if 5.1 is not available for your OS. You can change this by modifying
"SET(CAPSIMAGE_VERSION 5)" into cmake/FindCapsImage.cmake
- Make the python UI work ?
- Automatically download EmuTOS when no tos.img found ? (fixed in build #4)
- Update EmuTOS to latest version (0.9.9.1) (fixed in build #5)
- Change datadir to root of appdata directory (fixed in build #2)
- Reconfigure the menu key to [START] (fixed in build #3)
- Default to fullscreen mode (fixed in build #3)

Known issues:

None at the moment, but I'm completely new to the Atari scene, so please let me know if something is not working correctly, and I'll do my best to fix it ASAP.

- Hatari is a little too slow @ 600 MHz, even with all optimizations ON. /!\ Overclocking to ~800 MHz is advised ! /!\
- Auto-save/start function doesn't work reliably (@b_o_b)

Cheers, Magic Sam
 
Last edited:

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Thanks for a new build of this. It seems to run fine, although as yet I've not got a tos.img that it will accept. I tried a v100 and a v206 tos, and a 206 that was working with skeezix's old hatari 1.40.

The MD5es of my TOS files are:
tos100.img d0f682ee6237497004339fb02172638b
tos206.img e690bec90d902024beed549d22150755

The one I had working with the old 1.61 was probably the 206 one there, as I don't have a record of any other versions on my main machines, but I've not checked.

It says 'could not load tos.img' when I start it, IIRC.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all,

@levi : thanks for giving this a try, it's really appreciated :)

Everything is working fine on my end with TOS 1.62 (US) in appdata/hatari-magicsam/share/hatari:

pandora:/media/Pandora1/pandora/appdata/hatari-magicsam/share/hatari$ md5sum tos.img
febb00ba8784798293a7ae709a1dafcb tos.img

Could you double check both name and path please ?

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Ah, so it needs to go inside pandora/appdata/hatari-magicsam/share/hatari, rather than the root of the specific appdata folder, or a 'firmware' folder or something. That's unusual, and a little tautological, but you did say that above now that I look. And that works with every tos I've tried on it.

I managed to get two games I've got to work; Buggy Boy was straightforward, and I managed to get Mole Mayhem to work once I realised it wanted an STe, and for that I needed a 1.62 (UK) TOS.

It'd be nicer if it remembered the 'default disk path' or whatever it's called that you can set to make finding your discs quicker between sessions. But the mouse implementation in windowed mode is now much nicer versus skeezix's old versions.

I couldn't get any of the demos I tried from pouet.net to work - I downloaded three high scoring ones from this last year, including I guess the one you built this for; glkzilla, but if I mount any of them the system is slow to boot, the disc light stays on, and when I try to access the drive in GEM, it says drive not ready (or the ST equivalent, I forget).
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi @levi,

I'll change the default directory for the TOS file to a more logical location in a next build :)

Glkzilla works like a charm on my end, could you please give more details ? What other demos did you try ?

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
I tried Glkzilla, Execute and Midnight Sun, all 2017 demos downloaded using the links from pouet.net.

I'm not sure how much more information I can supply. It was clearly trying to boot from the disc when I rebooted the machine with the disc in (a benefit of the 1.62 TOS it seems - 1.00 just ignores a disc in the drive and boots to GEM). I can see the disc light is on and the sector numbers are changing. On eventually entering GEM the numbers have frozen and the drive light is stuck on, and I can't access the contents of the drive by double clicking the drive icon.

Is it worth me checking the pndrun.out?
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi @levi,

This is what I did to get Glkzilla running (from an empty appdata directory):

- Start hatari a first time to create appdata/hatari-magicsam directory
- Hatari will warn you about the missing tos file, press OK.
- Press F12 to go to the menu and quit Hatari without saving
- Copy a valid tos.img file to appdata/hatari-magicsam/share/hatari
- Restart Hatari, it should find the new tos.img file, the screen will go white.
- Press F12, and go to Floppy disk.
- Browse to the directory where Glkzilla is and insert it into drive A:
- Go back to the main menu, select "reset machine" and hit OK.
- The demo boot screen should start, hit ENTER
- Enjoy !

I hope that helps :)

Cheers, Magic Sam
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all,

@lordbobjones : thanks for the kind words, it's really appreciated :)

@levi : I hope the procedure I gave you this morning works. I noticed the emulator does frameskip a little at 600 MHz. I'll see what I can do about it ASAP.

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Thanks for the continued support. MagicSam. I got glkzilla working in the end. The trick seems to be once I click on the glkzilla.zip and it opens it up so I can see the contents, is to click ok there. If I look around inside the zip and open up a subfolder before clicking on okay it won't load and after you eventually get into GEM, the A drive doesn't respond. I'm not sure why it offers to look inside zips to be honest, since it doesn't seem to work on anything I've tried and after you click 'okay' it just shows the zip filename as if you hadn't been poking around inside, so it's unclear that it should behave any differently.

FWIW, I can't get Execute or Midnight Sun to work. Midnight Sun opens up to a FDD and HDD directory, but if I click on the FDD folder then okay it I get an inaccessible A drive, and if I just stop at the top level of the zip it tries to boot it but fails - I don't think I checked the A drive after that.

One other feature request from skeezix's old versions - in those he'd reconfigured the emulator menu to pop up when you press start, which is easier than the two presses to hit F12 on Pandora. His version also starts up in a smaller window that fits the Pandora's desktop perfectly, but your fits the screen perfectly once I press F11 to go full screen. It might be preferable if it started by default in full screen so the menus don't go offscreen meaning you need to move the window around using the shift modifier, but I guess that's something I can configure myself if I save the settings.

I also tried The Dark Side of the Spoon demo which was shipped with Skeezix's old emulators. It runs in your emu with much less tearing on my GHz Pandora, although there still is some. That disc is in .st format, so that works as do zipped discs like the demos I downloaded
 

Stainy

Well-Known Member
Joined
Feb 28, 2005
Messages
1,123
Age
48
Location
Born UK Living USA
Thanks MagicSam :) I installed it and realised I have two now... did Skeezix or something do a version ? I had a HDD version also.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Yes, @skeezix made a 1.4 release and a 1.6 release. I currently have three* hatari's installed on my system, which may be excessive as I've not yet found anything his versions can do that MagicSam's can't.

Oddly, if I look on the repo today, skeezix's version from 2012 claims to be version 2.0.2, but PND manager doesn't seem to have picked up on that and upgraded me to it. It's also something of a mystery why I have both 1.4 and 1.6.

FWIW, you can also enable a HDD in this version, but you have to create the file initially on the linux side. I'm not experienced enough in driving an ST yet to be sure I know how to format it correctly either - I'll need to do some testing on that I think.

*four if you count the HDD and non-HDD versions on 1.6.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all :)

I'm compiling an up-to-date version of Hatari (latest commit on November 19th) in Release mode with all the extra CFLAGS from @ptitSeb 's Code::Blocks. This new version should allow you to put the tos.img file at the root of the appdata directory.

Stay tuned ;)

Cheers, Magic Sam
[doublepost=1511124117,1511117767][/doublepost]Hi again,

I'm uploading build #2 to the Repo ! EDIT: done ;)

http://repo.openpandora.org/?page=detail&app=hatari-magicsam

What's new in buid #2 ?

- Recompiled using latest source commit from November 19th.
- Data directory is appdata/hatari-magicsam now (i.e no longer need to put tos.img in share/hatari)
- Updated source code is in the PND

Cheers, Magic Sam
[doublepost=1511126870][/doublepost]Hi again,

I'm already working on build #3 which will start in fullscreen mode and have the menu key (F12) mapped to Left Alt a.k.a the [START] button on the Pandora :)

Cheers, Magic Sam
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Just gave this a spin. Looking at the github changes since build #1 I don't think there are any changes that affect the emulation - it all seems to be stuff to help people debugging ST software using it. And indeed, I've seen no regressions in the emulation, although I even tried unpacking the Execute demo and that didn't help it boot (even in STE mode with 2MB of RAM). Glkzilla still runs fine though, as does Mole Mania which I also tested.

And it seems the easiest way to make a hard disc for this is to make an empty folder somewhere sensible, then specify that under the hard discs submenu as a GEMDOS disc image - you'll be able to browse within that folder as it maps through the folder in linux. I also tried making a 40MB file of zeroes and specifying that as either an ASCI or IDE drive, but none of those approaches resulted in a drive icon that I could then format from inside GEM, but now that I've tried it, a linux folder you can manipulate from outside the emulator and files magically appear within seems the easiest workable solution anyway.

For some reason, PNDmanager didn't offer me an update to this despite seeing the build released in the past 24 hours. Maybe it's related to the way it won't offer me an update to skeezix's old Hatari 1.6. But I simply removed it using PNDmanager and reinstalled it and that seems to be the new version I think.

I'll just mention that since configuring a GEMDOS hard disc, a 'cartridge' drive has also popped up containing a hatari.tos which on double clicking plays a jaunty tune and displays a list of shortcuts you can press. Unfortunately, they're activated in combination with the altGR/right alt/meta key, none of which my Pandora keyboard possesses. But I can live without the features the shortcuts permit.

FWIW also, on updating I found this is still picking up my tos.img from share/hatari, I guess because it's location is configured in the emulator menu, and I've saved my settings before now, so I have a settings file in my appdata, and that'll override whatever is in the pnd. But I've configured my menu access to the start button there, and set it to start in fullscreen, so I guess I'm ahead of you there, Magic Sam ;)
 

b_o_b

Advanced Member
Joined
Sep 7, 2010
Messages
1,318
Thanks! Gave it a try and works pretty well. The biggest advantage of this version (next to improved compatibility) is the auto-save/start function.
This wasn't working at all on the 1.4/1.6 version. In this version it works - but not flawless. It is kinda buggy but could very well be caused by using the dev. version.

If it is not too much work, would it be possible to compile the stable 2.0 version? I can then compare it with this version and see if stability improves.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all :)

Build #4 is on the Repo !

http://repo.openpandora.org/?page=detail&app=hatari-magicsam

What's new in build #4 ?

- Added EmuTOS 0.9.8 to the package
- A simple zenity script will ask you whether you want to try it on first boot if no other tos.img file is found

Cheers, Magic Sam
[doublepost=1511602721,1511602073][/doublepost]Hi again,

@b_o_b : thanks for the kind words, it's really appreciated ! I'll see what I can do regarding those auto-save/start issues.

Cheers, Magic Sam
[doublepost=1511605823][/doublepost]Hi again,
It'd be nicer if it remembered the 'default disk path' or whatever it's called that you can set to make finding your discs quicker between sessions.
That's already possible: Menu -> Floppy disks -> Default floppy images directory -> Browse ;)

EDIT : @levi : Midnight Sun is working fine (but slow) here with TOS 1.62 (followed the same procedure as for Glkzilla). Execute refused to start though...

EDIT 2: could you please unzip the demos that failed to start before and give them a new try ?

EDIT 3: I tried the spoon demo (with EmuTOS ;) ).Nice demo indeed but quite demanding. Hatari frameskips a lot even with OC @ 800 MHz. I wonder whether @notaz ' improved SDL could help with the screen tearing ?

Cheers, Magic Sam
 
Last edited:

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,379
Location
Somewhere off the coast of the EU
Hi all :)

That's already possible: Menu -> Floppy disks -> Default floppy images directory -> Browse ;)
Yes, and if you then go save your config using the buttons in the main menu, it'll save that setting for next time too, which is what I really wanted.

I finally managed to get Midnight Sun to work. The trick was after unpacking it, reading the readme in the FDD folder, and it suggested I really should configure my emu to be a 4MB STe - I was previously running as a 2MB STe only. That did it, and it'll either start if you select the ZIP file as the disc, or you set the floppy disc to be MIDSUN.FDD/MIDSUN1.MSA1 from inside the zip file- you don't need to unpack it. Then, when it's booted, loaded and told you to insert disc 2, swap the floppy to be MIDSUN.ZIP/MIDSUN.FDD/MIDSUN.MSA2, and after that's loaded, do likewise for disc 3. I haven't experimented with the MIDSUN.HDD folder yet - that might be easier to load.

Performance wise the demo runs well on my GHz pandora at 1.1GHz. There's a little slow down as screens load data in, but once that's done it throws around graphics like there's no tomorrow. I've been impressed by the audio in these demos compared to some of the games I've tried, but now I read that the STE can play back PCM audio, while the traditional ST is limited by its AY3 chip.

This demo doesn't seem to be playing one long sample for audio like other's I've tried, that can get out of sync with the graphics if the CPU can't keep up (PCM audio playback doesn't seem to use the CPU). This uses a more tracker-like system where the CPU handles the scheduling of samples, but plays them back using PCM. When the CPU gets overloaded or blocked loading new data, it slows down being able to schedule the sample playback, so the beat changes, slowing up.

The base STE apparently doesn't feature a blitter chip, so how it's doing some of those graphics, I don't know!
[doublepost=1511652487,1511652164][/doublepost]Notaz's SDL helps mostly with scaling as far as I know, using the OMAP's Tiler subsystem I think rather than needing the CPU to do the work. How much that would help with Hatari I don't know. The Dark Side of the Spoon runs well on my GHz Pandora at 1.1GHz with TOS 1.62 - I couldn't tell if it was sticking to 50fps at every point, but it didn't seem obviously slow at any point as I recall.
 

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,222
Age
37
Location
Innsmouth, MA
Hi all,

Build #5 is on the Repo:

http://repo.openpandora.org/?page=detail&app=hatari-magicsam
What's new in build #5 ?

- Bumped Hatari to 2.1.0 (latest commit on February, 20th 2018)
- Compiled with support for IPF files (libcapsimage 4.2)
- Bumped EmuTOS to 0.9.9.1
- Added the manual in the Documentation menu
- Updated all source codes in the PND
Cheers, Magic Sam
[doublepost=1519585932,1519584428][/doublepost]Hi again,

@b_o_b : could you please give this new version a try and tell me whether it solved your auto-save/start issues ? Thanks :)

I also had to comment a couple of lines in src/floppy_ipf.c in order to get Hatari to compile:
Code:
        //if ( IPF_State.CapsImageType[ Drive ] == citKFStream )
        //      IPF_Eject_RawStreamImage ( Drive );
Testing and feedback regarding IPF support would be really appreciated :)

Speaking of IPF support, I used Frode Solheim's libfs-capsimage from FS-UAE:

https://fengestad.no/libfs-capsimage/

Cheers, Magic Sam
 
Last edited:
Top