Jump to content
IGNORED

Gopher2600 - v0.27.0


JetSetIlly

Recommended Posts

v0.25.0 of Gopher2600. Full change log on the release page: https://github.com/JetSetIlly/Gopher2600/releases/tag/v0.25.0

Main improvement in this version is the implementation of the ARM FPU. This was added to support @MarcoJ's  RPG game, Lords of Biscay.

Secondly, with significant encouragement from @ZackAttack, I've managed to improve the performance for ELF ROMs that use the StrongARM functions. About 30% improvement in some cases.

There's more work to be done in this area and hopefully will translate to performance improvements for ACE ROMs and quite possibly, CDFJ too.

 

I've attached two videos. The first is another video of Zack's Wushu Masters. I've left the FPS window open in this video so you can see there's still room for improvment. More significantly perhaps, the video shows the game's different arenas!

 

 

 

Secondly, another video of Zack's raycaster demo. I've uncapped the framerate to show the performance improvement.

 

 

 

In both cases, the emulator is fighting for CPU time with the video encoder so performance is actually a little better in reality.

 

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

  • 4 weeks later...

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

 

Major new feature in this v0.26.0 is support for the new movie cart format. I'll leave it to @rbairos to post demo videos of that when he's ready.

 

One Moviecart related feature that's been added is screen rotation. This can be automatic or manually triggered. For now, only moviecart can set the screen rotation automatically. The video below demonstrates manual rotation of the screen while playing The ATeam ROM.

 

 

 

Of course, this is completely useless unless the ROM has been coded with a vertical screen in mind but that's an interesting thought isn't it? 2600 games written with the intention of being played on a vertical screen. It might suit some styles of games better in fact.

 

I've also added SECAM support. Example screen shot of Activision's Decathalon. (I love how the athlete is wearing a striped TShirt in this version)

crt_single_ActivisionDecathlonThe(1983)(ActivisionDavidCrane)(EAZ-030)(SECAM)_20231007_163901.thumb.jpg.36ae6bea4bfd1cc7961e3a83ebb0225c.jpg

 

There are some other small changes but probably not very interesting for now. The release pages lists them all.

  • Like 4
Link to comment
Share on other sites

  • 1 month later...

Anyone build Gopher2600 on a Mac M1?

tldr; Gopher2600 not working on a Mac M1

 

I git cloned the repo and brew installed the SDL2 library:

 

$ git clone git@github.com:JetSetIlly/Gopher2600.git
$ brew install sdl2
$ brew install
$ brew install pkg-config

 

Had an issue with the home brew golang install and the Mac M1:

'go env' from brew install had -arch x86_64 in the GOGCCFLAGS and I couldn't figure out how to changes it as it's built from other variables

$ go env
...
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zv/xz_1yxbn65qfvy27yjfpq6d40000gn/T/go-build3376025737=/tmp/go-build -gno-record-gcc-switches -fno-common"

I uninstalled go from brew then downloaded the golfing package from the go lang website

$ make build
ld: warning: ignoring file /opt/homebrew/lib/libSDL2.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_SDL_AddEventWatch", referenced from:
      _addEventWatch in 000080.o
  "_SDL_AddHintCallback", referenced from:

$ brew uninstall go

Download from go.dev
https://go.dev/dl/

$ go env
...
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/zv/xz_1yxbn65qfvy27yjfpq6d40000gn/T/go-build330470289=/tmp/go-build -gno-record-gcc-switches -fno-common

*** ARCH LOOKS GOOD ***

$ make build
all instruction generated
go build -pgo=auto -gcflags '-c 3 -B -wb=false' -trimpath -tags=""
# github.com/inkyblackness/imgui-go/v4
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
$ ls -l gopher2600
-rwxr-xr-x  18257362 Nov  7 17:26 gopher2600
$ file gopher2600
gopher2600: Mach-O 64-bit executable arm64

So the above shows I got it to build to a Mac arm binary.

 

Running gopher with circus Atari

$ ./gopher2600 ROMS/circus.bin

Yields a file selector in Gopher2600 where I am unable to pick a ROM

Any idea of next steps? Is gopher not finding the SDL Library. Is Mac m1 just a stretch at this point?

 

Gopher M1 Mac.png

Edited by SuperZapperRecharge
Link to comment
Share on other sites

2 hours ago, SuperZapperRecharge said:

Anyone build Gopher2600 on a Mac M1?

 

I have a Mac Studio w/M2 Ultra. Towards the end of October 27th I updated the Studio to macOS Sonoma then did this to update homebrew and the packages:

 

brew update
brew upgrade

 

I then fetched the latest1 gopher2600 source:

git pull

 

and rebuilt it

make release

 

This is what built, it runs fine on my system:

 

gopher2600_darwin_arm64_20231027.zip

 

This command lists the versions of the homebrew packages I have installed:

brew list --versions

 

go is version 1.21.3 and sdl is version 2.28.4. Full version list at end2 in case it matters:

 

Log window in gopher2600 also shows SDL 2.28.4, and that it's using GL 3.2.

 

Screenshot2023-11-07at7_08_04PM.thumb.png.060d21c7ee268625c178e092ca8d4878.png

 

 

1  I don't see a way to show the version of gopher that I'm running. Looking at the commits I did the git pull before the commits on October 27th as the most recent changes I have are the moviecart fingerprinting on October 21st.

 

 

 Output of brew list --versions:

 

darrellspice@Mac-Studio ~ % brew list --versions
aom 3.7.0
brotli 1.1.0
cairo 1.18.0
cmake 3.27.7
fontconfig 2.14.2
fpc 3.2.2_1
freetype 2.13.2
fribidi 1.0.13
gdk-pixbuf 2.42.10_1
gettext 0.22.3
ghostscript 10.02.0
giflib 5.2.1
glib 2.78.1
go 1.21.3
graphite2 1.3.14
harfbuzz 8.2.2
highway 1.0.7
icu4c 73.2
imagemagick 7.1.1-21
imath 3.1.9
jasper 4.0.0
jbig2dec 0.20
jpeg-turbo 3.0.0
jpeg-xl 0.8.2_1
libde265 1.0.12
libheif 1.17.1
libidn 1.41
liblqr 0.4.2_1
libomp 17.0.3
libpng 1.6.40
libraw 0.21.1
librsvg 2.56.3
libsvg 0.1.4_2
libsvg-cairo 0.1.6_3
libtiff 4.6.0
libtool 2.4.7
libvmaf 2.3.1
libx11 1.8.7
libxau 1.0.11
libxcb 1.16
libxdmcp 1.1.4
libxext 1.3.5
libxrender 0.9.11
little-cms2 2.15
lz4 1.9.4
lzo 2.10
m4 1.4.19
openexr 3.2.1
openjpeg 2.5.0_1
pango 1.50.14
pcre2 10.42
pixman 0.42.2
pkg-config 0.29.2_3
qt@5 5.15.10_1
sdl2 2.28.4
shared-mime-info 2.3
svg2png 0.1.3_2
webp 1.3.2
x265 3.5
xorgproto 2023.2
xz 5.4.4
zstd 1.5.5
fpc-laz 3.2.2,2.2.6
fpc-src-laz 3.2.2-20210709,2.2.6
lazarus 2.2.6

 

Link to comment
Share on other sites

7 minutes ago, SpiceWare said:

This is what built, it runs fine on my system:

 

gopher2600_darwin_arm64_20231027.zip 4.61 MB · 0 downloads

 

 

I just downloaded the program and attempted to run it via command line - macOS blocked it for security reasons. I had to follow these steps to allow it to run.

Link to comment
Share on other sites

1 hour ago, SpiceWare said:

 

 

I just downloaded the program and attempted to run it via command line - macOS blocked it for security reasons. I had to follow these steps to allow it to run.

Hey thanks much. I'll give it a shot!

 

Installed your second build and get the same results as the one I initially built.

Running gopher2600 with the following command:

./gopher2600_darwin_arm64_20231027 ../ROMS/circus.bin

 

I get the file section menu. I can use the file selector. Go into parent and child directories.

When I click on a rom nothing happens.

Is there a particular way you run gopher2600 from the command line?

 

I'll compare my brew list to yours.

 

Thanks for your help! I'll look into it further and post back how far I get. Could be a few days.

Link to comment
Share on other sites

To start it I either type this via command line:

./gopher2600_darwin_arm64_20231027

 

Or double-click the executable, which will open up a Terminal window filled in with the command and exit like this:

 

image.thumb.png.76900d74102f0591559544d7654cbc29.png

 

