Lemonboy2x Emu


slaanesh said:
If Lemonboy2x is using a separate thread for sound, you can try killing and restarting the thread per each game launched.
Thanks, slaanesh, but I tried that and didn't work. In fact, that was what the first version did. Killing and starting new sound threads was the thing that made system unstable. It seems that the minilib and/or the gp2x sound system don't like to be initialized so often. I noticed that Notaz in Picodrive just assumes that sound is unstable and have a mechanism to detect sound crashes and reinit the system... but I don't know how to adapt that in lemonboy.

Right now I prefer never killing the sound thread. It seems more stable... if the first time worked ok. But there is some memory issues that I cannot manage because I cannot understand: it seems that sometimes when a game unloads I free() more than I malloc(), but I can't find where! The current solution is not freeing the pointers that I know that *someone* *sometimes* free, but then memory usage increases, memory corrupts and after a dozen of so of games... crash in sound!
 
Last edited by a moderator:
Hi thanks for the update. I still get weird ROM list problems but the other fixes are nice.

If you aren't going to add directory support could you at least add two hardcoded subdirectories in the current ROM directory? It would be nice to be able to separate Gameboy and Gameboy color games rather than having in one pile. Support for a directory called "GBC" and one called "GB" would do it. So now it would look for ROMs in ROM, GBC, GB.

Thanks again for everything.
 
Excellent work on the new version. The new additions and features are great. :D

As usual, here are my comments:

- Why does the "videochange" button only toggle between "double size" and "deformed double size"? Is this intentional?

- When you enter the Load ROM screen with the Preview box on, the longer filename doesn't show up for the currently selected ROM. You need to move the selection or toggle the Preview box for the longer filename to show up.

- Instead of fully disabling the Preview box when set to "false", why not just have it default to off. Currently if the Preview box is set to "true", the Preview box would default to on and will always show up when entering the Load ROM screen even if you toggled it off previously.

- The SRAM saving is kind of wonky. It doesn't save the SRAM immediately, and it would take a couple of seconds to a few of minutes to have it save properly. This applies to the manual "Save SRAM" option, resetting the game, or loading a new ROM. The only way to be sure that the SRAM would be saved is by exiting the emulator.

- According to the FPS counter, it still exceeds 60 FPS. I don't really have a problem with this though as it's not noticable at all. :p

- I tested out all the ROMs I have (38 ROMs) in one session, and I managed to load all of them without the sound disappearing and causing the emulator to crash. The only exception was "Wario Land 1", which would load, but will get stuck at start-up. I could continue to load other ROMs fine and the sound was still present. After resetting the emulator, it finally loaded correctly.

- The content of "default.rc" that came with the ZIP is a duplicate of "system.gp2x". It caused a problem on first boot as I only changed the settings in the "system.gp2x", specifically the ROMs path. I changed it to somewhere else, but in the "default.rc", it still pointed to the default ROMs folder, which was empty. After loading the first ROM, it wouldn't go in the Load ROMs screen anymore. Well it wasn't really a problem since I just saved a new global setting that overlapped it (or by deleting it).

- This is more of a note to everyone. Since the filename with periods got corrected, the previous version's saves and previews from ROMs with periods in the filename will need to be renamed to their complete names, as they won't be located.

Once again, thanks for this marvelous emulator. Keep up the good work. :)
 
(DaveC)If you aren't going to add directory support could you at least add two hardcoded subdirectories in the current ROM directory? I though about it, but I never distinguished between GB and GBC games. I mean, they are obviously in different colors, but I'm not racist :) I prefer using the game name or preview to actually see the game. Anyway, I understand that two directories will be very convenient for people with hundreds of games. Maybe for the next release.

(Manjuu)Why does the "videochange" button only toggle between "double size" and "deformed double size"? Is this intentional? No, it is just the default :) You can change the video modes in the configuration file, "vmodes" options. There are five numbers here that you can set: "2 3 4 -1 -1" will toggle between modes 2, 3 and 4, and then 2 again (-1 marks not used) Use always lists of five numbers, filling with -1. Modes: 0 normal, 1 fullscreen, 2 fullscreen with ratio, 3 double size, 4 deformed. In you enter through this option, the normal mode won't show the frame. You can use the options menu to manually set any mode not in this list, of course. By the way, you can modify the 'deformation' factor as well, from 0-sharp to 48-smooth. You can set the 'voffset' for the double size mode, 12 centers the screen, 0 aligns at top and 24 aligns at bottom. This 'voffset' parameter has more use if you change it in the per game rc files, not in system.gp2x

You need to move the selection or toggle the Preview box for the longer filename to show up. Ok, for the next release

Instead of fully disabling the Preview box when set to "false", why not just have it default to off. I though about it, and don't know why didn't code this behaviour. For the next release.

