Jump to content
IGNORED

Handy emulator - the latest version and source code


Cyprian

Recommended Posts

Do you have any suggestion where I can find the latest Handy emulator and its source code?

 

I daily use 0.98beta (build Apr 18, 2016) with Debugger. Unfortunately it's homepage http://lynxdev.atari.org/handy shows me error 404

 

I see also following projects:

 

https://github.com/mozzwald/handy-sdl- some updates two years ago;

 

https://github.com/libretro/libretro-handy- some updates 11 moths ago

 

https://github.com/bspruck/handy-fork/tree/master/handy-sdl-master- some updates 11 moths ago

https://github.com/bspruck/handy-fork/tree/master/handy-win32src-0.95-patched- some updates 11 moths ago

 

and the main one with 0.95 from 2007-02-21

https://sourceforge.net/projects/handy/files/handy/

Edited by Cyprian_K
Link to comment
Share on other sites

For debugging I use the old version (usuallyI don't need to have perfect sound or perfect rendering when tracing instructions for debugging).

 

Last version from Sage should be this https://github.com/bspruck/handy-fork that's one of the link you already found. It has sound problems, but working eeprom support (the only one around AFAIK) and some bug from the original version fixed. Probably you can compile this in Debug mode setting some flag in the makefile (or VS Project), but never tryed.

 

Libretro with Handy core is another good one (probably the best from the point of view of a gamer, maybe not for a developer, don't know much about the handy version used) but has a bug with eeprom handling. Opened an issue on github proposing a solution, but no one tryed to fix the problem so far.

Link to comment
Share on other sites

Libretro with Handy core is another good one (probably the best from the point of view of a gamer, maybe not for a developer, don't know much about the handy version used) but has a bug with eeprom handling. Opened an issue on github proposing a solution, but no one tryed to fix the problem so far.

 

I though this was merged already w/o my intervention... let me check

Link to comment
Share on other sites

Wow - perfect timing. I must chime in here.


After being away from Lynx emulation and development for about 10 years now, i just came back last week to check what has happened since.

My search for the latest handy-emulator and available patches/fixes just turned up with exactly what was mentioned in the first post - 0.98beta seems to be the last exe-build floating around.


The sources available from sage's github page (handy-win32src-0.95-patched) seem to be the most complete regarding updates and patches:


patches included in "handy-win32src-0.95-patched" (correct me if i'm wrong):

  • crashes at startup for cc65.org bugfix (patch available on handy's sourceforge page "patch.diff")
  • single point sprite bugfix (fixes Robotron intro, Joust lava, ...)
  • everon bugfix (fixes wuerfel.lnx)
  • stuttering sound fixed (doublebuffered)
  • eeprom support

available patches missing in "handy-win32src-0.95-patched"

  • zipped rom filenames containing more than 1 dot (patch available on handy's sourceforge page (system.cpp) - search/replace 2 occurences of strchr with strrchr)
  • Gates of Zendocon sound missing (laughing spider)

The missing sound in Gates of Zendocon was already fixed by GadgetUK.

Unfortunately he never published code (or i couldn't find it at least) but only provided executables - see post #83++ http://atariage.com/forums/topic/186720-fixing-known-bugs-in-handy-emulator/page-4

handy0.97 - Gates of Zendocon sound fixed but others broke

handy0.971 - seems to work fine


Maybe @GadgetUK can make the source public or dig his memory what the required code changes were (i know - it was 6 years ago...). Pretty PLEASE?


Also - the stuttering sound fix included in "handy-win32src-0.95-patched" only works partially for me.

Sound is playing nicely on startup. But disabling and re-enabling sound while a game/intro is playing (2x CRTL-S) is a "roll-a-dice" game.

Sometimes the sound is going completely berserk after enabling, sometimes it's fine.

It might be a problem with the read- and writecursors of the soundbuffer.

On sound start the buffer is flushed and the readcursor is set to 0 - doesn't the buffer need to be filled eventually?

I'm by far no expert in directsound but messed around with the code nevertheless. Without digging documentation and debugging i think i have a fix that works for me:


Just change the delay in timeSetEvent from 25 to 50 like this:


DirectSoundPlayer.cpp, line 159:



if ((m_TimerID = timeSetEvent(50, 0, TimerCallBack, (DWORD)this, TIME_PERIODIC)) == NULL) // 50 was 25


Disabling and re-enabling sound now always works on my systems. I guess the new delay gives the buffer some time to fill up...


Maybe if any of the well known atariage members would kindly ask @GadgetUK about the Gates of Zendocon fix (might be more successful than a query from a noob like me),

then hopefully one day all known patches/fixes can be incorporated into a single source repository.


Michael
Link to comment
Share on other sites

  • 1 month later...

Regarding LynxBoot, now that the modern handy implementations no longer require it, does anyone see any reason you'd want to keep user interface around for specifying that an actual rom image be used in place of the handy core simulation?

Link to comment
Share on other sites

As the private key is known people may create bootloaders that omit the directory completely so I would suggest to use OpenSSL for replacing the public key decryption process using modern hardware. You could perhaps trap any calls to the ROM decryption routine with the obfuscation decryption set instead.

Link to comment
Share on other sites

I had an error in "eeprom.h" file. There were undefined "min", therefore I added from libretro:

 

 

#ifndef __min
#define __min(a,b) \
   ({ __typeof__ (a) _a = (a); \
       __typeof__ (b) _b = (b); \
     _a > _b ? _b : _a; })
#endif

 

 

We ended up doing the same...

 

(We are seeing a drawing bug with California Games and we wanted to see if it was core related, or JNI related, so used that as a comparison test... It wasn't the core...)

 

And at the same time, updated the windows/non-SDL version (https://github.com/b...rc-0.95-patched) to use Visual Studio Community Edition 2019.

 

@sage -- should we send you the changes?

Link to comment
Share on other sites

 

 

We ended up doing the same...

 

(We are seeing a drawing bug with California Games and we wanted to see if it was core related, or JNI related, so used that as a comparison test... It wasn't the core...)

 

And at the same time, updated the windows/non-SDL version (https://github.com/b...rc-0.95-patched) to use Visual Studio Community Edition 2019.

 

@sage -- should we send you the changes?

Make a pull request ;-)

Link to comment
Share on other sites

Do you know of some example LNX files that would only work if LYNXBOOT were being used rather than the emulation of same?

The bootloader may rely on the remains of the boot process from the original ROM like zero page contents.

Link to comment
Share on other sites

The bootloader may rely on the remains of the boot process from the original ROM like zero page contents.

sure. could. and any code running could check the content of the rom or use a function i do not intercept. but until now, no problem found.

Link to comment
Share on other sites

sure. could. and any code running could check the content of the rom or use a function i do not intercept. but until now, no problem found.

 

 

Yeah, this was what I was getting at... If there is no known example that requires it, then why bother supporting it?

 

I'm asking because I have been trying to decide if I should remove the UI to select one. Right now I have it as optional, but the UI is still there to set it if you want.

Link to comment
Share on other sites

 

 

Yeah, this was what I was getting at... If there is no known example that requires it, then why bother supporting it?

 

I'm asking because I have been trying to decide if I should remove the UI to select one. Right now I have it as optional, but the UI is still there to set it if you want.

Because I can write you an example (laugh)

Link to comment
Share on other sites

Yeah, this was what I was getting at... If there is no known example that requires it, then why bother supporting it?

 

I'm asking because I have been trying to decide if I should remove the UI to select one. Right now I have it as optional, but the UI is still there to set it if you want.

What is the benefit of removing support for the ROM?

I have a loader which relies on it, for example for block selection. So, an emulator w/o original ROM is useless.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...