A tutorial to Amiga emulation on WiiFlow

spinoman

Well-Known Member
OP
Newcomer
Joined
May 5, 2014
Messages
68
Trophies
0
Age
48
XP
294
Country
Italy
hi, this is my guide to set up a complete amiga emulation on wii using uae-wii emulator and wiiflow as a frontend for that. i'm a newbie to amiga emulation, so please forgive any errors.
loading and running hdf files (hard drive images with a game installed) will be a bit tricky, but it can be done, as well as playing a multi-floppydisk game.
i use sd card for my setup, but this can be adapted to usb media.

PART 1 - how to load hdf files in uae-wii

step 0: you need these files
- last version of uae-wii
https://github.com/Oibaf66/uae-wii/releases/download/v12.0/uae-wii-v12-bin.tar.gz
- a working WHDLoad.hdf (without bios inside)
http://lindqvist.synology.me/shieldguide/WHDLoad.hdf
- ADF Opus to modify hdf files
http://adfopus.sourceforge.net/

also, you have to find around some copyrighted material:
kick34005.A500
kick40068.A1200
these are the kickstart bios roms required.
and, of course, a game.hdf file to emulate.

step 1: prepare your WHDLoad.hdf
install ADF Opus
File->Open->WHDLoad.hdf
from Windows Directory window inside ADF Opus drag & drop kick34005.A500 and kick40068.A1200 files under /Devs/Kickstarts/ of the WHDLoad.hdf window
File->Close
you can quit ADF Opus

step 2: install UAE-Wii on your sd card
unpack uae-wii-v12-bin.tar.gz content to your sd card, apps and uae folder will be created on your root directory
copy kick34005.A500 to sd\uae\roms\ and rename it kick.rom
copy kick34005.A500 to sd\uae\roms\ and rename it kick13.rom
copy kick40068.A1200 to sd\uae\roms\ and rename it kick31.rom
copy WHDLoad.hdf to sd\uae\hd
copy your game.hdf to sd\uae\hd

step 3: make some settings
open homebrew channel and launch UAE-Wii
your wiimote now works sideways, home button to open menu, button 1 to cancel, button 2 to confirm.
open menu, hardware option, change amiga model to A1200, confirm.
menu, hardware option, memory option, change FastMem to 8M, confirm.
menu, hd emulation, mount hard drive partition, confirm the next page, select WHDLoad.hdf, confirm.
menu, save confs, save conf file to load at start uaerc.saved, confirm.
menu, quit, yes.

open homebrew channel and launch UAE-Wii again.
if everything works, now you'll be invited to insert volume dh1 in any drive, let's do it.

step 4: load your hdf file
menu, hd emulation, mount hard drive partition, select DH1 on device name on next page, confirm, select your hdf file, confirm.
menu, reset UAE. you'll see hd led blinking and, after some time, your game.hdf will be loaded.
if you want to change game without exiting uae-wii, menu, hd emulation, unmount device, select DH1 and confirm.
now load another game.hdf file on DH1 as shown above and reset the emulator to run it.
if you don't use wiiflow you can stop here, otherwise please continue reading.

(step 5, optional) if you have a whd game instead of game.hdf you have to use ADF Opus to convert it.
basically, all you have to do is to open your whd game (usually yourgame.lha, a packed format), inside you'll find a yourgame.info and a data folder.
calculate the size of data folder, then rename the slave file inside data folder to game.slave (which is the exact name WHDLoad.hdf looks for).
now in ADF Opus create a new hardfile of the right size (large enough to fit the game) and copy all the data subfolder content in it, remember to close volume before exiting. your hdf file is now ready.


PART 2 - how to use wiiflow as a frontend for uae-wii
(first the theory behind this, you can skip it. well, to my knowledge there's no way to pass a hdf file or a multi floppy configuration to uae-wii, because it accepts only a single adf floppy as an argument from wiiflow. but i know that uae-wii saves all of his settings in the uaerc file and loads it at startup. so, that's the idea, if i can have a single uaerc per game and if i can choose which one to use, i can load uae-wii with all the right files already put in DH0 and DH1 volumes. how to do that? my answer is using dosbox-wii)

