Jump to content
IGNORED

Gopher2600 (continuing development on Github)


JetSetIlly

Recommended Posts

Very quick hack but it works quite well I think.

Code is in a temporary "macro_system" branch. I'll merge into master if testing goes well.

 

All the interesting code is a single file.

https://github.com/JetSetIlly/Gopher2600/blob/14e39086971b69575a149ce8235147ad65c6e56a/macro/macro.go

 

 

The macro file used in the video is as follows:

 

gopher2600macro
1.0

DO 6
	WAIT 120
	SCREENSHOT

	SELECT
	WAIT 2
	SELECT RELEASE
LOOP

QUIT

 

Wait values are number of frames. Loops can be nested.

 

It's probably good enough for your purposes now but I can add more instruction if needed. Do you need me to compile a binary for you or can handle that yourself?

Edited by JetSetIlly
link to correct video
  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Working with @Gemintronic to get the macro system working for his use case.

 

It turns out that a POKE command is useful. There's always been a POKE command in the terminal language but it's useful to have in the macro language too.

 

To give an example, the following script automates the capturing of screenshots for every screen in Pitfall

gopher2600macro
1.0

-- start game by moving joystick right
RIGHT
CENTER

-- loop through all 256 screens
DO 256 n
	-- position player at right of screen
	POKE $e1 $94

	-- walk right to next screen
	RIGHT
	WAIT 10
	CENTER

	-- screenshot
	SCREENSHOT %n
LOOP

QUIT

 

There are other possible ways of achieving this for Pitfall, I'm sure.

 

My goal is to make the system flexible enough to enable the writing of automatic tests for people to use during ROM development.

 

Code is in the macro_system branch in the github repository.

 

  • Like 4
Link to comment
Share on other sites

2 hours ago, gambler172 said:

Well...saw this emulator for the first time. Can it play Berenstain Bears? And Smurf Saves the Day?

Well, the ROMs load but they don't seem to do much.

 

2 hours ago, gambler172 said:

Is Dragons Lair possible?

Cause someone told, he ported it for the Moviecart.

The emulator can run Moviecart files.

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, gambler172 said:

Berenstain Bears needs also the mp3 files.

You can find them at Atarimania.

Oh I see. 'Berenstain Bears' and 'Smurf to the Rescue' are KidVid ROMs.

 

I don't know anything about KidVid but I would be interested in getting them working correctly. Time is tight for me at the moment but I'll put it on the TODO list.

 

The items on the list I have currently (in no particular order):

 

1. Joy2B+ @r_chase

2. Finish (and debug) Thumb2 emulation and get ACE working correctly @MarcoJ

4. 7800 emulation @ZackAttack

5. KidVid @gambler172

 

There are other items of course but these are the ones people have asked for. Hopefully I've not missed anything.

 

  • Like 2
Link to comment
Share on other sites

2 minutes ago, JetSetIlly said:

Oh I see. 'Berenstain Bears' and 'Smurf to the Rescue' are KidVid ROMs.

 

I don't know anything about KidVid but I would be interested in getting them working correctly. Time is tight for me at the moment but I'll put it on the TODO list.

 

5. KidVid @gambler172

You will regret this! Trust me. :D 

  • Like 1
  • Haha 1
Link to comment
Share on other sites

14 minutes ago, JetSetIlly said:

Haha. I know literally nothing about the format so maybe I have been a bit hasty 😆

It is not so much the format (which is complicated enough, you can check the Stella code for KidVid), but having to listen to the tapes over and over again while developing. :) 

 

I had to go through this twice, once for z26 and, after a lot of resistance, last year for Stella again. Nothing I would want to repeat.

Edited by Thomas Jentzsch
Link to comment
Share on other sites

You can find some info in this thread. Note that AFAIK there aren't recordings of the original tapes available, which would be nice to have for preservation purposes.

The original tapes are in stereo, with music on one channel and data on the other one, which was converted to digital signals by the KidVid tape deck and then sent to the 2600 controller port.

The data track is not part of the available samples because, when support was added to Z26, it was reversed engineered and hard-coded into the emulator.

 

27 minutes ago, JetSetIlly said:

4. 7800 emulation @ZackAttack

Do you mean the different initial state (because of the 7800 bios running before starting a game) and "Pause" switch instead of the "TV-Type" toggle, or do you plan to add full 7800 emulation?

Link to comment
Share on other sites

Just now, alex_79 said:

You can find some info in this thread. Note that AFAIK there aren't recordings of the original tapes available, which would be nice to have for preservation purposes.

The original tapes are in stereo, with music on one channel and data on the other one, which was converted to digital signals by the KidVid tape deck and then sent to the 2600 controller port.

The data track is not part of the available samples because, when support was added to Z26, it was reversed engineered and hard-coded into the emulator.

Thanks. That's a great starting point.

 

It would be nice to have the stereo tape. I'd be interested in emulation without any hard-coding of information.

 

Just now, alex_79 said:

Do you mean the different initial state (because of the 7800 bios running before starting a game) and "Pause" switch instead of the "TV-Type" toggle, or do you plan to add full 7800 emulation?