The SRAM saving is kind of wonky. It doesn't save the SRAM immediately, and it would take a couple of seconds to a few of minutes to have it save properly. I see the problem. There is no sync() after each save_sram(). Save a state just after saving sram (it will work as backup, and savestate syncs the SD) or exit always properly (there is a sync at the end, even if the emulator crashes). Don't worry about changing games: sram of any previous game will be synchronized to the SD either in a minute, after any savestate or at exit. For the next release.

According to the FPS counter, it still exceeds 60 FPS. Yes, it does if you use frameskip (recommended) The frameskip algorithm is simple and nearly unnoticiable, but in fast games it seems to skip more frames than really needed. That 3 or 4 extra FPS are just skipped.

I managed to load all of them without the sound disappearing and causing the emulator to crash. The only exception was "Wario Land 1" I have gone all the way through Wario 1 several times (and I still have only 60K coins) so I can assure you that this game works ok :) Sometimes sound disappears when you save a state or go to the menu. Actually it is just the volume: press the volume keys and go on.

The content of "default.rc" that came with the ZIP is a duplicate of "system.gp2x". Ok. For the next release. The advise here is saving global options before modifying etc/system.gp2x the first time.

By the way, since bugs are tinny don't wait for "the next release". That means weeks or even months if there is no critical bugs.

Thanks to everybody!
 
juanvvc,

I just tried out Lemonboy today (after meaning to for a while), and I am really impressed. Its much better than I expected. The previous GB/GBC emulators were ok, but just a bit lacking. Lemonboy however kicks ass. I especially like the double-deformed scaling option. Awesome idea!
 
QUOTE
PS, have you done any other dev work on the gp2x?


Yeah, he did the menu in the next version of STPPC2x, but from the look of it, that was child's play to him. A menu may not sound like much but it was good C code and it didn't take him long at all. I think that juanvvc is a good person to have on a project, from what I've seen. He just PM'd me out of the blue one day with working, good code that I could understand (and I hate having to read other people's code).

BTW: juanvvc - I found out why the menu acted differently on my PC - you used SDL_ShowCursor before you initialised the SDLVideoMode - on some PC's (videomodes, acceleration etc.) it works, on others it just stops the program running. It seems my laptop forces everything to software mode under SDL and that's why. I moved the ShowCursor statement and it worked perfectly.

I also tried LemonBoy2x (although it was an earlier version - the 2nd or 3rd release) - I've been looking for a good, basic GB/GBC emulator for a while now and I can't stand the interface to GnuBoy2x (it takes me an hour to work out how to quit the bloody thing each time) and I really, really like SRAM saving that works properly. It's a good emulator, juan, so keep it up. I found the menu's a little fiddly and had a crash or two but that might well just be bad roms, old versions or duff batteries, but it works well overall.

I was actually quite close to the point where I was going to start my own emulator based on GnuBoy / gngeo code, so thanks for doing it for me!

It's so good to play Motocross Maniacs, Tetris and Fortress of Fear again!
 
I tried this emu out and its nice. I was hesitant at first cause of the bugs listed but the menu is great and much better than gnuboy. good work overall. for non color gameboy games i have trouble finding a palette I like. I think gnuboy had more of a green one that I liked.
 
juanvvc said:
The bug about a very remote bricking possibility was solved days ago. I'm pretty sure that this version is much safer. I hope so, since I'm very intensively using it to play Zelda :)

I use Lameboy 11 am I ok?
 
Last edited by a moderator:
Do you think there would be a way to get tis to be full speed without the need for frameskip? It is very playable now but the animation can be a bit framey at times due to the FS. The smoothness was kind of a feature of the actual GB hardware even though the graphics were simple. Exophase had made a GB emu on a different system, maybe he has some tips (maybe even source) that would help?
 
DaveC said:
Do you think there would be a way to get tis to be full speed without the need for frameskip? It is very playable now but the animation can be a bit framey at times due to the FS. (...) Exophase had made a GB emu on a different system, maybe he has some tips (maybe even source) that would help?
I really worked hard to improve speed. I've tried tons of things: original K-teto code, 8 bit mode, skipping emulation loops, sound in same/different thread, profiling... The last version has the best performance with the maximum number of games, and I just cannot make any better. Source code is public and under the GPL. Currently, 50% of the time is emulation of the Gnuboy CPU and the rest of things (drawing included) is under 10% each. Improving cpu.c or even writing this code in assembler is the next step, absolutely out of my knowledge. Any technical advice or actual modification is really welcomed.

QUOTE

I tried this emu out and its nice. I was hesitant at first cause of the bugs listed but the menu is great and much better than gnuboy. (...) I think gnuboy had more of a green one that I liked.



Thanks, jbrodack. Lemonboy2x began as an open-test/brainstorming project in gp32spain and the news spread to gp32x much sooner than I desired (someone didn't translate the "not in news" petition) That was the reason of the "publication" of several too young versions with many bugs. Actually it was a good thing, since tons of bug reports and advices showed up in this thread. The last version, the one that was properly published in the archive, has some bugs but none as important to justify a new version of lemonboy.

If you really like the green palette of Gnuboy2x, copy this text in notepad/textedit/gedit/kate and save in the "palettes" directory. "Green" seems a good filename :)