step 0: you need these files
- latest version of dosbox-wii
https://github.com/dborth/dosbox-wii/releases/download/1.7/
- a working wiiflow configuration with tetsuo shima theme installed
https://gbatemp.net/threads/rhapsodii-shima-5-4.555062/
- a couple of working hdf files
to test and make this guide simple, we'll use aladdin.hdf and turrican.hdf.
when create files remember to use 8.3 filename lenght to make it compatible with dosbox.

step 1: preparing your sd folder structure
move sd\apps\uae\boot.dol in sd\wiiflow\plugins and rename it uae-wii.dol
extract from DOSBox.Wii.1.7.zip boot.dol and copy it to sd\wiiflow\plugins, rename it dosbox-uae.dol
copy DOSBox folder from DOSBox.Wii.1.7.zip in your sd root directory sd\
if not already done, copy all your hdf files in sd\uae\Hd folder
if you have them, copy all your single floppy adf games in sd\uae\floppies
make a new folder sd\wiiflow\boxcovers\amiga

step 2: preparing ini files
open sd\wiiflow\plugins_data\platform.ini and edit it
you must add these two lines in [PLUGINS] section

#DOSBox for launching amiga games
444F5341=AMIGA

now it's time to create two plugin ini files, one for single adf games and one for hdf games.
make a new dosbox-uae.ini and put it in sd\wiiflow\plugins

(blank line)
[PLUGIN]
arguments=-c|c:|-c|{name}
consolecoverid=AMIGA
covercolor=111111
coverfolder=amiga
displayname=DOSBox for Amiga
dolfile=dosbox-uae.dol
filetypes=.bat
magic=444F5341
romdir=DOSBox
rompartition=0

make a new uae-wii.ini and put it in sd\wiiflow\plugins

(blank line)
[PLUGIN]
arguments={device}:/{path}/{name}
consolecoverid=AMIGA
covercolor=111111
coverfolder=amiga
displayname=Amiga
dolfile=uae-wii.dol
filetypes=.adf
magic=414D4947
romdir=uae/floppies
rompartition=0

step 3 - create a dummy adf file to launch uae-wii without any game selected
create a 0 bite size launchme.adf file, i did it with notepad.
copy it to sd\uae\floppies

step 4 - prepare your aladdin and turrican config files which will be used by uae-wii
copy uaerc.saved to backup.cfg
rename uaerc.saved to uaerc (no extension), overwrite if requested. then you have to edit it

find these two lines
hardfile2=rw,DH0:$(FILE_PATH)/WHDLoad.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/WHDLoad.hdf

and add these two lines after the ones above
hardfile2=rw,DH1:$(FILE_PATH)/aladdin.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/aladdin.hdf

this is the result

hardfile2=rw,DH0:$(FILE_PATH)/WHDLoad.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/WHDLoad.hdf
hardfile2=rw,DH1:$(FILE_PATH)/aladdin.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/aladdin.hdf

save it and rename it aladdin.cfg
repeat for turrican.hdf and all your other hdf games you have
put all of your cfg files in sd\uae

step 5 - prepare your batch files that dosbox will launch
with a text editor, create a new batch file for alladin

@Echo off
mount d sd:/uae
d:
copy alladin.cfg uaerc /y
exit

rename it aladdin.bat and put in sd\DOSBox folder

repeat for turrican

@Echo off
mount d sd:/uae
d:
copy turrican.cfg uaerc /y
exit

rename it turrican.bat and put in sd\DOSBox folder

step 7 - how to put your game boxcovers
put your game boxcovers in sd\wiiflow\boxcovers\amiga
these should be the naming used
aladdin.bat.png
turrican.bat.png
launchme.adf.png
yoursinglefloppygame.adf.png

step 8 - create a button in source menu
if you are using the wonderful tetsuo shima theme you know that you have to create or modify a source button menu.
the only important thing is to associate the two magic number we used, the one for uae-wii (single floppy adf games) and the one for dosbox-uae (hdf games). this is mine.

[BUTTON_X]
image=amiga.png
image_s=amiga.png
magic=414D4947,444F5341
source=plugin
title=Commodore Amiga

