BillyFrontier icon indicating copy to clipboard operation
BillyFrontier copied to clipboard

big endian port

Open kas1e opened this issue 3 years ago • 14 comments

Howdy ! :) This game also works fine now, except one issue : while sounds are good, music are distored , like not endian swapped. But gameplay itself and whole game in terms of colors, etc all fine.

kas1e avatar Sep 30 '22 07:09 kas1e

Please modify the two lines below in Pomme::Sound::LoadMP3AsResource and let me know if the music sounds better:

	info.compressionType = 'swot';   // ---> change to 'twos'
	info.bigEndian       = false;    // ---> change to true

If that works, I'll push the fix to Pomme.

jorio avatar Sep 30 '22 16:09 jorio

Yeah, now music fine ! :) so you can push the fix. Thanks again ! The only problem left for all the Pomme based games is save/load prefs/highscore which for now saves on our side to the root of volume (probabaly this : in the path like work:games/xxxx kill the logic of function which handle paths

kas1e avatar Sep 30 '22 17:09 kas1e

I uploaded aos4version for amigaos4 users, and everywhere in readmes point out that it all your work, and if someone wish he can donate to you, etc. And made a new proper video of how it looks like, check this out:

https://youtu.be/10Ff3GF0uRQ

kas1e avatar Oct 01 '22 09:10 kas1e

Awesome! Thank you for bringing the games to Amiga :)

jorio avatar Oct 02 '22 13:10 jorio

By the way, is all games support SDL2 gamepads ? I asking because it didn't work on my side, so if they should, it is something to look at for me .. But if not, then at least i will know they should't :)

kas1e avatar Oct 02 '22 15:10 kas1e

They do, in fact, CMR requires gamepads for multiplayer.

The only exception is Billy Frontier, it's designed for mouse and keyboards only so I didn't bother adding controller support.

jorio avatar Oct 02 '22 15:10 jorio

The only caveat is your controller must be recognized by SDL_GameController. This is an API that provides standardized button mappings across different gamepad models.

My ports read a big database of button mappings in Data/System/gamecontrollerdb.txt. Perhaps that needs to be tweaked for Amiga, because I think the mappings are OS-specific. The database comes from https://github.com/gabomdq/SDL_GameControllerDB

jorio avatar Oct 02 '22 15:10 jorio

I just see that Billy have this piece of code in main.cpp

	// Init joystick subsystem
	{
		SDL_Init(SDL_INIT_GAMECONTROLLER);
		auto gamecontrollerdbPath8 = (dataPath / "System" / "gamecontrollerdb.txt").u8string();
		if (-1 == SDL_GameControllerAddMappingsFromFile((const char*)gamecontrollerdbPath8.c_str()))
		{
			SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Billy Frontier", "Couldn't load gamecontrollerdb.txt!", gSDLWindow);
		}
	}

But i think it just left-over from copy-paste from another games ?:) Will check CMR and OttoMatic

kas1e avatar Oct 02 '22 15:10 kas1e

Yup, there is some gamepad support, but you can't get very far without a mouse in Billy Frontier — even on the "big 3" OSes ;) (Windows/Mac/Linux)

jorio avatar Oct 02 '22 16:10 jorio

Oh, found something intersting (at least in CMR) - once i add my gamepad to the database, it then works in the game, but not in menu till i start the game and exit back.

I.e. to reproduce: run CMR and try to go to options gamepad settings : it says there is no gamepad. But then, start a game from keyboard, and exit immediately : and now gamepad start to works. It works then and when navigate in menu, and when go to settings, etc. It just looks like that actual initialisation of gamepad happens not at start as expeted, but at start of actual gameplay. It is the same for you ? If not it can be some issues on our side ..

kas1e avatar Oct 02 '22 16:10 kas1e

In OttiMatic all seems fine : gamepad recognized from start and i can navigate in menu, etc right once i start the game.

kas1e avatar Oct 02 '22 16:10 kas1e

In CMR, you can try to call TryFillUpVacantControllerSlots() in InitInput(). (You'll need to remove static from TryFillUpVacantControllerSlots and declare it in input.h so InitInput can see it)

jorio avatar Oct 02 '22 16:10 jorio

Yeas, in CRM what you say help :) So you probabaly need to commit this change, it helps fur sure :)

kas1e avatar Oct 02 '22 17:10 kas1e

Great, when I have time I'll push the mp3 fix for BF and the gamepad fix for CMR. Thanks!

jorio avatar Oct 02 '22 17:10 jorio