1655067540
This is an NES emulator written in Go.
http://www.michaelfogleman.com/static/nes/
github.com/go-gl/gl/v2.1/gl
github.com/go-gl/glfw/v3.1/glfw
github.com/gordonklaus/portaudio
The portaudio-go dependency requires PortAudio on your system:
To build portaudio-go, you must first have the PortAudio development headers and libraries installed. Some systems provide a package for this; e.g., on Ubuntu you would want to run apt-get install portaudio19-dev. On other systems you might have to install from source.
On Mac, you can use homebrew:
brew install portaudio
The go get
command will automatically fetch the dependencies listed above, compile the binary and place it in your $GOPATH/bin
directory.
go get github.com/fogleman/nes
nes [rom_file|rom_directory]
If no arguments are specified, the program will look for rom files in the current working directory.
If a directory is specified, the program will look for rom files in that directory.
If a file is specified, the program will run that rom.
For 1 & 2, the program will display a menu screen to select which rom to play. The thumbnails are downloaded from an online database keyed by the md5 sum of the rom file.
Joysticks are supported, although the button mapping is currently hard-coded. Keyboard controls are indicated below.
Nintendo | Emulator |
---|---|
Up, Down, Left, Right | Arrow Keys |
Start | Enter |
Select | Right Shift |
A | Z |
B | X |
A (Turbo) | A |
B (Turbo) | S |
Reset | R |
The following mappers have been implemented:
These mappers cover about 85% of all NES games. I hope to implement more mappers soon. To see what games should work, consult this list:
Interested in writing your own emulator? Curious about the NES internals? Here are some good resources:
Author: Fogleman
Source Code: https://github.com/fogleman/nes
License: MIT license
1599854400
Go announced Go 1.15 version on 11 Aug 2020. Highlighted updates and features include Substantial improvements to the Go linker, Improved allocation for small objects at high core counts, X.509 CommonName deprecation, GOPROXY supports skipping proxies that return errors, New embedded tzdata package, Several Core Library improvements and more.
As Go promise for maintaining backward compatibility. After upgrading to the latest Go 1.15 version, almost all existing Golang applications or programs continue to compile and run as older Golang version.
#go #golang #go 1.15 #go features #go improvement #go package #go new features
1665134280
This is an NES emulator written in Go.
http://www.michaelfogleman.com/static/nes/
github.com/go-gl/gl/v2.1/gl
github.com/go-gl/glfw/v3.1/glfw
github.com/gordonklaus/portaudio
The portaudio-go dependency requires PortAudio on your system:
To build portaudio-go, you must first have the PortAudio development headers and libraries installed. Some systems provide a package for this; e.g., on Ubuntu you would want to run apt-get install portaudio19-dev. On other systems you might have to install from source.
On Mac, you can use homebrew:
brew install portaudio
The go get
command will automatically fetch the dependencies listed above, compile the binary and place it in your $GOPATH/bin
directory.
go get github.com/fogleman/nes
nes [rom_file|rom_directory]
If no arguments are specified, the program will look for rom files in the current working directory.
If a directory is specified, the program will look for rom files in that directory.
If a file is specified, the program will run that rom.
For 1 & 2, the program will display a menu screen to select which rom to play. The thumbnails are downloaded from an online database keyed by the md5 sum of the rom file.
Joysticks are supported, although the button mapping is currently hard-coded. Keyboard controls are indicated below.
Nintendo | Emulator |
---|---|
Up, Down, Left, Right | Arrow Keys |
Start | Enter |
Select | Right Shift |
A | Z |
B | X |
A (Turbo) | A |
B (Turbo) | S |
Reset | R |
The following mappers have been implemented:
These mappers cover about 85% of all NES games. I hope to implement more mappers soon. To see what games should work, consult this list:
Interested in writing your own emulator? Curious about the NES internals? Here are some good resources:
Author: fogleman
Source Code: https://github.com/fogleman/nes
License: MIT license
1655067540
This is an NES emulator written in Go.
http://www.michaelfogleman.com/static/nes/
github.com/go-gl/gl/v2.1/gl
github.com/go-gl/glfw/v3.1/glfw
github.com/gordonklaus/portaudio
The portaudio-go dependency requires PortAudio on your system:
To build portaudio-go, you must first have the PortAudio development headers and libraries installed. Some systems provide a package for this; e.g., on Ubuntu you would want to run apt-get install portaudio19-dev. On other systems you might have to install from source.
On Mac, you can use homebrew:
brew install portaudio
The go get
command will automatically fetch the dependencies listed above, compile the binary and place it in your $GOPATH/bin
directory.
go get github.com/fogleman/nes
nes [rom_file|rom_directory]
If no arguments are specified, the program will look for rom files in the current working directory.
If a directory is specified, the program will look for rom files in that directory.
If a file is specified, the program will run that rom.
For 1 & 2, the program will display a menu screen to select which rom to play. The thumbnails are downloaded from an online database keyed by the md5 sum of the rom file.
Joysticks are supported, although the button mapping is currently hard-coded. Keyboard controls are indicated below.
Nintendo | Emulator |
---|---|
Up, Down, Left, Right | Arrow Keys |
Start | Enter |
Select | Right Shift |
A | Z |
B | X |
A (Turbo) | A |
B (Turbo) | S |
Reset | R |
The following mappers have been implemented:
These mappers cover about 85% of all NES games. I hope to implement more mappers soon. To see what games should work, consult this list:
Interested in writing your own emulator? Curious about the NES internals? Here are some good resources:
Author: Fogleman
Source Code: https://github.com/fogleman/nes
License: MIT license
1596793260
http
package to create and initialize HTTPS servers in Go.(source: unsplash.com)
In the “Simple Hello World Server” lesson, we learned about net/http
package, how to create routes and how [ServeMux](https://golang.org/pkg/net/http/#ServeMux)
works. In the “Running multiple HTTP servers” lesson, we learned about [Server](https://golang.org/pkg/net/http/#Server)
structure and how to run multiple HTTP servers concurrently.
In this lesson, we are going to create an HTTPS server using both Go’s standard server configuration and custom configuration (using [_Server_](https://golang.org/pkg/net/http/#Server)
structure). But before this, we need to know what HTTPS really is?
HTTPS is a big topic of discussion in itself. Hence while writing this lesson, I published an article just on “How HTTPS works?”. I advise you to read this lesson first before continuing this article. In this article, I’ve also described the encryption paradigm and SSL certificates generation process.
If we recall the simplest HTTP server example from previous lessons, we only need http.``[ListenAndServe](https://golang.org/pkg/net/http/#ListenAndServe)
function to start an HTTP server and http.``[HandleFunc](https://golang.org/pkg/net/http/#HandleFunc)
to register a response handler for a particular endpoint.
(https://play.golang.org/p/t3sOenOYAzS)
In the example above, when we run the command go run server.go
, it will start an HTTP server on port 9000
. By visiting http://localhost:9000
URL in a browser, you will be able to see a Hello World!
message on the screen.
As we know, the nil
argument to ListenAndServe()
call invokes Go to use the [DefaultServeMux](https://golang.org/pkg/net/http/#DefaultServeMux)
response multiplexer, which is the default instance of ServeMux
structure provided globally by the Go. The HandleFunc()
call adds a response handler for a specific route on the multiplexer instance.
The http.ListenAndServe()
call uses the Go’s standard HTTP server configuration, however, in the previous lesson, how we can customize a server using [Server](https://golang.org/pkg/net/http/#Server)
structure type.
To start an HTTPS server, all we need do is to call ServerAndListenTLS
method with some configuration. Just like ServeAndListen
method, this method is available on both the http
package and the Server
structure.
The http.``[ServeAndListenTLS](https://golang.org/pkg/net/http/#ListenAndServeTLS)
method uses the Go’s standard server implementation, however, both [Server](https://golang.org/pkg/net/http/#Server)
instance and Server.``[ServeAndListenTLS](https://golang.org/pkg/net/http/#Server.ListenAndServeTLS)
method can be configured for our needs.
#go-programming-language #go #golang-tutorial #go-programming #golang
1655304840
Building Web Applications with Go
Welcome, gopher! You're not a gopher? Well, this workshop is for gophers, or people that use the Go programming language. But fear not if you've never written any Go before! I'd recommend you learn the basics for the language first with the Go tour.
This workshop has been run a couple of times with an instructor leading. The goal of this repo is to make it as easy as possible for individuals to follow the content by themselves. If you get stuck at any point, feel free to file issues asking questions.
To go through this you will need the following:
GOPATH
by following the How to Write Go Code tutorial.There's a lot to say about how to build web applications, in Go or any other language. But we only have one day so we won't try to cover too much. Instead we'll cover the basics, so you'll be able to explore other solutions and frameworks later.
The workshops is divided in eleven sections:
These are places where you can find more information for Go:
My favorite aspect of Go is its community, and you are now part of it too. Welcome!
As a newcomer to the Go community you might have questions or get blocked at some point. This is completely normal, and we're here to help you. Some of the places where gophers tend to hang out are:
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.
Author: Campoy
Source Code: https://github.com/campoy/go-web-workshop
License: Apache-2.0 license