step 9 - how it works
start wiiflow and go to amiga section. then select a hdf game, dosbox will run the corresponding bat file, the right uaerc will be used now by uae-wii and then it returns to wiiflow, just a couple of seconds needed.
then, b button on wii to return to last used amiga section, launch the dummy launchme adf file and your hdf file will be loaded and booted in uae-wii.
your single adf games work as usual.

step 10 - optional, what's left to do
if you are using amiga database to show info and shapshot you have to add your bat crc code to amiga.ini database
calcute crc of turrican.bat with any tools, this one is online
https://toolslick.com/programming/hashing/crc-calculator
you obtain something like DBE2F5B2
now, search for turrican in amiga.ini under sd\wiiflow\plugins_data\amiga
you'll find
Turrican=33464A|2A9A74C3|810025C5|722869AB|D1608896|7821FC9E|FF9BC...
add the value you have calculated just after the first key code
Turrican=33464A|DBE2F5B2|2A9A74C3|810025C5|722869AB|D1608896|7821FC9E|FF9BC... and it's done.
reloading cache or deleting sd_(magic_number).db file in
sd\wiiflow\cache\lists may help.

uaerc configuration files are very complete, there is the possibility of remapping your wii/gamecube controller to match the keys the game are using. just edit the game.cfg file you have created in sd\uae folder and you have a complete remap file specific for that game only.

applying the same strategy used for hdf files, you can assign multiple adf file to DF0,DF1... floppy volumes and save it in a game.cfg file that a batch will rename to uaerc before launching uae-wii. now multi floppy games are working.

PART 3 - help wanted.
well, it's working even if it's not the most elegant solution.
if anyone wants to suggest some improvement or reformat the post, any help is welcomed.
also, loading time are a bit long for today's tastes. if anyone has some tips to reduce loading times configuring uae-wii emulator please let me know.

happy gaming, spinoman.

edit: adjusted some typos
 
Last edited by spinoman,

Tetsuo Shima

Well-Known Member
Member
Joined
Oct 29, 2008
Messages
1,715
Trophies
1
Age
43
XP
3,743
Country
Italy
So it's possible after all! Too bad that you have to use the dummy adf file and not just launch games like usual, but if a cleaner workaround isn't possible who cares! I thought it was not possible on uae Wii and just gave up.
Thanks my friend for going through this hell.
All my blessing to you!
 

fledge68

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
2,321
Trophies
1
XP
4,127
Country
United States
hi, this is my guide to set up a complete amiga emulation on wii using uae-wii emulator and wiiflow as a frontend for that. i'm a newbie to amiga emulation, so please forgive any errors.
loading and running hdf files (hard drive images with a game installed) will be a bit tricky, but it can be done, as well as playing a multi-floppydisk game.
i use sd card for my setup, but this can be adapted to usb media.

PART 1 - how to load hdf files in uae-wii

step 0: you need these files
- last version of uae-wii
https://github.com/Oibaf66/uae-wii/releases/download/v12.0/uae-wii-v12-bin.tar.gz
- a working WHDLoad.hdf (without bios inside)
http://lindqvist.synology.me/shieldguide/WHDLoad.hdf
- ADF Opus to modify hdf files
http://adfopus.sourceforge.net/

also, you have to find around some copyrighted material:
kick34005.A500
kick40068.A1200
these are the kickstart bios roms required.
and, of course, a game.hdf file to emulate.

step 1: prepare your WHDLoad.hdf
install ADF Opus
File->Open->WHDLoad.hdf
from Windows Directory window inside ADF Opus drag & drop kick34005.A500 and kick40068.A1200 files under /Devs/Kickstarts/ of the WHDLoad.hdf window
File->Close
you can quit ADF Opus

step 2: install UAE-Wii on your sd card
unpack uae-wii-v12-bin.tar.gz content to your sd card, apps and uae folder will be created on your root directory
copy kick34005.A500 to sd\uae\roms\ and rename it kick.rom
copy kick34005.A500 to sd\uae\roms\ and rename it kick13.rom
copy kick40068.A1200 to sd\uae\roms\ and rename it kick31.rom
copy WHDLoad.hdf to sd\uae\hd
copy your game.hdf to sd\uae\hd

