Commit graph

236 commits

Author SHA1 Message Date
JetSetIlly
3ea4d74ba5 arm7tdmi disassembly
references to Mnemonic renamed to Operator for 6507
2021-01-17 08:46:16 +00:00
JetSetIlly
7d38c1cd84 simplified read8BitPC() function in CPU implementation
simplified handling of null videoCycle callback

removed some pointless assignments

clarified player scancounter switch
2020-11-28 07:39:56 +00:00
JetSetIlly
e693b29051 replaced all value receivers with reference receivers where appropriate
improves performance slightly
2020-11-22 12:26:54 +00:00
JetSetIlly
93dde40be4 removed some dangling lint errors (godot)
removed lint dependencies from Makefile targets
    - unreasonable to expect other people to have it installed
2020-11-19 15:11:30 +00:00
JetSetIlly
b712123653 clarified debugger input loop
removed some logical dead-ends

introduced the concept of restarting the input loop. this is important
when resetting the emulation for example. if the machine is reset during
a video cycle then the emulation will resume inside the video inputloop.
however the reset machine expects to be inside a cpu inputloop, causing
havoc. also used to ensure the rewind system works correctly.

restarting the input loop is tricky. it requires a RawEventReturn channel
that works like the RawEvent channel but returns control to the input
loop on completion.

added GetFeature() to gui interface to better support the rewind
subsystem. renamed ReqFeature() to SetFeature(). Added FeatureReqData
type for clarity.
2020-11-17 23:01:23 +00:00
JetSetIlly
3b86234d0f cartridgeloader no longer fails if files on local system do not parse with url.Parse()
boundary checks for fingerprinting of very small files

normalised error generation in cartridge mapper implementations
2020-10-25 13:28:29 +00:00
JetSetIlly
3902b13a55 television state is now rewindable
updates attached pixelrenderers. added Refresh() function and added
'refreshing' flag to SetPixel()

cpu and tia memory references updated on rewind

fixed rewind.Append()
2020-10-22 10:55:41 +01:00
JetSetIlly
3c1fc53093 state of VCS CPU/TIA/RIOT/Memory can be saved and restored on demand
televsion state not stored and there is some state information in the
debugger that is not updated on state restore

sketched in gui state rewinder
2020-10-21 10:48:49 +01:00
JetSetIlly
56b4733ddf simplified hardware package (preparation for rewind feature) 2020-10-20 14:52:44 +01:00
JetSetIlly
75af8d738d randomisation in the hardware package through a local RNG
this will facilitate recording/playback/regression of non-default
machine states (sometime in the future)
2020-10-19 18:32:57 +01:00
JetSetIlly
b787a45632 hardware package manages it's own preferences
memory randomised on startup (except cartridge memory) when randomstate
preference is true
2020-10-19 14:30:02 +01:00
JetSetIlly
1cdb19562e error values checked (golangci-lint -E errcheck)
error checked on Close() of writable file

fixed disassembly sanity check
2020-10-18 10:59:19 +01:00
JetSetIlly
e5e1cd7b0a removed use of os.Exit() and log.Fatalf after registering a deferred function
gocritic linter exitAfterDefer check
2020-10-16 18:52:41 +01:00
JetSetIlly
9e159b97d8 added more linters to golangci-lint config
godot --fix has been run to make sure all comments end in a full-stop

specified nolint directive to apply to specific linter
2020-10-16 16:31:07 +01:00
JetSetIlly
fca3c2120a fixed golint/stylecheck errors (golangci-lint -E golint -E stylecheck) 2020-10-16 15:48:52 +01:00
JetSetIlly
7b624b5506 removed some staticcheck errors (golangci-lint -E staticcheck)
supercharger tap window will now set tape counter (revealed by
staticcheck)
2020-10-16 14:50:23 +01:00
JetSetIlly
f30708d0d2 corrected style flaws (golangci-lint -E gocritic)
patch boundaries fixed in dpc mapper (as a result of lint)

added .golangci.yml configuration file