Either way I then use the ROM selector. If I click a ROM it runs it to show a preview:

 

image.thumb.png.c0341fb928b411238e60639a5c341678.png

 

If I double-click the ROM it runs it:

 

Screenshot2023-11-07at9_14_53PM.thumb.png.2781ea5482378f247d354871270d0973.png

 

Screenshot2023-11-07at9_15_14PM.thumb.png.aa593c2151c0cbaf6c6d00dd5d097c86.png

Link to comment
Share on other sites

I'm an idiot. When I used 7z to unrar the ROMS they were all 0 bytes because of an error in 7z and the car format.

Brew installed unrar and fought with Mac security to use it following the Apple help you provided.

Also downloaded your version of frantic(frantic_20230917.bin) which was the first game I ran using Gopher2600.

 

The log window helped in showing a bad rom size.

Screen Shot 2023-11-08 at 12.21.13 AM.png

Screen Shot 2023-11-08 at 12.22.49 AM.png

  • Like 1
Link to comment
Share on other sites

Awesome, glad you figured it out!

 

Yeah, the stricter security in macOS can be a pain.  I also found the new "show desktop" behavior in Sonoma to be very annoying - accidentally clicking on the desktop causes all the open windows to slide offscreen.  Thankfully I found this on how to turn that feature off.

Link to comment
Share on other sites

14 hours ago, SpiceWare said:

1  I don't see a way to show the version of gopher that I'm running. Looking at the commits I did the git pull before the commits on October 27th as the most recent changes I have are the moviecart fingerprinting on October 21st.

 

To figure that out last night I manually reviewed the file changes for the commits against what was on my machine (ie: opened up files and looked for newly added lines of source).

 

I think I found a quicker way this morning:

 

darrellspice@Mac-Studio Gopher2600 % git describe

FPS-2208-g3ba63f78

 

the last bit after the -g, and before the final digit 8, matches the commit # in the commit list:

 

image.thumb.png.bc2acf2ce1cb36b71dced9403e034cb8.png

 

To test it I did a git pull to make my source current, after which git describe shows:

 

darrellspice@Mac-Studio Gopher2600 % git describe

FPS-2220-g66140314

 

which matches after the -g and before the final digit 4 of the most recent commit:

 

image.thumb.png.427f0538e7efc2fc62dbae2b632031fa.png

 

I wonder if that number could somehow end up in the executable and output in the Log window.

Link to comment
Share on other sites

If you run the following on the executable, it'll show the build information.

 

go version -m <executable>

 

The relevant lines of the output are show below. The revision is the git commit has and if you've made any local edits, the modified flag will be set to true.

 

	build	vcs=git
	build	vcs.revision=3d5b023e67ff5c0ea043483044a569ec6470cb14
	build	vcs.time=2023-11-08T16:10:14Z
	build	vcs.modified=true

 

Of course, this doesn't work if you don't have the Go compiler installed, and figuring out which version (ie. v0.26.0. etc.) the hash relates to is an extra step.

 

I'm currently working on a versioning system for the project, which will have all the relevant information to hand.

 

 

 

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

1 hour ago, JetSetIlly said:

That's interesting. I'll have a think about why that might be.

If a new file has been created it won't show up in the output of "git diff". However, it will show with "git status".

 

I'm guessing that a text editor has created a config directory or something like that in the working directory.

  • Like 1
Link to comment
Share on other sites

2 minutes ago, SpiceWare said:

git status lists 2 things, executable itself and the macOS hidden .DS_Store file for each directory. Those contain GUI info for the directory, such as the positions of the icons within the window.

Thanks. I'll add ".DS_Store" to the .gitignore file. I'll also beef up the ignore line for executable files

  • Like 1
Link to comment
Share on other sites

@SpiceWare I've added versioning. The game and debugger window will now show the current version string in the titlebar. You can also see the version by running gopher2600 version on the command line. (gopher2600 being the executable file on your machine)

 

For any bug reports I'll want to know the exact source that was used to build it. This can be retrieved with gopher2600 version -revision

 

I've also updated the .gitignore file so hopefully you won't see the "modified" string in the revision information unless something really has changed.

 

There's a couple of other things I want to do first but I'll tag and release a new version this weekend.

  • Like 1
Link to comment
Share on other sites

@JetSetIlly there's an error after git pull then make release:

 