step 3: make some settings
open homebrew channel and launch UAE-Wii
your wiimote now works sideways, home button to open menu, button 1 to cancel, button 2 to confirm.
open menu, hardware option, change amiga model to A1200, confirm.
menu, hardware option, memory option, change FastMem to 8M, confirm.
menu, hd emulation, mount hard drive partition, confirm the next page, select WHDLoad.hdf, confirm.
menu, save confs, save conf file to load at start uaerc.saved, confirm.
menu, quit, yes.

open homebrew channel and launch UAE-Wii again.
if everything works, now you'll be invited to insert volume dh1 in any drive, let's do it.

step 4: load your hdf file
menu, hd emulation, mount hard drive partition, select DH1 on device name on next page, confirm, select your hdf file, confirm.
menu, reset UAE. you'll see hd led blinking and, after some time, your game.hdf will be loaded.
if you want to change game without exiting uae-wii, menu, hd emulation, unmount device, select DH1 and confirm.
now load another game.hdf file on DH1 as shown above and reset the emulator to run it.
if you don't use wiiflow you can stop here, otherwise please continue reading.

(step 5, optional) if you have a whd game instead of game.hdf you have to use ADF Opus to convert it.
basically, all you have to do is to open your whd game (usually yourgame.lha, a packed format), inside you'll find a yourgame.info and a data folder.
calculate the size of data folder, then rename the slave file inside data folder to game.slave (which is the exact name WHDLoad.hdf looks for).
now in ADF Opus create a new hardfile of the right size (large enough to fit the game) and copy all the data subfolder content in it, remember to close volume before exiting. your hdf file is now ready.


PART 2 - how to use wiiflow as a frontend for uae-wii
(first the theory behind this, you can skip it. well, to my knowledge there's no way to pass a hdf file or a multi floppy configuration to uae-wii, because it accepts only a single adf floppy as an argument from wiiflow. but i know that uae-wii saves all of his settings in the uaerc file and loads it at startup. so, that's the idea, if i can have a single uaerc per game and if i can choose which one to use, i can load uae-wii with all the right files already put in DH0 and DH1 volumes. how to do that? my answer is using dosbox-wii)

step 0: you need these files
- latest version of dosbox-wii
https://github.com/dborth/dosbox-wii/releases/download/1.7/
- a working wiiflow configuration with tetsuo shima theme installed
https://gbatemp.net/threads/rhapsodii-shima-5-4.555062/
- a couple of working hdf files
to test and make this guide simple, we'll use aladdin.hdf and turrican.hdf.
when create files remember to use 8.3 filename lenght to make it compatible with dosbox.

step 1: preparing your sd folder structure
move sd\apps\uae\boot.dol in sd\wiiflow\plugins and rename it uae-wii.dol
extract from DOSBox.Wii.1.7.zip boot.dol and copy it to sd\wiiflow\plugins, rename it dosbox-uae.dol
copy DOSBox folder from DOSBox.Wii.1.7.zip in your sd root directory sd\
if not already done, copy all your hdf files in sd\uae\Hd folder
if you have them, copy all your single floppy adf games in sd\uae\floppies
make a new folder sd\wiiflow\boxcovers\amiga

step 2: preparing ini files
open sd\wiiflow\plugins_data\platform.ini and edit it
you must add these two lines in [PLUGINS] section

#DOSBox for launching amiga games
444F5341=AMIGA

now it's time to create two plugin ini files, one for single adf games and one for hdf games.
make a new dosbox-uae.ini and put it in sd\wiiflow\plugins

(blank line)
[PLUGIN]
arguments=-c|c:|-c|{name}
consolecoverid=AMIGA
covercolor=111111
coverfolder=amiga
displayname=DOSBox for Amiga
dolfile=dosbox-uae.dol
filetypes=.bat
magic=444F5341
romdir=DOSBox
rompartition=0

make a new uae-wii.ini and put it in sd\wiiflow\plugins