updated Makefile
2020-10-16 12:20:16 +01:00
JetSetIlly
b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +01:00
JetSetIlly
e6e3a63be8 spelling errors in comments (golangci-lint -E misspell --fix)
update Makefile lint target
2020-10-15 22:02:51 +01:00
JetSetIlly
eace858835 removed unnecessary type conversions (golangci-lint -E unconvert)
update Makefile lint target
2020-10-15 22:02:32 +01:00
JetSetIlly
81b5a84a0b simplifed code (golangci-lint -E gosimple) 2020-10-15 20:56:48 +01:00
JetSetIlly
9f74bffba0 fixed mutex error in pref package String() functions
imports sorted with goimport (after a global search and replace sometime
in the past)

various commentary improvements
2020-10-15 16:38:41 +01:00
JetSetIlly
9b5ba10ade reworking of lazyvalues package
clarified some concepts. removed superfluous code/comments
2020-10-13 14:25:37 +01:00
JetSetIlly
8b705dcff3 reworked how disassembly entries handle symbols
added CartHotspots debugging bus. used by symbols package to get
cartridge symbols information. should be useful for disassembly too

renamed hotspot() functions (in cartridge mapper implementations) to
bankswitch() for clarity

sdlimgui disassembly window shows address labels. disassembly iteration
updated to better support that.

SYMBOL command prints all mirrors for cartridge addresses
2020-10-07 06:58:40 +01:00
JetSetIlly
7fc48dcd65 renamed errors package to 'curated'
to differentiate with the now existing errors package in the standard
library.
2020-09-28 22:16:59 +01:00
JetSetIlly
2d5cae17f5 reworking of errors package
removed all messages from errors package. the strings are now hard coded
in place. the original reason for extracting the error strings like that
was (a) for redundancy and (b) for localisation possibilities. However,
in reality there is not much redundancy and since the project started
the scope of localisation is much larger (particularly due to the
addition of a GUI)

this is the first step. the next step is to remove the errors package
altogether. recent additions to Go mean that the functionality of the
errors package is no longer required. moreover, the original idea for
the errors package functions turns out not to have been as useful as
first appeared (the Error() functionality which makes sure no repeating
sub-strings occur is probably better achieved with static tooling).

one idea that comes from this which is quite interesting is the idea of
a curated error. that is, any error that has been "wrapped" as some
'generic' type. the IsAny() function in the errors package effectively
serves this purpose. we use that in one place in the input loop of the
debugger. not strictly necessary but nice to have so it would ideal
if we could remove the errors package but keep that idea.
2020-09-28 22:16:59 +01:00
JetSetIlly
10f77e7cad implemented LAX absolute (opcode AF)
used by "sokoboo plus" (plusROM version of sokoboo)
2020-09-21 12:20:03 +01:00
JetSetIlly
b2aaae808f removed ProgramCounterCycled error from CPU
nice information to have but caused problems with some ROMs that
purposefully cycle the PC (eg. second load of Party Mix)
2020-08-24 13:31:10 +01:00
JetSetIlly
298a5d343f updated copyright notice in all files
the note about historical versions also being covered wasn't strictly
needed and was ugly. the LICENCE being in the root file from the very
first commit is sufficient.
2020-07-26 20:18:56 +01:00
JetSetIlly
4e38ed2fab memory redisassembled on TapeLoaded error (from supercharger)
clarified how TapeLoaded error affects CPU state - added CPU interrupted
flag. fixed CPU mid-instruction sanity checks in the process

better/clearer terminal prompts

break on non-cartridge PC will no longer auto-add BANK condition
2020-07-11 20:15:35 +01:00
JetSetIlly
1e55488bb1 fixed address for phantom read on page fault for IndirectIndexed addressing mode 2020-07-10 23:53:19 +01:00
JetSetIlly
066d92d4cd operand bytecode shown in correct endian order
instruction data updated consistently before cycle callback is called

clearer CPU functions and commentary
2020-07-06 15:16:21 +01:00
JetSetIlly
8b5987b503 supercharger registers window
supercharger sends TapeLoaded error signal to indicate when a tape as
finished loading. payload is a function to call in the context of the
VCS hardware, allowing changes to be made to the VCS.