@ZackAttack wants full 7800 emulation. It'll be useful to have because it means we can then use emulation to help develop ELF/StrongARM games for the 7800 as well as the 2600. I might need to make some architectural changes to the code first, but it should hold up nicely.

 

  • Like 1
Link to comment
Share on other sites

6 hours ago, JetSetIlly said:

@ZackAttack wants full 7800 emulation. It'll be useful to have because it means we can then use emulation to help develop ELF/StrongARM games for the 7800 as well as the 2600. I might need to make some architectural changes to the code first, but it should hold up nicely.

Wow ... that is ambitious for sure. Count me as someone who would be interested to see this as well. My reason would be the ability to use a much better/friendlier debugger than the MAME debugger when developing 7800 games.

Link to comment
Share on other sites

9 minutes ago, Karl G said:

Wow ... that is ambitious for sure. Count me as someone who would be interested to see this as well. My reason would be the ability to use a much better/friendlier debugger than the MAME debugger when developing 7800 games.

It is ambitious but it's worth trying. I plan to start looking at it this summer, time permitting.

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

There arn't many visible differences in today's v0.22.0 but there are some important bug fixes. Change log on the release page

 

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

 

ARM disassembly is improved in this release. Thumb-2 disassembly is in the process of being improved and 32bit functions in particular are given their canonical mnemonic. Also, a snapshot of the ARM registers is preserved on every ARM step. This is much needed work to help debug the emulation of the more advanced ARM CPU found in the Uno/PlusCart. Previously, debugging of the emulation was laborious and unappealing.

 

The macro system requested by @Gemintronic is in this version. It's very rudimentary but may be useful to some people. Documentation here: https://github.com/JetSetIlly/Gopher2600-Docs/wiki/Macro-System

 

I've also done some work on the "audio tracker". Currently, this is just a way of viewing audio information, rather than a tracker through which you can edit (although that remains the goal). But added in this version is a way of replaying a section of audio. This is useful for isolating a sound effect and being able to see exactly what the changes to the audio registers are.

image.thumb.png.48efcfde0cd977b5b3dd85ed2ec26cf4.png

 

I went back to this after reading about the work done in the following thread. It inspired me to look for a way of saving data from a ROM such that it can be added to source code for another game. I've experimented with that feature but I've nothing satisfactory so far. If anyone wants to help/advise me on standard representation of audio data it would be very helpful.

 

 

 

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

15 hours ago, JetSetIlly said:

If anyone wants to help/advise me on standard representation of audio data it would be very helpful.

Since we mostly want to store frequency, volume and modulation effects, that's a pretty good match for MIDI.

Link to comment
Share on other sites

4 hours ago, stepho said:

Since we mostly want to store frequency, volume and modulation effects, that's a pretty good match for MIDI.

It's a great idea but I was really looking for something that can be used in the source code to a BatariBasic program or in regular 6502 assembly. MIDI data representation would be too complex for that I think.

  • Like 1
Link to comment
Share on other sites

10 hours ago, JetSetIlly said:

It's a great idea but I was really looking for something that can be used in the source code to a BatariBasic program or in regular 6502 assembly. MIDI data representation would be too complex for that I think.

I've been thinking some more about this and made some progress. The idea is for the emulator to output a 2600 asm file that can be compiled and run as a standalone program. Other formats might be an MP3 recording or a MIDI file.

 

It needs a lot of work so that it's accurate in all situations but the idea works. Some examples:

 

frogger_audio.asm

man_goes_down_audio.asm

snoopy_audio.asm

 

They're only short and will repeat when the audio data ends.

 

The code is in the audio_ripping branch on Github if anyone wants to experiment or to make a contribution.

 

image.thumb.png.b5e213301892ae0eca82d4f9ecf69798.png

 

 

  • Like 1
Link to comment
Share on other sites

Here are three more examples, the fanfares from Zookeeper @johnnywc, Draconian @SpiceWare and MsPacman.

 

zookeeper_audio.asmdraconian_audio.asmms_pacman_audio.asm

 

Compile with DASM in the normal way for your platform.

 

Improvements required:

 

Currently, the driver in these standalone binaries can only really deal with audio that is updated once per frame per channel. It shouldn't be too difficult to adapt the outputted program to accommodate more complex audio.

 

Data representation of the audio is inefficient. At the very least, control and volume values can be squished into one byte. Detection of musical loops would be a good efficiency saving.

 

Code in the audio_ripping branch on Github

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

  • 3 weeks later...

Full release notes for v0.23.0 https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.23.0

 

Summary

 

1) Performance improvements

 

This version has significant improvements to how monitor VSYNC is handled. I've had good reports from Mac and Windows users as well as improved performance on my development machine. If you've tried Gopher2600 and been left disappointed by its performance it's worth looking at this version to see if it has improved.

 

The VSYNC options are in the Preferences window (press F10) and is under the "Playmode" tab.

 

"Sync with vertical retrace" and "Adapative VSYNC" should both now produce better results but if not, the new "Ticker" option is worth trying

 

