Hatari port [updated to V1.7.0]

Excellent work on the recent commits :slight_smile:

It’s working much better now.

Hey RTYPE nice to see you around… :slight_smile: hope all is well

@all

Git updated ! PS3 experimental version should now compile and run.

Now , i have to fix the bugs , finish implementation take time to clean-up,standardize the code .

@STLcardsWS , yes well , thanks, long time i have seeing you !

Good progress 7rtype.

BTW - let me know if you would like the repo to be transferred over to the libretro organization - you could be made a co-admin of the repo on libretro then and we could look at including it for a future RetroArch release.

thank you, I see no problem for this.

But ideally, should take the time to redo everything, restarting from official sources. to standardize and clean up the code. but I do not have much time right now.

It also remains to finish the video Falcon, for now the screen is defined & hard-coded at 640 * 480, and manage the different resolutions of falcon (use a larger texture).

And finally finish the implementation and fix the know bugs.

e.g: On ps3 when use L3+R3 to return file browser , if you select a new one ps3 freeze.

Git updated ! Wii experimental version should now compile and run.

Knows Bugs for the WII:

- Joypad Mouse emulation is wierd and a bit unusable in hatari GUI. 
  This is really true for the Wii port. I've have to look at.
	( sorry but only way to change dsk/tos/system ect... ) 

- Sound freeze when you are in Hatari Gui (be aware mute sound before go to the gui)

- If you return to filebrowser (HOME) and select & valid a new dsk , Wii will FREEZE :(

- Everything not working well, It's a debug release , so expect to more bug.

HATARI-libretro Bump to version 1.7.0

Working on linux , android and ps3 . not working on wii for now.

Default Control :

L2 Show/Hide statut (show: JOY/MOUSE MODE | SHIFTON | MOUSE SPEED | NUM JOY | LED ACTIVITY ) R2 Swap kbd pages (virtual keyboard : toggle Page 1 / 2 ) L Show/Hide vkbd (show or hide virtual keyboard ) R Change Mouse speed 1 to 6 (set mouse mode speed : for gui and emu) SEL Toggle mouse/joy mode (switch to joymode or mouse mode) STR Toggle num joy (switch to joy 0 or joy1 ) A Fire / Mouse btnA / Valid key in vkbd B Mouse btn B X Switch Shift ON/OFF (toggle Shift ON or OFF ) Y Hatari Gui (bring hatari GUI)

Quick Install :

I) To build , you have to go to the build/ directory export somes variables to setup your SDK and type make “platform=XXX”.

Ex for android :

> cd build > export PATH=/opt/somewhere/andtoolchains/arm-linux-androideabi-4.4.3/bin:$PATH > make “platform=android”

II) To install , you have to put manually the lib in the retroarch system directory.

Ex for android :

> adb push libretro-hatari.so /mnt/sdcard/ > adb shell >> su >># cp /mnt/sdcard/libretro-hatari.so /data/data/org.retroarch/lib/

III) To configure , you have to :

edit a file named hatari.cfg (see exemple file in cfg/ directory)
to match your rompath,tospath,hdpath,logpath ...
and put it in the HATARI CONFDIR directory.

If you don't put an hatari.cfg in CONFDIR (and then choose the hardway) ,
an alert will tell you that rom is not found
and bring you to GUI ( you have then to go to ROM and choose a valid tos file)

TIPS: in GUI if you have no mouse , you have to push SELECT to toggle to mouse mode.

The HATARI CONFDIR is specific to platform and is for now hardcoded (in main.c) to :

  • /mnt/sdcard/st for android
  • /dev_hdd0/HOMEBREW/ST for ps3
  • sd:/HOMEBREW/ST for wii
  • current path ./ for linux & win platform.

here an Ex of cfg file : hatari.cfg for android



[Floppy]
bAutoInsertDiskB = TRUE
FastFloppy = TRUE
nWriteProtection = 0
szDiskAFileName =
szDiskBFileName =
szDiskImageDirectory = /mnt/sdcard/st
szDiskAZipPath =
szDiskBZipPath =

[HardDisk]
bBootFromHardDisk = FALSE
bUseHardDiskDirectory = FALSE
szHardDiskDirectory = /mnt/sdcard/st/hdisk
bUseHardDiskImage = FALSE
szHardDiskImage = /mnt/sdcard/st/hdisk
bUseIdeHardDiskImage = FALSE
szIdeHardDiskImage = /mnt/sdcard/st/hdisk

