JetSetIlly / Gopher2600

Gopher2600 is an emulator for the Atari 2600 games console
GNU General Public License v3.0
239 stars 20 forks source link

Added vcsLib functions for improved ELF support. #21

Closed ZacharyScolaro closed 1 year ago

ZacharyScolaro commented 1 year ago

vcsTxs() vcsSax3() vcsPhp3() vcsPlp4() vcsPla4() vcsPlp4Ex(data) vcsPla4Ex(data) int randint()

ZacharyScolaro commented 1 year ago

I was concerned that ANDing the bits would rely on the state of 6502 registers. This is fine for vcsWrite3() but not compatible with vcsPha4Ex() because there is no register value being put on the bus there. TIA is driving only part of the bus, so ANDing wouldn't be well defined. It's better to just force the stuffed value in all cases since that's what we expect to happen on hardware.

JetSetIlly commented 1 year ago

Tip for any future pull requests: run gofmt on the codebase before committing. This normalises the code structure and will even fix some formatting errors that would otherwise cause the compiler to fail.

From the root of the source tree:

gofmt -w .

Results of gofmt pass on your recent changes https://github.com/JetSetIlly/Gopher2600/commit/e3099ccc9df784ef7b0e3f707f7a3065e1aabd20