image.png.75d1d88c868391f591f855ba7d8f0bb8.png

 

I should emphasis that in all cases, best results are obtained if you set your monitor to 60Hz.

 

 

2) Screenshots

 

Better screenshot modes. I had previously experimented with short, long and very long "exposures". This sort of worked but it produced disappointing results in some cases, particularly ROMs with highly flickering displays. In particular it was difficult to get good screenshots of @Andrew Davie's Wenhop.

 

The new 'composite' mode produces better results in some cases. For example, the title screen of a recent version of Wenhop

crt_composite_WenHop_20230522@22_39_28_20230529_213842.thumb.jpg.1f9ddd9946d3f8b5b79a634c46299a9a.jpg

 

This new mode is also quite good at capturing motion blur. For example, fast moving wabbits.

crt_composite_Wabbit_20230529_213657.thumb.jpg.7f02882673eaa77476ee3cff75f47d50.jpg

 

The third mode is called 'motion' and is another good way of capturing motion, phosphor effects and stabilising flickering displays.

 

For example @johnnywc's Zookeeper and Elevator Agent

crt_motion_zookeeper_20200308_demo2_NTSC_20230529_214120.thumb.jpg.23ba286bc35d79d2aef41f955bd35041.jpg

 

crt_motion_Elevator-Agent_demo_v1_NTSC_20230529_214342.thumb.jpg.5d2e48746040071a33ff48b9e163daa0.jpg

 

Not all modes will suit all ROMs in all situations. I'll add a way of previewing the results and altering parameters in the near future.

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

  • 2 weeks later...

v0.24.0 mainly consists of debugger improvements. Not much here except for developers. The first two improvements were courtesy of feedback from @Andrew Davie

 

Full release notes https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.24.0

 

Search For Window

 

The Gopher2600 debugger can get quite busy if you have a lot of windows open. This new feature allows you to search for a window by name. Press and hold CTRL+SHIFT to bring up the search tool in the menu bar.

image.thumb.png.62c807248fb00761849384881ed7ed63.png

Type the name (or part of the name) of the open window you wish to bring to the front. In the screenshot above,  the string "per" is enough to identify the performance window.

 

Tooltips

 

Tooltips are useful but they can often get in the way. The menu bar now includes a speech bubble icon that indicates whether tooltips are switched on or off. Click on the icon to change this state.

 

If the icon is solid white then tooltips will always show. If it is gray (as in the screenshot) then they will appear only when you press the SHIFT key when your mouse is hovering over an area of interest. The icon will turn to white temporarily to indicate if there is a tooltip underneath the mouse.

image.png.2a3b6987bcd80db0b89e13451fb130e3.png

 

Timeline Window

 

The timeline window was added as a sketch and a way of quickly rewinding back and forth in the debugger. The new timeline window is resizable, includes frame count guidelines. The tooltip has been replaced with a more informative status bar at the bottom of the window.

 

The timeline thumbnail is still available but is turned off by default. Turn it on via the preferences window if you want it.

 

image.thumb.png.605ec2b3b4baf2a7a77763eef7c5f9fe.png

 

You can now also set the "comparison frame" via the timeline window. Using the context menu (right mouse button) the comparison frame can be set to the frame under the mouse pointer. The "Lock Comparison Frame" option meanwhile, stops the comparison frame from being updated automatically.

image.png.90fcceed036d713223186579edcd05cb.png

 

If you're wondering what a "comparison frame" is, the feature has been in Gopher2600 for a long time but has never been controllable before. It's similar to the Stella feature which shows which RAM addresses have changed recently.

 

In Stella:

image.png.df31f0a82c5441950792a0cb12fa46fe.png 

 

And similar information in Gopher2600:

image.png.85d752a94a2c3bd53ea21b766596c63c.png

 

 

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

The "search for window" function is also dynamic, in that it will preferentially search for the window you last selected.  By that I mean if you have two windows whose name starts with "P" for example, the first time you might type "PERF" to get the performance window, but from then on you just need to go SHIFT+CTRL+P to get that window. In other words, your most-recent selected window with the given (so far entered) search string is selected first.  This is a fantastic "one keypress" way of getting to your most-used windows.  Now I just use SHIFT+CTRL+P and I'm at the performance window,  SHIFT+CTRL+T to go to the TV window, etc.

  • Like 2
Link to comment
Share on other sites

1 minute ago, Andrew Davie said:

The "search for window" function is also dynamic, in that it will preferentially search for the window you last selected.  By that I mean if you have two windows whose name starts with "P" for example, the first time you might type "PERF" to get the performance window, but from then on you just need to go SHIFT+CTRL+P to get that window. In other words, your most-recent selected window with the given (so far entered) search string is selected first.  This is a fantastic "one keypress" way of getting to your most-used windows.  Now I just use SHIFT+CTRL+P and I'm at the performance window,  SHIFT+CTRL+T to go to the TV window, etc.

Yes. I forgot to mention that. It's effectively a way of quickly and dynamically creating a hotkey for a window.

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