Jump to content
IGNORED

Gopher2600 (continuing development on Github)


JetSetIlly

Recommended Posts

11 minutes ago, Karl G said:

Okay, I finally gave into peer pressure and installed Homebrew on my Macbook.  :-D

 

 

Yes, once I installed Homebrew, and installed SDL via Homebrew, Gopher compiled and ran just fine. For me, video performance looked good, but audio lagged a bit behind.

 

Interesting. Can you run the following on the command line

 

go run ./gopher2600.go performance -display <rom_file>

 

That'll cap at 60fps (assuming an NTSC ROM). If you can get 60fps the audio should be pretty solid but if the audio still lags, I'll have to take another look at the audio system.

 

11 minutes ago, Karl G said:

I imagine building on Windows would be done via Cygwin. If I get a chance, I'll try it on my Windows VM to confirm build steps.

 

That would be helpful information, thanks.

 

Link to comment
Share on other sites

8 minutes ago, JetSetIlly said:

Interesting. Can you run the following on the command line

 

go run ./gopher2600.go performance -display <rom_file>

 

That'll cap at 60fps (assuming an NTSC ROM). If you can get 60fps the audio should be pretty solid but if the audio still lags, I'll have to take another look at the audio system.

Doing that seems to run the ROM for 5 seconds, then exits. I hear the audio during that time, but I don't see a visible display window.  Here's the output I get:

 

Karls-MBP:Gopher2600-0.3.2 kdgarris$ go run ./gopher2600.go performance -display ~/Downloads/SpaceGame-Final-NTSC.bin
# github.com/inkyblackness/imgui-go/v2
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
60.20 fps (301 frames in 5.00 seconds) 100.3%

 

Link to comment
Share on other sites

1 minute ago, Karl G said:

Doing that seems to run the ROM for 5 seconds, then exits. I hear the audio during that time, but I don't see a visible display window.  Here's the output I get:

 


Karls-MBP:Gopher2600-0.3.2 kdgarris$ go run ./gopher2600.go performance -display ~/Downloads/SpaceGame-Final-NTSC.bin
# github.com/inkyblackness/imgui-go/v2
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
60.20 fps (301 frames in 5.00 seconds) 100.3%

 

 

Is this the ROM you're using?

 

 

It's interesting that you're not seeing a display with that command line. I'm also not sure what the warning is about. I don't see that on my system. I might have to get my hands on a Mac temporarily and have a closer look.

 

With regard to sound lag, do you mean the sound is noticeably behind the video? If so, by how much?

 

It seems okay to me here but you'll be more attuned to what's correct and what isn't in that particular game (I like it by the way. I've not seen it before and I'll be playing it this evening ?

 

 

Thanks for taking an interest and helping me debug.

Link to comment
Share on other sites

1 minute ago, JetSetIlly said:

 

Is this the ROM you're using?

 

 

It's interesting that you're not seeing a display with that command line. I'm also not sure what the warning is about. I don't see that on my system. I might have to get my hands on a Mac temporarily and have a closer look.

 

With regard to sound lag, do you mean the sound is noticeably behind the video? If so, by how much?

 

It seems okay to me here but you'll be more attuned to what's correct and what isn't in that particular game (I like it by the way. I've not seen it before and I'll be playing it this evening ?

 

 

Thanks for taking an interest and helping me debug.

Thanks! The ROM is actually the NTSC release version that I made available in this post:

 

Sound lag seems to vary, but seems to increase the longer I play. On the title screen, the title music loops continuously until you hit fire to start the game. At that point, it should immediately stop playing the title music and display the wave screen. The first game I play I don't notice the lag much, but if I play a full game, then go back to the title screen, I am still hearing the title music on the wave screen for a little bit. That's the best way I can come up with to have the lag be obvious.

  • Thanks 1
Link to comment
Share on other sites

16 minutes ago, Karl G said:

Thanks! The ROM is actually the NTSC release version that I made available in this post:

 

