Hacking WiiFlow Lite with emulator's database

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
WHAT IS IT?
############

It displays a game info window and synopsis for almost all emulated systems. It's also possible to show a snapshot and a cartridge image.
Here are some screenshots :

snes.png
gb.png

megacd.png
atarist.png



HOWTO
########

- Download and extract this modified WiiFlow Lite : https://github.com/Wiimpathy/WiiFlow_Lite/releases/download/v5.1.0/wfl_v5.1.0_DB.zip
EDIT : Now you can use the Official version.

- Download the databases for each console/computer : https://www.mediafire.com/file/4blrpsqqn5g0bdu/Wiiflow_Database.7z/file

- Download the snapshots and cartridge/disks images : http://www.mediafire.com/file/6a563zva8c7weew/Wiiflow_Snapshots.7z/file
https://www.mediafire.com/file/xegmyb7uxid4nki/Wiiflow_CartDisk.7z/file

- Extract the images and databases to SD or USB. By default, Wiiflow searches on sd card. If you want to change the paths to USB, edit wiiflow_lite.ini :

* dir_cart=usb1:/wiiflow/cart_disk (It's the cartridges, CD, and disks images)
* dir_snap=usb1:/wiiflow/snapshots (In-game snapshots)
* dir_plugins_data=usb1:/wiiflow/plugins_data (databases)

- Now launch WiiFlow, select a plugin and press + button on a game.


Notes
#####

If you want to help filling data or adding images you'll find what's missing in the missing.zip.

Identify the system

To know which database to use for the current plugin, Wiiflow reads a file called platform.ini in /wiiflow/plugins_data.
This file is a list where a plugin magic number corresponds to a platform name. For example, the current plugin is genplus-gx_cd :
53454751=MEGACD
From there it will try to load info in /wiiflow/plugins_data/MEGACD and images in /wiiflow/cart_disk/MEGACD and /wiiflow/snapshots/MEGACD

The magic numbers are from Abz masterpiece pack.
If you have modified any .ini plugins files (specifically their magic numbers), you must edit/add you magic # platform.ini.


Identify the game

Due to various naming conventions (tosec/goodset/no-intro...or just user renamed!), we can't rely on names only.
CRC is fast enough for almost all systems. Few years ago, it was hard to find good crc lists so that would have been a lot of
hit and miss. Now, it's a lot better even for less known platforms.
CD based system like PS1 and MegaCD are using serials(found in iso's header) instead. CRC would be much too long, about 30s to calculate!

The databases are formatted like wiitdb.xml. Like Wii games, each game has a unique GameID(from Screenscraper.fr). Here's how it works in Wiiflow:

For example, Pocky & Rocky (USA) for Super Nintendo.

1. Look for the GameID in SUPERNES.ini

a) Based on filename minus region flags. If found go to #2 else b).
b) Based on CRC in this case.

2. Search the GameID(2267AA here) in SUPERNES.xml to retrieve the game's detail.

3. Look for images first based on the game's name from the database else with the GameID.


Known issues/Todo

- There may have issues with combined plugins.
- ScummVM is not implemented...
- Dos : add new crc to DOS.ini(from libretro db).
- Dos : parse the .conf files to retrieve the exe path and get crc.

- The databases are very incomplete, sometimes malformed or contains invalid characters.
- There's no default cart/snapshot in Wifflow when not found.
- The rating /20 should be shifted in carbonik theme.
- The 'coop' value isn't used in Wiiflow.

I'm done with this stuff, finished or not. Do what you want with it. Here's the source code: https://github.com/Wiimpathy/WiiFlow_Lite/tree/Plugins_Database

CREDITS
########
screenscraper.fr, thegamesdb.net ...
 

Attachments

  • Missing.zip
    1.9 MB · Views: 331
Last edited by Wiimpathy,

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
OK fledge68, I've sent you a Pull request.