(blank line)
[PLUGIN]
arguments={device}:/{path}/{name}
consolecoverid=AMIGA
covercolor=111111
coverfolder=amiga
displayname=Amiga
dolfile=uae-wii.dol
filetypes=.adf
magic=414D4947
romdir=uae/floppies
rompartition=0

step 3 - create a dummy adf file to launch uae-wii without any game selected
create a 0 bite size launchme.adf file, i did it with notepad.
copy it to sd\uae\floppies

step 4 - prepare your aladdin and turrican config files which will be used by uae-wii
copy uaerc.saved to backup.cfg
rename uaerc.saved to uaerc (no extension), overwrite if requested. then you have to edit it

find these two lines
hardfile2=rw,DH0:$(FILE_PATH)/WHDLoad.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/WHDLoad.hdf

and add these two lines after the ones above
hardfile2=rw,DH1:$(FILE_PATH)/aladdin.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/aladdin.hdf

this is the result

hardfile2=rw,DH0:$(FILE_PATH)/WHDLoad.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/WHDLoad.hdf
hardfile2=rw,DH1:$(FILE_PATH)/aladdin.hdf,32,1,2,512,0,
hardfile=rw,32,1,2,512,$(FILE_PATH)/aladdin.hdf

save it and rename it aladdin.cfg
repeat for turrican.hdf and all your other hdf games you have
put all of your cfg files in sd\uae

step 5 - prepare your batch files that dosbox will launch
with a text editor, create a new batch file for alladin

@Echo off
mount d sd:/uae
d:
copy alladin.cfg uaerc /y
exit

rename it aladdin.bat and put in sd\DOSBox folder

repeat for turrican

@Echo off
mount d sd:/uae
d:
copy turrican.cfg uaerc /y
exit

rename it turrican.bat and put in sd\DOSBox folder

step 7 - how to put your game boxcovers
put your game boxcovers in sd\wiiflow\boxcovers\amiga
these should be the naming used
aladdin.bat.png
turrican.bat.png
launchme.adf.png
yoursinglefloppygame.adf.png

step 8 - create a button in source menu
if you are using the wonderful tetsuo shima theme you know that you have to create or modify a source button menu.
the only important thing is to associate the two magic number we used, the one for uae-wii (single floppy adf games) and the one for dosbox-uae (hdf games). this is mine.

[BUTTON_X]
image=amiga.png
image_s=amiga.png
magic=414D4947,444F5341
source=plugin
title=Commodore Amiga

step 9 - how it works
start wiiflow and go to amiga section. then select a hdf game, dosbox will run the corresponding bat file, the right uaerc will be used now by uae-wii and then it returns to wiiflow, just a couple of seconds needed.
then, b button on wii to return to last used amiga section, launch the dummy launchme adf file and your hdf file will be loaded and booted in uae-wii.
your single adf games work as usual.

step 10 - optional, what's left to do
if you are using amiga database to show info and shapshot you have to add your bat crc code to amiga.ini database
calcute crc of turrican.bat with any tools, this one is online
https://toolslick.com/programming/hashing/crc-calculator
you obtain something like DBE2F5B2
now, search for turrican in amiga.ini under sd\wiiflow\plugins_data\amiga
you'll find
Turrican=33464A|2A9A74C3|810025C5|722869AB|D1608896|7821FC9E|FF9BC...
add the value you have calculated just after the first key code
Turrican=33464A|DBE2F5B2|2A9A74C3|810025C5|722869AB|D1608896|7821FC9E|FF9BC... and it's done.
reloading cache or deleting sd_(magic_number).db file in
sd\wiiflow\cache\lists may help.

uaerc configuration files are very complete, there is the possibility of remapping your wii/gamecube controller to match the keys the game are using. just edit the game.cfg file you have created in sd\uae folder and you have a complete remap file specific for that game only.

applying the same strategy used for hdf files, you can assign multiple adf file to DF0,DF1... floppy volumes and save it in a game.cfg file that a batch will rename to uaerc before launching uae-wii. now multi floppy games are working.

PART 3 - help wanted.
well, it's working even if it's not the most elegant solution.
if anyone wants to suggest some improvement or reformat the post, any help is welcomed.
also, loading time are a bit long for today's tastes. if anyone has some tips to reduce loading times configuring uae-wii emulator please let me know.