split CartDebugBus into CartStaticBus and CartRegistersBus
2020-07-03 17:40:00 +01:00
JetSetIlly
812034ae63 fixed phantom read address 2020-07-03 17:40:00 +01:00
JetSetIlly
b274d1dd07 update TODO comments so they appear in todo.txt 2020-06-29 19:26:11 +01:00
JetSetIlly
05108d525e implemented opcode AB
used in JustJeff's BBlocks
    https://atariage.com/forums/topic/308157-wip-bblocks-bejeweled/
2020-06-29 19:26:11 +01:00
JetSetIlly
aae1aba5d2 banks now represented by BankDetails type
disassembly window shows "executing from cartridge RAM" message

better disassembly decoding loop. clarified and corrected commentary in
disassembly package. identified some more critical sections in
disassembly package

this results in a better mnetwork disassembly

origin and memtop for disassembled entries are now definable. added
disassembly.FxxxMirror to preferences. PREF command can now set
FxxxMirror option. Added checkbox to win_prefs

renamed Iterate to IterateBank and added IterateCart

UpdateEntry() ignores any result not in the cartridge ROM space

tidied-up/unified preference files in debugger/disassembly/hiscore
packages
2020-06-29 19:26:10 +01:00
JetSetIlly
f1abc0fab2 disassembly entries now updated correctly on execution passes
entry notes updated to show branch test result (branching/next)
2020-06-16 18:52:42 +01:00
JetSetIlly
39fd8381dd remove Poke() from cartMapper interface. replaced with an argument to
Write()

all cartridge types are now poke-able

all cartridge types are no patch-able

reworked error types/messages. replaced some errors with panics
2020-06-11 20:08:10 +01:00
JetSetIlly
9bc2b3cb08 added ADDRESSMODE breakpoint/trap target
renamed addressing modes to be less confusing / more in line with how
other people label them
2020-05-21 23:03:02 +01:00
JetSetIlly
ad0e29ec9a implemented random CPU state on reset 2020-05-14 16:06:04 +01:00
JetSetIlly
1aa99a9b38 CPU decimal mode
zero, carry and overflow flags set correctly.

You can see this in game end condition for Barnstormer. Not sure how
this got past. testing not rigorous enough I suppose.

bug most probably introduced in b509143549
2020-04-10 18:16:42 +01:00
JetSetIlly
aa25f55555 vertex/fragment shaders in glsl source file
improved CRT fragment shader

better scanline shadows; vignette effect; less agressive bend effect, it
didn't work very well with colour splitting and the vignette effect is a
suitable alternative

renamed instructions_gen.go to generator.go to match naming of shader
generator in sdlimgui
2020-04-10 10:08:52 +01:00
JetSetIlly
cff3cad5b7 disassembly reworking
removed analysis code. too many code paths rendered the method
unworkable. for example, eg. JMP (indirect) where indirect address is in
ram.

Clarified how the Bank field in the disassembly.Entry should be used.

win_disasm makes sure that the current PC entry has been blessed. making
sure it will be seen in the disassembly window (also a note in debugger
inputloop about the fact that blessing should really take place there,
except for race condition issues. TODO note added)

added status line and options to win_disasm. status line shows when
execution from VCS RAM is taking place. options for highlighting addresses
common between all banks and non-decoded addresses
2020-03-27 21:06:57 +00:00
Simon Lehn
04628ca3ea
make table.go recognizable as generated
Generated go source code should contain a file matching the regex: ^// Code generated .* DO NOT EDIT\.$
This allows tools to discern generated code.
See:
https://golang.org/s/generatedcode
https://golang.org/pkg/cmd/go/internal/generate/
2020-03-22 15:05:02 +01:00
JetSetIlly
e56a9ddc21 implemented opcode 0x2b (anc)
added opcode 0xd7 (dcp)
2020-03-22 11:53:30 +00:00
JetSetIlly
cdcb010fc8 fixed behaviour of opcode 0xcb (axs)
it wasn't setting the carry flag after the subtract operation

fixes second effect in aTaRSI ROM.
2020-03-22 11:24:13 +00:00
Robin Eklind
24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
JetSetIlly
3c3b78ccd3 implemented lazyread/write system
removes race errors between gui and emulation threads

audio window now presents audio waveform more accurately
2020-03-10 22:41:56 +00:00
JetSetIlly
2a979a568b fixed race condition between cpu and win_cpu when accessing LastResult 2020-02-21 17:16:18 +00:00