[Memory]
bAutoSave = FALSE
nMemorySize = 1
szAutoSaveFileName = /mnt/sdcard/st/auto.sav
szMemoryCaptureFileName = /mnt/sdcard/st/hatari.sav

[Midi]
bEnableMidi = FALSE
sMidiInFileName = /dev/snd/midiC1D0
sMidiOutFileName = /dev/snd/midiC1D0

[Printer]
bEnablePrinting = FALSE
bPrintToFile = TRUE
szPrintToFileName = /mnt/sdcard/st/hatari-printer.txt

[ROM]
szCartridgeImageFileName =
szTosImageFileName = /mnt/sdcard/st/tos/tos100fr.img

[RS232]
bEnableRS232 = FALSE
szOutFileName = /dev/modem
szInFileName = /dev/modem

[Screen]
bAllowOverscan = FALSE
bFullScreen = TRUE
bUseExtVdiResolutions = FALSE
nForceBpp = 16
nSpec512Threshold = 16
nFrameSkips = 0
nMonitorType = 1
nVdiColors = 0
nVdiWidth = 640
nVdiHeight = 480
bShowStatusbar = FALSE
bShowDriveLed = FALSE
bAspectCorrect = TRUE
nMaxWidth = 640
nMaxHeight = 480
nWindowBorderPixelsTop = 0
nWindowBorderPixelsLeft = 48
nWindowBorderPixelsRight = 48
nWindowBorderPixelsBottom = 40
nFullScreenBorderPixelsTop = 0
nFullScreenBorderPixelsLeft = 32
nFullScreenBorderPixelsRight = 32
nFullScreenBorderPixelsBottom = 40

[Sound]
bEnableSound = TRUE
szYMCaptureFileName = /mnt/sdcard/st/hatari.wav
nPlaybackFreq = 44100

[System]
bBlitter = FALSE
bCompatibleCpu = TRUE
bFastForward = FALSE
bPatchTimerD = TRUE
bRealTimeClock = TRUE
nCpuFreq = 8
nCpuLevel = 0
nDSPType = 0
nMachineType = 0

[Log]
sLogFileName = /mnt/sdcard/st/1log.txt
sTraceFileName = /mnt/sdcard/st/1trace.txt
nTextLogLevel = 1
nAlertDlgLogLevel = 1
bConfirmQuit = FALSE

[Debugger]
nNumberBase = 10
nDisasmLines = 8
nMemdumpLines = 8


Cool - I’ll be checking it out soon.

Hopefully it is something we can include in the official Android release soon.

You feel it’s ready for a first release or it still needs more work?

Sorry for delay ,

Ideally i would like some feedback on what is wrong or bugs , but apart of PeteUK i had no feedback.

i know also that vkbd is pretty bad for now (but it’s the only solution i found for now for android )

But in other hand , the motivation for release the Android version is that actually (to my knowledge ) there is no other free alternative to play Atari ST/STE .

hi 7rtype, may I ask you to provide APK file for that Hatari port? I can provide you feedback but I have no skills to compile it myself. thanks

I can only provide a compiled library (for armv7) not the retroarch apk , you have to put the .so in /data/data/org.retroarch/lib/ . (so need rooted device)

http://wikisend.com/download/217362/hatari.tar.gz

be sure to read the readme and the install.txt , and for easy use put an hatari.cfg ( edited to match your files) in the CONFDIR (for now /mnt/sdcard/st in android) .

Only issue I’ve run into at least on Win64 is that the core crashes when trying to be selected in RGUI. I can launch games from the commandline just fine, I can replay games from RGUI’s history just fine, I can even select another game if I come back to RGUI (even on a close of RetroArch) if game was previously started either from commandline or history. But I can not launch an new game from RGUI by loading the Hatari core first.

Hi guys.
Looks like I’ve been late to the party in this topic. Has there been any progress with this project since previous comments?
Looks like I may take a look at this. P.s HI Pete & Stl :slight_smile:

Thanks for reporting , it’s when you launch the core without game , just push a commit , now must works without crashing.

Hi

It seems that the hatari core can be downloaded for Windows, but I don’t see it in Retroarch on Linux.

Hi guys, I installed Hatari libretro 1.8 on Retroarch 1.2.2 (Raspberry Pi 2). Emulator starts fine and I can using my PS3 controller to interact with it, like r-type describe:

L2 Show/Hide statut (show: JOY/MOUSE MODE | SHIFTON | MOUSE SPEED | NUM JOY | LED ACTIVITY ) R2 Swap kbd pages (virtual keyboard : toggle Page 1 / 2 ) L Show/Hide vkbd (show or hide virtual keyboard ) R Change Mouse speed 1 to 6 (set mouse mode speed : for gui and emu) SEL Toggle mouse/joy mode (switch to joymode or mouse mode) STR Toggle num joy (switch to joy 0 or joy1 ) A Fire / Mouse btnA / Valid key in vkbd B Mouse btn B X Switch Shift ON/OFF (toggle Shift ON or OFF ) Y Hatari Gui (bring hatari GUI)

The issue is that I can’t play: D pad, analog pad and A button doesn’t work in game! Only in MOUSE mode, seems that the right analog do something if I go down, left and right. But it’s not clear what it do: Turrican start, but he explode quicly and GAME OVER! LOL!!!

This is my hatari.cfg. What I wrong? Thanks for any help!

[Log]
sLogFileName = /storage/.hatari/1log.txt
sTraceFileName = /storage/.hatari/1trace.txt
nExceptionDebugMask = 259
nTextLogLevel = 4
nAlertDlgLogLevel = 1
bConfirmQuit = TRUE
bNatFeats = FALSE
bConsoleWindow = FALSE


[Debugger]
nNumberBase = 10
nDisasmLines = 8
nMemdumpLines = 8
nDisasmOptions = 15
bDisasmUAE = FALSE


[Screen]
nMonitorType = 1
nFrameSkips = 0
bFullScreen = TRUE
bKeepResolution = TRUE
bKeepResolutionST = FALSE
bAllowOverscan = FALSE
nSpec512Threshold = 1
nForceBpp = 0
bAspectCorrect = TRUE
bUseExtVdiResolutions = FALSE
nVdiWidth = 640
nVdiHeight = 480
nVdiColors = 2
bShowStatusbar = FALSE
bShowDriveLed = FALSE
bCrop = FALSE
bForceMax = FALSE
nMaxWidth = 640
nMaxHeight = 480


[Joystick0]
nJoystickMode = 0
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 1
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Joystick1]
nJoystickMode = 1
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 0
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Joystick2]
nJoystickMode = 0
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 2
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Joystick3]
nJoystickMode = 0
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 3
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Joystick4]
nJoystickMode = 0
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 4
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Joystick5]
nJoystickMode = 0
bEnableAutoFire = FALSE
bEnableJumpOnFire2 = FALSE
nJoyId = 5
nKeyCodeUp = 273
nKeyCodeDown = 274
nKeyCodeLeft = 276
nKeyCodeRight = 275
nKeyCodeFire = 305


[Keyboard]
bDisableKeyRepeat = FALSE
nKeymapType = 0
szMappingFileName =


[ShortcutsWithModifiers]
keyOptions = 111
keyFullScreen = 102
keyMouseMode = 109
keyColdReset = 99
keyWarmReset = 114
keyScreenShot = 103
keyBossKey = 105
keyCursorEmu = 106
keyFastForward = 120
keyRecAnim = 97
keyRecSound = 121
keySound = 115
keyPause = 0
keyDebugger = 19
keyQuit = 113
keyLoadMem = 108
keySaveMem = 107
keyInsertDiskA = 100
keySwitchJoy0 = 282
keySwitchJoy1 = 283
keySwitchPadA = 284
keySwitchPadB = 285


[ShortcutsWithoutModifiers]
keyOptions = 293
keyFullScreen = 292
keyMouseMode = 0
keyColdReset = 0
keyWarmReset = 0
keyScreenShot = 0
keyBossKey = 0
keyCursorEmu = 0
keyFastForward = 0
keyRecAnim = 0
keyRecSound = 0
keySound = 0
keyPause = 19
keyDebugger = 0
keyQuit = 0
keyLoadMem = 0
keySaveMem = 0
keyInsertDiskA = 0
keySwitchJoy0 = 0
keySwitchJoy1 = 0
keySwitchPadA = 0
keySwitchPadB = 0


[Sound]
bEnableMicrophone = TRUE
bEnableSound = TRUE
bEnableSoundSync = FALSE
nPlaybackFreq = 44100
nSdlAudioBufferSize = 0
szYMCaptureFileName = /storage/.hatari/hatari.wav
YmVolumeMixing = 2