happy gaming, spinoman.

edit: adjusted some typos
good job. very thorough.

so what you are doing is basically copying the .cfg files and replacing the current uaerc file so when uae wii plugin/emu is loaded it will use that .cfg/uaerc.

i wonder if i could add a line to plugin ini such as per_game_cfg=sd:/aue/uaerc
then when wiiflow detects this line it will delete sd:/uae/uaerc, use the roms filename and copy (filename).cfg to sd:/uae and rename it to uaerc before launching the emu with the game arg. it will take a slight bit longer to launch the game but not a big deal. the question is where to put the .cfg files, in with the rom (.adf/.hdf) files?

this is all just in thought process. it might be a while before I ever add it to wiiflow.
 

spinoman

Well-Known Member
OP
Newcomer
Joined
May 5, 2014
Messages
68
Trophies
0
Age
48
XP
294
Country
Italy
since i have to use dosbox (and write a tutorial) for me it was simpler that all .cfg files were in same folder of the destination uaerc, so batch file won't be too complicated...

if wiiflow will do this job perhaps it's better that every games has his cfg files in its same rom folder.
i don't know if the delete step is necessary since i think it's possible to make a copy with overwrite option.

do you know other emulator (apart from uae-wii) that can have a benefit from this possibility?


however these are the images i'm using, if someone is interested (copy & past from various sources on the net): one is for launching uea-wii and the other for the source button.
 

Attachments

  • launchme.adf.png
    launchme.adf.png
    837.4 KB · Views: 27
  • amiga.png
    amiga.png
    21.5 KB · Views: 24
Last edited by spinoman,

RunningSnakes

Well-Known Member
Member
Joined
Jun 21, 2018
Messages
841
Trophies
1
Age
48
XP
2,570
Country
United States
@spinoman

This works great!

It seems renaming game.slave and converting the whd file through ADF Opus allows you to name the .hdf to example "Alien Breed.hdf" and boots fine.

A few files i tested not converted by myself required the game to be named "game.hdf" to boot correctly.

I am just learning this hdf file format and eager to gain more knowledge.

Thank you for this awesome tutorial.
 
  • Like
Reactions: spinoman

spinoman

Well-Known Member
OP
Newcomer
Joined
May 5, 2014
Messages
68
Trophies
0
Age
48
XP
294
Country
Italy
@spinoman

This works great!

It seems renaming game.slave and converting the whd file through ADF Opus allows you to name the .hdf to example "Alien Breed.hdf" and boots fine.

A few files i tested not converted by myself required the game to be named "game.hdf" to boot correctly.

I am just learning this hdf file format and eager to gain more knowledge.

Thank you for this awesome tutorial.

hi, if you look with ADFOpus in WHDLoad.hdf\S\Startup-Sequence you'll find these strings

Path >NIL: RAM: C:

cd dh1:
WHDLOAD PRELOAD game.slave

so this version of WHDLoad.hdf loads that exact "game.slave" name+ext combination. other versions found on the net may be different.

to my knowledge, once loaded in DH1 the external name of anynameyouwant.hdf (with "game.slave" inside) it's not important anymore for the emulator, like loading an iso image under a virtual drive in windows.

to check if my hdf files are working or not, i have done all my tests first on my pc using winuae for windows. WHDLoad.hdf on DH0, anynameyouwant.hdf on DH1, reset et voila'... i suggest everyone to do this before passing their games on wii (loading times are mooore acceptable)

when creating bat files it's mandatory to use 8.3 naming convention cause, as you know, dosbox can't handle LFN long file names format, so your anylongestnameonearthyouwant.hdf must have a corresponding anyname.bat and anyname.cfg file.

to manage hdf files ADFOpus it's not the only tool available, there is also this:
https://amitools.readthedocs.io/en/latest/index.html
(maybe useful to someone, a little too complicated for me, i'm not an expert on amiga emulation)
 
Last edited by spinoman,
  • Like
Reactions: RunningSnakes
General chit-chat
Help Users
    Veho @ Veho: Works for me.