Sound lag seems to vary, but seems to increase the longer I play. On the title screen, the title music loops continuously until you hit fire to start the game. At that point, it should immediately stop playing the title music and display the wave screen. The first game I play I don't notice the lag much, but if I play a full game, then go back to the title screen, I am still hearing the title music on the wave screen for a little bit. That's the best way I can come up with to have the lag be obvious.

 

You're right. I get that here too. That's good news in the sense that I'll be able to debug it at least. I'll have a play with it this weekend and see if I can figure out what's going on.

 

Thanks again for your help.

  • Like 1
Link to comment
Share on other sites

4 hours ago, JetSetIlly said:

The laggy audio was caused by an off-by-one error in the audio clock divisor. I've fixed that and packaged a new version

 

https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.3.3

 

@Karl G Please could you check this version and see if it's solved the problem on your Mac. Thanks.

I'm not able to build this version for some reason:

 

Karls-MBP:Gopher2600-0.3.3 kdgarris$ make release
go build -gcflags '-c 3 -B -wb=false' -ldflags="-s -w" -tags="release"
# github.com/inkyblackness/imgui-go/v2
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
Karls-MBP:Gopher2600-0.3.3 kdgarris$ 

 

Link to comment
Share on other sites

14 minutes ago, Karl G said:

I'm not able to build this version for some reason:

 


Karls-MBP:Gopher2600-0.3.3 kdgarris$ make release
go build -gcflags '-c 3 -B -wb=false' -ldflags="-s -w" -tags="release"
# github.com/inkyblackness/imgui-go/v2
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
Karls-MBP:Gopher2600-0.3.3 kdgarris$ 

 

 

I don't get that warning on my system but it should still have built a binary. If not try:

 

go build .

Link to comment
Share on other sites

11 minutes ago, JetSetIlly said:

 

I don't get that warning on my system but it should still have built a binary. If not try:

 

go build .

 

Oh - it was so quick I assumed it didn't actually build anything.  Yes, it works, and yes, it appears the audio lag bug is gone. ? 

  • Like 1
Link to comment
Share on other sites

1 minute ago, Karl G said:

 

Oh - it was so quick I assumed it didn't actually build anything.  Yes, it works, and yes, it appears the audio lag bug is gone. ? 

Awesome.

 

Yes. Go has gloriously fast compilation. In fact, you can run it like a script with barely any delay:

 

    go run gopher2600.go <rom_file>

 

Which makes for a very quick development cycle.

 

Thanks once again for your feedback.

 

Link to comment
Share on other sites

  • 3 weeks later...

MP3 and WAV recordings of Supercharger tapes can now be loaded directly. Linux and Windows binaries available:

 

https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.4

 

I've not tackled the multi-load games yet (Survival Island, etc.) but the first part will load no problem.

 

Note that the Supercharger BIOS is required for both tape loading and supercharger BIN files. Instructions here:

 

https://github.com/JetSetIlly/Gopher2600#supercharger-roms

 

on edit:

@Mr SQL has supplied me with a WAV file that the decoder is having trouble with. If anyone else finds a problem file can they let me know, see if we can figure out what the common cause is.

Edited by JetSetIlly
  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

I've added SaveKey support along with DF 128k cartridge format and a bug fix in playfield reflection. Change log here.

 

https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.5

 

For the moment you need to specify -savekey on the command line if you want savekey to be inserted into the  Player 1 port. I'll add auto-detection at a later date. Instructions here: https://github.com/JetSetIlly/Gopher2600#savekey

 

I've added some nice debugging windows for the SaveKey. As for pretty much everything else in the debugger, I added these to help me understand what was going on during development of the emulator. They may be useful for ROM development.

 

image.thumb.png.3b7d13f5f7540e0033efc58bf32dbb66.png

 

SaveKey and the DF 128k format added for @Karl G and his game, Penult

  • Like 6