[Memory]
nMemorySize = 1
bAutoSave = FALSE
szMemoryCaptureFileName = /storage/.kodi/userdata/addon_data/emulator.tools.retroarch/savefiles/hatari.sav
szAutoSaveFileName = /storage/.kodi/userdata/addon_data/emulator.tools.retroarch/savefiles/auto.sav


[Floppy]
bAutoInsertDiskB = TRUE
FastFloppy = TRUE
EnableDriveA = TRUE
DriveA_NumberOfHeads = 2
EnableDriveB = TRUE
DriveB_NumberOfHeads = 2
nWriteProtection = 0
szDiskAZipPath =
szDiskAFileName = 
szDiskBZipPath =
szDiskBFileName =
szDiskImageDirectory = /storage/emulators/roms/ATARIST/


[HardDisk]
nHardDiskDrive = 0
bBootFromHardDisk = FALSE
bUseHardDiskDirectory = FALSE
szHardDiskDirectory = /
nGemdosCase = 0
nWriteProtection = 0
bUseHardDiskImage = FALSE
szHardDiskImage = /
bUseIdeMasterHardDiskImage = FALSE
bUseIdeSlaveHardDiskImage = FALSE
szIdeMasterHardDiskImage = /
szIdeSlaveHardDiskImage = /


[ROM]
szTosImageFileName = /storage/.kodi/userdata/addon_data/emulator.tools.retroarch/system/tos.img
bPatchTos = TRUE
szCartridgeImageFileName =


[RS232]
bEnableRS232 = FALSE
szOutFileName = /dev/modem
szInFileName = /dev/modem


[Printer]
bEnablePrinting = FALSE
szPrintToFileName = /storage/.kodi/userdata/addon_data/emulator.tools.retroarch/config/hatari.prn


[Midi]
bEnableMidi = FALSE
sMidiInFileName = /dev/snd/midiC1D0
sMidiOutFileName = /dev/snd/midiC1D0


[System]
nCpuLevel = 0
nCpuFreq = 8
bCompatibleCpu = TRUE
nMachineType = 0
bBlitter = FALSE
nDSPType = 0
bRealTimeClock = FALSE
bPatchTimerD = TRUE
bFastBoot = TRUE
bFastForward = FALSE


[Video]
AviRecordVcodec = 1
AviRecordFps = 0
AviRecordFile = /storage/.hatari/hatari.avi

As stated in the github issue , i can’t reproduce it on linux pc.

Hey r-type, nice work on the port. I have a problem though, is there a way to run ipf files in this core? It seems the database used by the playlist itself looks for ipf files, but I cannot run them in this core.

Hi ,

IPF should works with libretro hatari but you should compile it and set IPFSUPPORT IPFDIR .

EDIT: Seem you have to tweak makefile like i stated in the issue or use the hatari on my personal git :

[QUOTE=r-type;33805]Hi ,

IPF should works with libretro hatari but you should compile it and set IPFSUPPORT IPFDIR .

EDIT: Seem you have to tweak makefile like i stated in the issue or use the hatari on my personal git : https://github.com/r-type/hatari[/QUOTE]

I’m having trouble compiling on windows 64 bit:

C:\RetroArch\source\hatari-master>make -f Makefile.libretro "IPFSUPPORT=1" "IPFDIR=C:\RetroArch\source\hatari-master\ipflib_win_x64"
x86_64-w64-mingw32-gcc  -O3 -std=gnu99 -finline-functions -funroll-loops  -fsigned-char -D__LIBRETRO__ -Wno-strict-prototypes -ffast-math -fomit-frame-pointer -fno-strength-reduce  -fno-builtin -finline-functions -DLSB_FIRST -DALIGN_DWORD -DWIN32PORT -DWIN32 -DHAVE_CAPSIMAGE=1 -I./src  -I./src/uae-cpu  -I./src/falcon -I./src/includes -I./src/debug -I./src -I./libretro -I./libretro/libretro-sdk/include -I./libretro/include -I./libretro/utils -I./libretro/uae-cpu-pregen -IC:\RetroArch\source\hatari-master\ipflib_win_x64/include -c -o libretro/uae-cpu-pregen/cpudefs.o libretro/uae-cpu-pregen/cpudefs.c
make: x86_64-w64-mingw32-gcc: Command not found
make: *** [libretro/uae-cpu-pregen/cpudefs.o] Error 127