+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 Bug report. Not sure... If you make a move and then while computer is thinking hold down the joystick button, you see "thinkbars". This works, but the screen shown "changes resolution" from full-window, to shrunken/partial window. Also, sprite stripes at very bottom of screen... these may either be a stella bug or gopher bug. But I don't see them on stella. Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 1 minute ago, Andrew Davie said: Thanks for taking the time to do this. Working now. Just a few issues... 1) The colours are wrong. The squares should be blue. Perhaps an NTSC/PAL detection issue? This is a 276 scanline NTSC ROM. 2) Bit of a screen jump at the start - I don't think the code actually does this. 3) Technically 3E+ allows really odd ROM sizes. Don't rely on things being anything but... odd. Stella pads ROMs to 1K boundaries after loading. Thanks again! Yes. It'll be a PAL detection issue. You can force the use of NTSC on the command line with gopher2600 -tv ntsc <rom file> That'll fix the screen jump too, which is caused by my TV decoder. The mapper should handle any ROM size, it was just the fingerprinting which was wrong. Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 Just now, Andrew Davie said: Bug report. Not sure... If you make a move and then while computer is thinking hold down the joystick button, you see "thinkbars". This works, but the screen shown "changes resolution" from full-window, to shrunken/partial window. Also, sprite stripes at very bottom of screen... these may either be a stella bug or gopher bug. But I don't see them on stella. I think this will be because of the incorrect TV format. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 PS to above: If you would prefer to move bug/issue discussion to github "issues" i'm happy to do that. PPS: the "thinkbars" are actually a malformed frame - no sync signals are generated, I'm just changing PF and COLUPF while the TIA is freeforming. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 1 minute ago, JetSetIlly said: I think this will be because of the incorrect TV format. The resolution change due to the thinkbars is incorrect - the TV format should be chosen once at the start of the game, and then never changed. The scanline count on thinkbars is effectively "infinite", on both PAL and NTSC TVs. Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 (edited) 2 minutes ago, Andrew Davie said: The resolution change due to the thinkbars is incorrect - the TV format should be chosen once at the start of the game, and then never changed. The scanline count on thinkbars is effectively "infinite", on both PAL and NTSC TVs. My TV detection routines aren't perfect. Do you still see this bug if you specify/force the format on the command line? gopher2600 -tv ntsc chess.bin Edited June 13, 2020 by JetSetIlly Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 3 minutes ago, JetSetIlly said: My TV detection routines aren't perfect. Do you still see this bug if you specify/force the format on the command line? gopher2600 -tv ntsc chess.bin Yep. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 Just now, Andrew Davie said: Yep. I think the point is, there's simply no way of determining (whilst the thinkbars are displaying) WHAT the TV format is. Because it's not a valid TV frame being generated. Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 6 minutes ago, Andrew Davie said: I think the point is, there's simply no way of determining (whilst the thinkbars are displaying) WHAT the TV format is. Because it's not a valid TV frame being generated. Yes. I see why my TV decoder would flip to PAL because of that but I'm not seeing the thinkbars when the format is forced to be NTSC. Can you send me a screenshot of the bug when the "-tv ntsc" option has been set. Thanks for helping with this, by the way. It's good that it's getting a shakedown like this. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted June 13, 2020 Share Posted June 13, 2020 1 minute ago, JetSetIlly said: Yes. I see why my TV decoder would flip to PAL because of that but I'm not seeing the thinkbars when the format is forced to be NTSC. Can you send me a screenshot of the bug when the "-tv ntsc" option has been set. Thanks for helping with this, by the way. It's good that it's getting a shakedown like this. You need to press/hold the joystick button when the computer is thinking (normally a black screen). So, make your move, then hold down joystick button. Here's a video... (seems a bit slower than gopher normally runs - my machine is being taxed by the video running in the background, screen capture, and gopher... gopher.mp4 PS: left/right edges of the display "fade out" - is that a deliberate "look like a TV" thing? Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 Heh. I misunderstood the fire button trick in your original bug post, I thought you were talking about something else. I can see the problem now. Yes, the fade out is because of a rudimentary CRT shader I've been playing with. I'll add a command line flag to make it optional. (The debugger has a checkbox to turn it on/off in the TV screen window) Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 (edited) 19 minutes ago, Andrew Davie said: Here's a video... (seems a bit slower than gopher normally runs - my machine is being taxed by the video running in the background, screen capture, and gopher... Incidentally, you can record "gameplay" by specifying -record on the command line. For example, gopher2600 -record chess.bin This will create a small recording file, eg recording_chess_20200613_121736 Which you can play back: gopher2600 recording_chess_20200613_121736 Or attach as a text file. Edited June 13, 2020 by JetSetIlly 1 Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted June 13, 2020 Author Share Posted June 13, 2020 1 hour ago, Andrew Davie said: Yep. master has been updated on GitHub. It still requires you to specify the NTSC specification but the screen will now never resize. I've also added an option to turn off the CRT effects gopher2600 -tv ntsc -crt=false chess.bin I do need to fix the TV decoder properly though. The good news is that it's completely separate from the TIA and the pixel renderers and shaders so it's easy to work on. If anyone is reading this who can give me advice on how the TV signal works then I'm all ears ? I think I'm misunderstanding something about the differences between PAL and NTSC. 1 1 Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted July 11, 2020 Author Share Posted July 11, 2020 (edited) I've added preliminary support for Supercharger to Gopher2600. It's not perfect but it's good enough to play some Starpath games and 10LINEBLITZ games from @Mr SQL I've pushed the changes to the main branch on my Github https://github.com/JetSetIlly/Gopher2600 It requires the Supercharger BIOS in the gopher2600 configuration directory. If you need help finding this, let me know and I'll talk you through it. The BIOS file must be named "Supercharger BIOS.bin" Limitations of supercharger support currently: * only loads bin files * bin files limited to 8448 bytes * some timing issues I've not debugged yet. You can see this in Killer Satellites. Fixed * There's also a problem with Suicide Mission but I'm not sure what that's about yet. Communist Mutants, Official Frogger, Phaser Patrol, Rabbit Transit and Sword of Saros seem to work correctly. Fireball works but my paddle support needs a bit of work before I'm happy with that. My plan next is to fix the timing issues and then to move onto loading from mp3/wav files. I have an issue with fast loading from bin files that I think might be solved by "real" tape loading. We'll see how that goes anyway... To support supercharger and to help debug it, I've improved some other areas of the debugger * screen shows cursor position and half drawn frames more accurately * better disassembly routines and display * better terminal * better WATCH/BREAK/TRAP commands added TRACE command * better presentation of half decoded CPU instructions. For example: * better support for cartridge specific windows. For example: The debugger runs a little slower than previous versions. I think the slowdown is fixable but I've not tackled that yet. Performance of the emulation in "run mode" is unaffected. Fixed PS. TV decoding is still as it was so NTSC/PAL detection is still iffy. Frame size detection is also wrong, as can be see on the title card for Communist Mutants. Fixed Edited July 17, 2020 by JetSetIlly 2 Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted July 23, 2020 Author Share Posted July 23, 2020 (edited) There are significant performance improvements to Gopher2600 if anyone wants to try out the latest version. Supercharger BIN loading works. Suicide Mission doesn't work but I don't think that has anything to do with Supercharger as such. Although I have suspicions it has something to do with the state of the machine as a side effect of tape loading, which isn't being fully emulated. I'm working on WAV/MP3 loading to get around the problem (if that is indeed the problem). I welcome any thoughts on this in the meantime. https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.3 edit: MacOS bug fixed in v0.3.1 https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.3.1 Edited July 23, 2020 by JetSetIlly Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted July 29, 2020 Author Share Posted July 29, 2020 Another significant performance improvement. The improvement is because I have replaced some scaffolding code, originally written to help develop the TIA emulation. The old code helped when experimenting with latching (delays, which areas of the TIA are subject to latches, ordering, etc.) Now that the experimentation phase is over and I have a better idea of what's going on, I have streamlined it. The new code means the emulation is about 10% quicker. Moreover, there are now fewer unexpected mallocs(). One of the downsides of writing in a language like Go is that there is no direct control of memory allocation. For a performance sensitive application like a emulator, this isn't good but with a bit of care, random memory activity can be avoided. https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.3.2 v0.3.1 also introduced an issue with interface refresh rate, causing jank in playmode. Not noticeable in many instances but ROMs with a flicker kernel were badly affected. If you've looked at Gopher2600 before and thought it was too slow (it was) then please look again. 2 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted July 29, 2020 Share Posted July 29, 2020 I tried compiling on my MacBook, but it doesn't seem to find my SDL2 installation. I have the SDL2 package for Mac from libsdl.org installed to /Library/Frameworks/SDL2.framework Karls-MBP:Gopher2600-0.3.2 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] # pkg-config --cflags -- sdl2 Package sdl2 was not found in the pkg-config search path. Perhaps you should add the directory containing `sdl2.pc' to the PKG_CONFIG_PATH environment variable No package 'sdl2' found pkg-config: exit status 1 make: *** [release] Error 2 Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted July 30, 2020 Author Share Posted July 30, 2020 9 hours ago, Karl G said: I tried compiling on my MacBook, but it doesn't seem to find my SDL2 installation. I have the SDL2 package for Mac from libsdl.org installed to /Library/Frameworks/SDL2.framework Karls-MBP:Gopher2600-0.3.2 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] # pkg-config --cflags -- sdl2 Package sdl2 was not found in the pkg-config search path. Perhaps you should add the directory containing `sdl2.pc' to the PKG_CONFIG_PATH environment variable No package 'sdl2' found pkg-config: exit status 1 make: *** [release] Error 2 I Interesting. That would suggest to me that the SDL2 installation isn't correct or that pkg-config cannot find the sdl2.pc file. I've just had a look at the SDL dmg file that libsdl.org distributes and I see that there is no sdl2.pc file, which is the file pkg-config needs for SDL2 information. I don't know OSX at all, so there might be an extra installation step to get pkg-config working that I'm not aware of. I do know of a couple of people who have got it working on OSX without issue so I'll ask around. @DirtyHairy Any ideas on this? Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted July 30, 2020 Share Posted July 30, 2020 Compiling and running OK for me on MacOS Quote Link to comment Share on other sites More sharing options...
+Karl G Posted July 30, 2020 Share Posted July 30, 2020 16 minutes ago, Andrew Davie said: Compiling and running OK for me on MacOS Do you remember how you installed libSDL? Do you use some kind of UNIX-style package system like MacPorts or Fink? Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted July 30, 2020 Share Posted July 30, 2020 2 minutes ago, Karl G said: Do you remember how you installed libSDL? Do you use some kind of UNIX-style package system like MacPorts or Fink? Sorry, no. But it is likely I used homebrew because that's my go-to for package management. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted July 30, 2020 Share Posted July 30, 2020 19 minutes ago, Andrew Davie said: Sorry, no. But it is likely I used homebrew because that's my go-to for package management. No worries. I can probably get it to work if I roll my own libSDL, then. Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted July 30, 2020 Author Share Posted July 30, 2020 3 hours ago, Karl G said: No worries. I can probably get it to work if I roll my own libSDL, then. Spoke to a colleague and he installed SDL on his Mac via brew which what @Andrew Davie suggested too. https://formulae.brew.sh/formula/sdl2#default He reckons all it needs is: brew install sdl2 If that works, I'll add an installation note in the README. I'd be interested in any installation notes for Windows too, as that it another operating system I don't know anything about. 1 Quote Link to comment Share on other sites More sharing options...
DirtyHairy Posted August 1, 2020 Share Posted August 1, 2020 Yeah, homebrew is your friend. That's what I use for package management, too, and it definitely gets you a SDL2 suitable for building the emulator. 2 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted August 1, 2020 Share Posted August 1, 2020 2 hours ago, DirtyHairy said: Yeah, homebrew is your friend. That's what I use for package management, too, and it definitely gets you a SDL2 suitable for building the emulator. Okay, I finally gave into peer pressure and installed Homebrew on my Macbook. On 7/30/2020 at 1:54 PM, JetSetIlly said: Spoke to a colleague and he installed SDL on his Mac via brew which what @Andrew Davie suggested too. https://formulae.brew.sh/formula/sdl2#default He reckons all it needs is: brew install sdl2 If that works, I'll add an installation note in the README. I'd be interested in any installation notes for Windows too, as that it another operating system I don't know anything about. 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. 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.