Link to comment
Share on other sites

  • 2 weeks later...

I've been working with @Al_Nafuur for the last week and have successfully added PlusROM support. The release is tagged as v0.6. Source and binary in the link below. Note the new comment about the Windows binary at the bottom.

 

https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.6

 

When starting a PlusROM cartridge for the first time you will be asked for you 'nick'. You will see this in both play mode and debugger mode. Currently you can only change the nick afterwards via the preferences window found in the PlusROM menu (which will only be present if a PlusROM is inserted).

 

plusrom cartridges ask for a username

 

 

In addition to the PlusROM support I have improved audio output. In some situations, sound would drop out. This was particularly noticeable in H.E.R.O in which some sound effects were not audible at all.

 

I've also added support for the 3e binary. I had already added 3e+ but not the earlier format.

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

I've been working hard the last few weeks adding a rewind feature to Gopher2600. It's currently only available through the debugger but it works well and I'm quite pleased with it.

 

Adding it to the playmode shouldn't be too difficult and I plan to do that once I am able to switch to the debugger directly from the play screen.

 

473684241_Screenshotfrom2020-11-2022-17-30.png.a4675a4eede8166f2f9f5fc0cef6bf53.png

 

Rewinding frames is done through the control window. You can also rewind (or go forward even) to any point in the current frame by clicking on the TV Screen.

 

I've also begun improving the CRT effects. This needs a lot of work still but I think this version is better. The CRT Preferences window (available in the Debugger window) allows you to change current parameters.

 

1475075895_Screenshotfrom2020-11-2022-17-47.thumb.png.b2da2860c1a0d587b95c2cb770cf4869.png

 

 

Lots of bugfixes of course, including the 256byte ram-bank hotspot for the mnetwork cartridge format. This fixes the excellent Pitkat from @MarcoJ

 

https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.7

 

Thanks to @Al_Nafuur again for helping with the Windows binary and his feedback.

 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Cool!  A Windows version... I can finally try this out on my main development machine.

 

... Only to discover it runs too slow to be useful.  Ugh.

 

Are there any options to speed things up?    I'm currently getting 40fps in the debugger.

 

Also, it seems to slowly eat more and more memory.

Link to comment
Share on other sites

3 minutes ago, splendidnut said:

Cool!  A Windows version... I can finally try this out on my main development machine.

 

... Only to discover it runs too slow to be useful.  Ugh.

 

Are there any options to speed things up?    I'm currently getting 40fps in the debugger.

 

Also, it seems to slowly eat more and more memory.

 

There are no speed options yet. The debugger runs slowly when compared to the playmode because it's doing a lot more work. The next version will probably allow you to flip between the debugger and playmode at will (like Stella does when you press the escape key) so that should speed things up.

 

You can get the maximum FPS rate for the emulator with the following command line:

 

gopher.exe performance -display --fpscap=false <rom>

 

As for memory, it does currently use more memory than I would like. I'll see about optimising memory usage once I'm happy with the functionality. On my machine it uses around 40MB in playmode and 80-90MB in debug mode depending on the cartridge type. It increases slightly over time but it levels out at those values. Are you seeing significantly more than that?

 

Link to comment
Share on other sites

21 minutes ago, splendidnut said:

Cool!  A Windows version... I can finally try this out on my main development machine.

 

... Only to discover it runs too slow to be useful.  Ugh.

 

Are there any options to speed things up?    I'm currently getting 40fps in the debugger.

 

It is called "debugger", if it would run at full speed it would be a "player" ?

 

40fps is more than I got on my machine (36fps) and more than on the Stella debugger.

 

26 minutes ago, splendidnut said:

Also, it seems to slowly eat more and more memory.

 

4 minutes ago, JetSetIlly said:

As for memory, it does currently use more memory than I would like. I'll see about optimising memory usage once I'm happy with the functionality. On my machine it uses around 40MB in playmode and 80-90MB in debug mode depending on the cartridge type. It increases slightly over time but it levels out at those values. Are you seeing significantly more than that?