I've added Dosbox in the Todo. Right now, there's no fallback if the name isn't found when using the plugin with .conf files. It would need a special case like what I've done for Atari st and .cfg files. It'd be a bit more complex because the .conf could contain any commands. But it should be possible to guess the exe path and compare crc...
 
Last edited by Wiimpathy,

fledge68

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
2,159
Trophies
1
XP
3,633
Country
United States
so here's some things that i'm not sure about.

1. the rating (16/20, 8/20). do we really need to show this? at first i didn't even know what it was. i personally would like to omit that.

2. the controllers. again do we really need to show this? i can see text showing how many players or co op. or maybe something indicating its a light gun game or a keyboard is required.

3. i see you omitted the text genre:, publisher:, developer:, etc.... maybe to give more room for the snapshots and carts? personally i think we need to add this text back. and maybe put buttons on the right to click to view the snapshot or cart.

everyone's feedback is welcome. otherwise i looked over the code and all the database and ini files and want to thank wiimpathy for doing all this and all the time he spent on it. thank you vey much! well done as always!
 

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
1. Yes, it's a screenscraper.fr user's rating, you can remove it or maybe make it optional. There's very few PEGI or other rating data, so I've used that instead.

2. Just like for Wii/GC games it shows the number of players. Personally I found it useful. And the coop value too, but for that we should perhaps add a new icon and the corresponding code off course...
Regarding the control type, it's just the default and same controllers in all databases. I didn't bother to change them per system (keyboard for computers, required classic/GC for N64 etc.).

3. You're right, there's a lot less space with these texts particularly in languages other than English. It's still not enough sometimes specially with carbonik theme. I like to have this general view with info + both images. At first, I thought of another solution : truncate the text at a max length and add 3 dots. And a scrolling text when hovering with the Wiimote.
Your idea to toggle between snapshot or cart(if I understand well?) may be an alternative. I'm also curious about other's suggestions...


Re-creating the databases took more time than I thought. The MegaCD serial detection is homemade because I couldn't find any info about headers. Some of the atari st pasti crcs are a bit exclusive too.
But with about 50 systems, I'm sure you'll forgive all the mistakes!:)
 

fledge68

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
2,159
Trophies
1
XP
3,633
Country
United States
so i looked at dosbox wii conf files. using m_cfg would be good except when we get to the end [autoexec] no longer use 'key'='value'.

so i'm thinking read the conf like a text file. read 2 lines of it (if the line is just a \n\r then skip it). if the 2nd line = 'exit' then the first will contain the name of the games main executable. with the path to the conf file it would be easy to just add 'games' to the end. with this path and the name i should be able to get the crc.

how does this sound @Wiimpathy
 
Last edited by fledge68,
  • Like
Reactions: Alexander1970

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
You're right, you have to parse it yourself. There could be any Dos commands in [autoexec] though. The 'exit' command isn't mandatory for example.
It's not that simple to get the game's path. The .conf or 'romdir' doesn't give you the full path. That was my plan that is also far from perfect:

- retrieve 'mount c ...' line and just keep 'root' path. (mount c usb:/dosbox/games)
- retrieve 'cd ...' line to keep game's folder. (cd prehist2)
- concatenate both : usb:/dosbox/game + prehist2
- detect line containing .exe|.com|.bat to get game's executable.
- path + executable

In Tetsuo pack : https://gbatemp.net/threads/dosbox-conf-and-map-files-collection-for-wiiflow.348496/, there are cases where it wouldn't work like Pinball Dreams because D is used to mount the iso... Not much time right now... If you have better ideas...

Oh, and by the way, the Dos database isn't made yet!
 
  • Like
Reactions: Alexander1970

fledge68

Well-Known Member
Member
Joined
Jan 30, 2012
Messages
2,159
Trophies
1
XP
3,633
Country
United States
You're right, you have to parse it yourself. There could be any Dos commands in [autoexec] though. The 'exit' command isn't mandatory for example.
It's not that simple to get the game's path. The .conf or 'romdir' doesn't give you the full path. That was my plan that is also far from perfect:

- retrieve 'mount c ...' line and just keep 'root' path. (mount c usb:/dosbox/games)
- retrieve 'cd ...' line to keep game's folder. (cd prehist2)
- concatenate both : usb:/dosbox/game + prehist2
- detect line containing .exe|.com|.bat to get game's executable.
- path + executable

In Tetsuo pack : https://gbatemp.net/threads/dosbox-conf-and-map-files-collection-for-wiiflow.348496/, there are cases where it wouldn't work like Pinball Dreams because D is used to mount the iso... Not much time right now... If you have better ideas...

Oh, and by the way, the Dos database isn't made yet!
oh right .... usb:dosbox/games + game folder + executable. i was forgetting the game folder. i have tetsuo's pack but only looked at a few of the conf files.
in your packs i see a dos.xml. isn't that the Dos database?
 
  • Like
Reactions: Alexander1970

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
Yes, the data is there. I meant the .ini with the crcs. They are from screenscraper.fr, and they don't seem to match any exe. The crc from libretro are far better.
I have to recreate a DOS.ini with their data instead. Or if anyone with scripting skills can help, you're welcome.
 
  • Like
Reactions: Alexander1970

cebolleto

Well-Known Member
Member
Joined
Mar 5, 2010
Messages
197
Trophies
0
Age
40
XP
1,755
Country
What a great job!
I finally found some time to test it, thanks a lot @Wiimpathy
The way you match the screenshots instead of using the rom name works much better than trying to rename them

A bug I noticed... it seems that you cannot navigate Wii or Gamecube isos anymore with this mod
 
  • Like
Reactions: Alexander1970

Wiimpathy

Well-Known Member
OP
Member
Joined
Mar 3, 2010
Messages
939
Trophies
1
XP
2,214
Country
France
Thanks, glad you like it.

Regarging the bug, is there a crash when you open Wii or GC coverflow? Are you using source menu?
Normally, you should still be able to access sources other than plugins.

It also seems that Fledge68 has modified this gameinfo code and possibly fixed some bugs. No build yet but you can compile it if you want: https://github.com/Fledge68/WiiFlow_Lite
 
  • Like
Reactions: Alexander1970

Tetsuo Shima

Well-Known Member
Member
Joined
Oct 29, 2008
Messages
1,685
Trophies
1
Age
43
XP
3,402
Country
Italy
@Wiimpathy I noticed that wonderswan screenshots are not vertically aligned to the frame. The top and bottom transparent margin is bigger than the frame. No problems with the left and right margins.
They should look like this
2Arc The Lad - Kijin Fukkatsu.png
They are 256 x 224 pixels
They should be 256 x 144 pixels
 
Last edited by Tetsuo Shima,
  • Like
Reactions: Alexander1970

RunningSnakes

Well-Known Member
Member
Joined
Jun 21, 2018
Messages
539
Trophies
0
Age
48
XP
1,777
Country
United States
Here are 1050+ GBA cart_disc files for download if anyone is interested. Thank You Wiimpathy for this tremendous add-on. Also to fledge68, without your devoted & continued expansion of this great loader, this would not be possible. Thank You so much.

Added a few fixes to GBA cart_disk.

Added 170 Mega Drive cart_disk.
 

Attachments

  • #-C.zip
    7.4 MB · Views: 375
  • D-H.zip
    7.4 MB · Views: 272
  • I-N.zip
    7.3 MB · Views: 259
  • O-SP.zip
    6.6 MB · Views: 313
  • SS-Z.zip
    6.4 MB · Views: 287
  • GBA Fix (29).zip
    1,004.4 KB · Views: 248
  • Mega Drive cart_disk.zip
    6.3 MB · Views: 311
Last edited by RunningSnakes,
General chit-chat
Help Users
  • No one is chatting at the moment.
    KennieDaMeanie @ KennieDaMeanie: Might be the first dlc I actually buy