CODE

# green palette
set dmg_bgp 0x9fbfa7 0x7f9986 0x6a8070 0x556659
set dmg_wndp 0x9fbfa7 0x7f9986 0x6a8070 0x556659
set dmg_obp0 0x9fbfa7 0x7f9986 0x6a8070 0x556659
set dmg_obp1 0x9fbfa7 0x7f9986 0x6a8070 0x556659

set colorfilter 0
 
Last edited by a moderator:
DaveC said:
Exophase had made a GB emu on a different system, maybe he has some tips (maybe even source) that would help?
How in the world did you know about this? I think you must have been wrong and just got it coincidentally, I made one like a week ago as part of a competition (person who writes GB emu first wins ;p), just now ported over the sound core from gpSP because the one I did for it wasn't so great. But it's for PC and since I wrote it in like 20 hours it's obviously not very efficient.
 
Last edited by a moderator:
Last edited by a moderator:
Last edited by a moderator:
Dunny said:
Exophase said:
DaveC said:
Exophase had made a GB emu on a different system, maybe he has some tips (maybe even source) that would help?
How in the world did you know about this? I think you must have been wrong and just got it coincidentally


Hehe: http://www.gp32x.de/board/index.php?s=&am...st&p=615391

D.


Exophase said:
I really doubt GB emulation is a "painful joke", and if it were I'd port that GB emulator I wrote in one day for a contest (GB is seriously not hard to emulate), but it sounds like the latest emulator out is doing fine.
Yeah that is it. Other than that I know nothing else about it. :p
juanvvc said:
(DaveC)If you aren't going to add directory support could you at least add two hardcoded subdirectories in the current ROM directory? I though about it, but I never distinguished between GB and GBC games. I mean, they are obviously in different colors, but I'm not racist :) I prefer using the game name or preview to actually see the game. Anyway, I understand that two directories will be very convenient for people with hundreds of games. Maybe for the next release.
Sometimes you may want to just play a Color game and it would be easier to find if they could be kept separate. Not al of us use the preview function as it cuts off names etc.

Remember some of us have more than a couple ROMs on the card.

I also found why some games were sorted weird. I have some ROMs that have the filenames in all caps for some reason. It sorts names in all capital letters different than ones that are not for some odd reason. It will also sort different if the first letter is not capatalized.
 
Last edited by a moderator:
DaveC said:
It sorts names in all capital letters different than ones that are not for some odd reason. It will also sort different if the first letter is not capitalized.
Yeah, that's what I said many times and it is not a bug :) In a standard sorting, capital letters go before normal letters. ZARATHUSTRA goes before "abraham". Even "Zoroaster" does, since the order is "ABCDE....XYZabcde....xyz" I prefer that standard sorting, but since Lemonboy shows names all in capital maybe I should think again this behavior.

Don't worry that I do not discard complete directory support in a future. I've just revived my old TV so maybe in the next weeks I'll add a couple of characteristics to the emulator.
 
Last edited by a moderator:
thanks for the palette juanvvc. I knew the palette files were just simple text files but didn't know anything about the codes for color and all that.

anyway the green palette seems to be the most like the original game boy at least from my memory so i like it.
 
juanvvc
i downloaded your gbc/gb emulator and it works great on my f200,what im wondering is now theyve ceased production of the gp2x will you continue to update this emulator? and if so are there any updates in the near future.cheers
 
Wil hood, sorry for the delay, I thought that this thread was closed long ago. I only own a Gp2x and do not care about the ceasing of the production, so if you find any error or an interesting feature that I'm able to code, I'll update the emulator.
 
juanvvc said:
Wil hood, sorry for the delay, I thought that this thread was closed long ago. I only own a Gp2x and do not care about the ceasing of the production, so if you find any error or an interesting feature that I'm able to code, I'll update the emulator.
Well a browser to be able to select directories would be cool.

Any speedups to make it able to be full speed with no frameskip would be nice as well.

Thanks for the nice emu.
 
Last edited by a moderator:
juanvvc said:
Wil hood, sorry for the delay, I thought that this thread was closed long ago. I only own a Gp2x and do not care about the ceasing of the production, so if you find any error or an interesting feature that I'm able to code, I'll update the emulator.
Very good to hear that juanvvc , thanks for your great emulator and will be looking forward to future releases

About features , I think (ability of) defining seperate rom directories for gb and gbc roms and having a option to view each in main menu would be interesting (and useful for some such as me) . It could be useful to not to get drowned in hundreds of gb roms when you want to play for example puyo puyo sun or opposite . Can it be done ?
 
Last edited by a moderator:
Back
Top