I "played" Amoeba Jump in the debugger and the max memory usage was 129 MB and the CPU usage leveled around 36%

 

  • Thanks 1
Link to comment
Share on other sites

Just now, Al_Nafuur said:

It is called "debugger", if it would run at full speed it would be a "player" ?

 

40fps is more than I got on my machine (36fps) and more than on the Stella debugger.

 

 

I "played" Amoeba Jump in the debugger and the max memory usage was 129 MB and the CPU usage leveled around 36%

 

 

Thanks for that @Al_Nafuur. I forgot to ask you about memory usage on Windows before now, so I'm glad to hear that it's "reasonable".

 

One additional point about memory usage. It does cycle through a lot of memory but it is freed (garbage collected) and levels out at the values I stated (on my machine). @splendidnut might be seeing that.

Link to comment
Share on other sites

18 minutes ago, Al_Nafuur said:

It is called "debugger", if it would run at full speed it would be a "player" ?

I should have been more clear... to my eyes both the debugger and regular run mode appeared to run at the same speed.

 

I did run the command provided and got 43 fps.  So I guess my eyes are relatively good at judging similar FPS performance :)

 

As for memory leaking:  I let it go for awhile and after about a minute, it was around 70mb (in run mode) and was continuing to climb.

Link to comment
Share on other sites

5 minutes ago, splendidnut said:

I should have been more clear... to my eyes both the debugger and regular run mode appeared to run at the same speed.

 

I tried the regular mode again, an it is definitely much more than 36fps I can't tell if its 60fps (my eyes are not as good as they used to be ;-)

The game played smoothly, but i recognized some glitches at the title screen, especially in the music (My ears don't seem to have degraded as much as my eyes ?‍♂️  

Link to comment
Share on other sites

9 hours ago, splendidnut said:

I should have been more clear... to my eyes both the debugger and regular run mode appeared to run at the same speed.

 

I did run the command provided and got 43 fps.  So I guess my eyes are relatively good at judging similar FPS performance :)

 

As for memory leaking:  I let it go for awhile and after about a minute, it was around 70mb (in run mode) and was continuing to climb.

 

Hi @splendidnut. Thanks for trying out my program. I'm writing this for fun and education but none-the-less I'm sorry that it doesn't meet your expectations. I'll focus on performance in the future. So far my focus has been on emulation accuracy as best that I can and experimenting with debugging features that might be useful in the development process.

 

But I have to be honest that I don't understand why you think 70mb after one minute is a memory leak. Running for one minute isn't sufficient IMO to tell whether a program is leaking. I've run the program here for many hours and while memory does increase slightly at first, memory performance remains steady in the long term. I'll be interested to hear if your performance is different over a longer time period.

 

It is also curious that you get similar FPS for both play-mode and debugger. I must admit that I've not seen that before. I would expect the debugger to be slower than playmode by some margin. Not a massive amount but I would expect more then 3fps.

 

Please could you provide me with the specs for your machine? That might give me a better understanding of why this is happening in your case.

Link to comment
Share on other sites

10 hours ago, Al_Nafuur said:

I tried the regular mode again, an it is definitely much more than 36fps I can't tell if its 60fps (my eyes are not as good as they used to be ;-)

The game played smoothly, but i recognized some glitches at the title screen, especially in the music (My ears don't seem to have degraded as much as my eyes ?‍♂️  

 

Out of interest, which games are you seeing title-screen glitches in?

 

The audio output isn't to my satisfaction yet. The audio generation routines are a direct translation of Ron Fries' original C code. I think that's generally accepted to be a good but not 100% accurate method of emulation so depending on what you're comparing it to, you may hear a difference.

 

Also ,the way I am filling up the audio buffer is sub-optimal so you might occasionally hear pops here and there as the buffer is depleted. It might be that which you're hearing.

 

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...