darrellspice@Mac-Studio Gopher2600 % git pull
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 18 (delta 14), reused 18 (delta 14), pack-reused 0
Unpacking objects: 100% (18/18), 4.35 KiB | 247.00 KiB/s, done.
From https://github.com/JetSetIlly/Gopher2600
   66140314..b48d4876  master     -> origin/master
Updating 66140314..b48d4876
Fast-forward
 .gitignore                    |   6 +--
 Makefile                      | 106 ++++++++++++++++++++++++------------------
 debugger/commands.go          |  14 ++++++
 debugger/commands_help.go     |   3 ++
 debugger/commands_template.go |   2 +
 gopher2600.go                 |  25 +++++++++-
 gui/sdlimgui/platform.go      |   9 ++--
 version/doc.go                |  18 +++++++
 version/version.go            |  84 +++++++++++++++++++++++++++++++++
 9 files changed, 213 insertions(+), 54 deletions(-)
 create mode 100644 version/doc.go
 create mode 100644 version/version.go
darrellspice@Mac-Studio Gopher2600 % make release
goimports -w .
make: goimports: No such file or directory
make: *** [tidy] Error 1
darrellspice@Mac-Studio Gopher2600 % 

 

Link to comment
Share on other sites

Looks like brew on macOS doesn't install goimports with go, my bins for it are just go and gofmt:

 

darrellspice@Mac-Studio Gopher2600 % where go
/opt/homebrew/bin/go
darrellspice@Mac-Studio Gopher2600 % cd /opt/homebrew/bin 
darrellspice@Mac-Studio bin % ls -l go
lrwxr-xr-x  1 darrellspice  admin  26 Oct 27 12:49 go -> ../Cellar/go/1.21.3/bin/go
darrellspice@Mac-Studio bin % cd ../Cellar/go/1.21.3/bin   
darrellspice@Mac-Studio bin % ls
go	gofmt
darrellspice@Mac-Studio bin % 

 

I found reference to a couple commands that supposedly install goimports:

 

go install golang.org/x/tools/cmd/goimports@latest
go get golang.org/x/tools/cmd/goimports

 

But nothing happens when I try those - I just get returned to the prompt right away, not even an error message.

Link to comment
Share on other sites

9 hours ago, SpiceWare said:

@JetSetIlly there's an error after git pull then make release:

I forgot that goimports is not part of the standard Go distribution. Not sure why

go install golang.org/x/tools/cmd/goimports@latest

doesn't work though.

 

I've removed it as a dependency to the build process. It's not strictly needed.

Link to comment
Share on other sites

Thanks, it now builds and the new version option outputs:

darrellspice@Mac-Studio Gopher2600 % ./gopher2600_darwin_arm64 version -revision
v0.27.0 pre-release
89160e44a6b56899f6aac4669a0c2c04b45667a3 [modified]

 

There was a warning for make release, don't know if that was there before:

darrellspice@Mac-Studio Gopher2600 % make release
all instruction generated
go build -pgo=auto -gcflags "-c 3 -B -wb=false" -trimpath -ldflags "-s -w -X 'github.com/jetsetilly/gopher2600/version.number=v0.27.0 pre-release'" -tags=" release"
# github.com/inkyblackness/imgui-go/v4
warning: unknown warning option '-Wno-subobject-linkage' [-Wunknown-warning-option]
mv gopher2600 gopher2600_darwin_arm64

 

the go version -m still shows modified=true:

	build	vcs=git
	build	vcs.revision=89160e44a6b56899f6aac4669a0c2c04b45667a3
	build	vcs.time=2023-11-09T07:36:06Z
	build	vcs.modified=true

 

 

git status no longer lists the executable, but still shows all the macOS .DS_Store files:

darrellspice@Mac-Studio Gopher2600 % git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	.DS_Store
	coprocessor/developer/.DS_Store
	debugger/terminal/.DS_Store
	gui/sdlimgui/.DS_Store
	hardware/cpu/.DS_Store
	hardware/memory/.DS_Store
	hardware/memory/cartridge/.DS_Store
	hardware/memory/cartridge/arm/.DS_Store
	hardware/peripherals/.DS_Store
	hardware/riot/.DS_Store
	hardware/television/.DS_Store
	hardware/tia/.DS_Store

nothing added to commit but untracked files present (use "git add" to track)

 

 

