hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
487 stars 75 forks source link

"Street Race", missing Nokia middle button keycode, missing rendering features #67

Closed Nokia64 closed 3 years ago

Nokia64 commented 4 years ago

I've finally backed up Street Race from my phone. title

After firing it up on FreeJ2ME, I've come across two issues:

Nokia middle button softkey is not implemented at all:

As of Nokia Javadocs:

public static final int KEY_SOFTKEY3
Key code constant for select key, middle softkey or second command button key. Not all devices have this key. The value is -5.

Screenshot from 2019-12-21 13-12-44nokia-6230i The middle choice "Start" corresponds to that little shiny button in the middle of the phone's joypad Since you had the constant already defined but never used, a quick fix let me get through the game:

        if(useNokiaControls)
        {
            switch(keycode)
            {
                case KeyEvent.VK_UP: return Mobile.NOKIA_UP;
                case KeyEvent.VK_DOWN: return Mobile.NOKIA_DOWN;
                case KeyEvent.VK_LEFT: return Mobile.NOKIA_LEFT;
                case KeyEvent.VK_RIGHT: return Mobile.NOKIA_RIGHT;
                case KeyEvent.VK_ENTER: return Mobile.NOKIA_SOFT3;
            }
        }

This obviously broke FreeJ2ME's menus because they expect a "5" press. I've opened a pull request with what I consider to be the necessary changes for this to work with FreeJ2ME

Missing decoration elements:

FreeJ2ME / J2ME Loader Screenshot from 2019-12-21 13-13-29Screenshot_20191221-122426

Might it be related to missing polygon/triangle drawing features? Issue #15 ?

recompileorg commented 4 years ago

I'm pretty sure fillTriangle is implemented. I don't have Street Race to decompile and test.

Nokia64 commented 4 years ago

Yes. This report is somewhat pointless considering you don't have a copy of the game to try...

A lot of Nokia-preinstalled games were developed by Sumea. Nokia's racing games Beach Rally and Beach Rally 2 were. This one might have been developed by Sumea too, given it shares a lot of similarities with Sumea's Racing Fever 2, which apart from pretty obvious similarities appears to be drawing the street borders in a similar fashion. ss There's a lot of suspicious similarities between both games

Sadly, I couldn't get past the main menu of Racing Fever 2 on FreeJ2ME, so I can't tell whether they both suffer from the same problem, or not.

recompileorg commented 4 years ago

From the code, it looks like Racing Fever 2 needs Nokia's soft key 3 to work. I'll start with your PR.

manuel5975p commented 3 years ago

Can I have your image of Street Race?

Nokia64 commented 3 years ago

I'm not sure if the repo owners would allow so. It made its way to the Kahvibreak collection, though. You can find it there along another version with different assets from a Nokia 8800

Looking back at this, opening an issue for a game no one haves was kinda dumb from my part 😓. Luckily it turned out to be a rebranded version of another game with dumps available around the net

recompileorg commented 3 years ago

Does @greysondn 's and @vadosnaprimer 's fillTriangle fix take care of everything? I honestly can't remember if we fixed KEY_SOFTKEY3.

Nokia64 commented 3 years ago

With the fillTriangle fix just merged the track borders display properly now. And yes, KEY_SOFTKEY3 got mapped to Enter on the Nokia layout
Thank you!