Commit graph

18 commits

Author SHA1 Message Date
JetSetIlly 84ad23c03e moved Patch() from CartMapper to CartPatchable interface
this means that a mapper only needs to implement the Patch() if it makes
sense

mappers that don't need it have had the Patch function removed.
implemented function for SCABS and UA

corrected error messages for atari mappers - some messages weren't
referencing the correct atari mapper and simply stated "atari"
2023-11-26 09:32:28 +00:00
JetSetIlly 3aa5885ebe removed curated pacakge. replaced with wrapped errors
curated package predated the standard errors package introduced in
go1.13

the standard package does a better job of what curated attempted to do

the change of package also gave me a opportunity to clean up the error
messages a little bit
2023-02-13 21:58:39 +00:00
JetSetIlly 178f05f17b updated go minimum version to 1.20
applied gofmt to source tree to update the documentation comments
2023-02-12 13:09:07 +00:00
JetSetIlly e5bd938b41 renamed paths package to resources package
ResourcePath() is now called JoinPath()

UniqueFilename() moved to a new package named unique and renamed to
Filename()
2021-10-03 13:32:08 +01:00
JetSetIlly 40e10de6a3 Go: replaced iotuil functions with io equivalents 2021-06-25 10:10:56 +01:00
JetSetIlly 49a8de6c31 removed lint errors
menu entries for windows can have diferent labels to the window title.
(this was already a feature but it is now more clear/onvenient. change
prompted by lint error).
2021-01-11 17:40:52 +00:00
JetSetIlly eac81e26bb patch from output of "cmp -l"
a far simpler but more convenient patch format
2021-01-08 23:24:19 +00: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 b41c6d0301 removed unnecessary whitespace (golangci-lint -E whitespace --fix)
update Makefile lint target
2020-10-16 10:29:09 +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 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 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
Robin Eklind 24cb28843f gopher2600: use fully qualified import path as module path
Fixes #4.
2020-03-21 23:39:56 +01:00
steve 4534da0db6 reworked paths package
the location of the configuration directory now depends on how the
binary is built. release versions of the binary will look for the
gopher2600 directory in the user's os configuration directory.
non-release versions will look for the .gopher2600 directory in the CWD.

paths.ResourcePath() will create the paths that don't exist

paths.ResourcePath() now clearly differentiates paths and files

added build target to the Makefile; disabled release target for now
2020-01-07 19:14:51 +00:00
steve 16b15fad95 o added licence headers to all files 2020-01-05 18:58:43 +00:00
steve 0f5a258482 o patch
- implemented patching

o setup
    - added patch entry type

o gopher2600
    - added patch flag to RUN mode
2020-01-05 18:58:42 +00:00
steve d7cdfcfe61 o errors
- removed ErrorID, using the error message as the ID
    - works just as well and simplifies maintenance
    - the messages should be moved to the relevant packages OR to a
      locale package. not sure which yet.
2020-01-05 18:58:42 +00:00