.gitignore has this:

*.swp
*/.DS_Store
Session.vim
...

 

I changed it to this:

 

*.swp
.DS_Store
Session.vim
...

 

and git status now shows this, so I think the */ was incorrect:

darrellspice@Mac-Studio Gopher2600 % git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   .gitignore

no changes added to commit (use "git add" and/or "git commit -a")

 

 

got to thinking I didn't try sudo (runs command with higher security access). Still no goimports:

darrellspice@Mac-Studio Gopher2600 % sudo go install golang.org/x/tools/cmd/goimports@latest
Password:
darrellspice@Mac-Studio Gopher2600 % goimports
zsh: command not found: goimports

 

 

Link to comment
Share on other sites

2 hours ago, SpiceWare said:

I changed it to this:

 

*.swp
.DS_Store
Session.vim
...

I've made the changes here and pushed to github. You'll need to undo your changes to allow the pull to work, I think.

 

2 hours ago, SpiceWare said:

got to thinking I didn't try sudo (runs command with higher security access). Still no goimports:

darrellspice@Mac-Studio Gopher2600 % sudo go install golang.org/x/tools/cmd/goimports@latest
Password:
darrellspice@Mac-Studio Gopher2600 % goimports
zsh: command not found: goimports

I've asked around the other MacOS/Go users I know. They may have an answer.

 

 

  • Like 1
Link to comment
Share on other sites

Success!

 

I did the following:

git restore .
git pull
make release

 

and the version output no longer shows [modified]:

 

darrellspice@Mac-Studio Gopher2600 % ./gopher2600_darwin_arm64 version -revision 
v0.27.0 pre-release
8f920d767b0e20180e78c55d0d1c77f6ef619171

 

nor the =true:

 

darrellspice@Mac-Studio Gopher2600 % go version -m gopher2600_darwin_arm64
gopher2600_darwin_arm64: go1.21.3
...
	build	vcs=git
	build	vcs.revision=8f920d767b0e20180e78c55d0d1c77f6ef619171
	build	vcs.time=2023-11-09T18:17:38Z
	build	vcs.modified=false

 

 

Hopefully one of them can provide some insight on goimports.  In case it matters, Homebrew is what I used to install Go and SDL on my Mac. Perhaps there's an optional Go Homebrew package I need to install. I figured out how to list the available packages that start with go. I thought there might be something like "go-tools", "go-optional", etc. but nothing stands out to me (I assume the ✔ denotes installed):

 

darrellspice@Mac-Studio Gopher2600 % brew search /^go/
==> Formulae
go ✔                                     google-authenticator-libpam
go-bindata                               google-benchmark
go-boring                                google-java-format
go-camo                                  google-sparsehash
go-critic                                google-sql-tool
go-feature-flag-relay-proxy              googler
go-jira                                  googletest
go-jsonnet                               goolabs
go-md2man                                goose
go-statik                                gopass
go-task                                  gopass-jsonapi
go@1.16                                  gopls
go@1.17                                  goplus
go@1.18                                  goproxy
go@1.19                                  gops
go@1.20                                  gor
goaccess                                 goread
goawk                                    goredo
gobackup                                 goreleaser
gobject-introspection                    goreman
gobo                                     gosec
gobuster                                 gossip
gocloc                                   gost
gocr                                     gostatic
goctl                                    gosu
goenv                                    got
goffice                                  gotags
gofish                                   gotests
gofumpt                                  gotestsum
gojq                                     gotestwaf
gokart                                   gotify
gokey                                    goto
golang-migrate                           gotop
golangci-lint                            gotpm
golines                                  gource
gollum                                   govc
golo                                     govendor
gom                                      govulncheck
gomodifytags                             gowsdl
gomplate                                 gox
goocanvas

==> Casks
go-agent                   goldenpassport             google-drive
go-server                  golly                      google-earth-pro
go-shiori                  goneovim                   google-japanese-ime
go2shell                   goodsync                   google-trends
go64                       goofy                      google-web-designer
godot                      google-ads-editor          googleappengine
godot-mono                 google-analytics-opt-out   gopanda
gog-galaxy                 google-assistant           gopass-ui
gogs                       google-chat                gosign
goland                     google-chat-electron       gotiengviet
goldencheetah              google-chrome              gotomeeting
goldendict                 google-cloud-sdk           goxel

 

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