Commit graph

49 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 e687073426 AccessPassive() implemented by cartridge mappers now returns error
very few cartridge mappers need to return an error but is necessary in
the case of the experimental cartridge shim. merging here because it's a
good change to have
2023-10-27 19:14:50 +01:00
JetSetIlly 1ad07dc020 environment correctly propogated after Plumb() event
AudioTick() function in tracker interface accepts TrackerEnvironment
instance. tracker implementation differentiates emulation instances and
records AudioTick() information accordingly
2023-04-17 17:07:03 +01:00
JetSetIlly 6c3035e143 renamed hardware/instance package to environment 2023-04-16 21:24:09 +01: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 4d8fdbf242 reimplementation of 3e and 3e+
previous implementations were broken by 8766e794dc
2023-02-06 21:53:45 +00:00
JetSetIlly 8766e794dc refined how cartridge is accessed
cartridge access is now divided into Access(), AccessVolatile() and
AccessPassive()

Access() and AccessVolatile() could easily be combined into one function
but I feel it is clearer to keep them separate

hardware/memory.go Read() function refined to be clearer about how and
when the cartridge is accessed
2023-02-06 21:49:07 +00:00
JetSetIlly fef0cce551 renamed Read() and Write() to Access() and AccessDriven() for mappers
also renamed Listen() to AccessPassive()
2023-01-11 18:06:46 +00:00
JetSetIlly 975faa8b72 cart mappers return value indicating what data pins are being driven
this allows the memory system to drive the pins "randomly" in the same
way as for the TIA (which has several undriven pins)
2023-01-11 18:06:46 +00:00
JetSetIlly a59c49fa3e removed passive flag from cartridge.Read()
leftover from earlier experimentation that was not removed
2023-01-11 18:06:46 +00:00
JetSetIlly 259dcc8648 3e+ nil dereference when accessing instance type 2022-01-20 13:55:38 +00:00
JetSetIlly 6311063b89 random package can produce numbers faster for the running emulation 2022-01-19 22:31:50 +00:00
JetSetIlly 65fa01e4c8 added superchip option for EF mapper
file extension and -mapping option to indicate superchip for mappers
that support it, changed SC rather than +. For example, "2KSC" and not
"2k+". This avoid confusion with mappers that use the + symbol for other
purposes (for example, DPC+)

cartridge.Attach() will log cartridge insertion with mapping ID
information

removed description field from all cartridge mappers that still had it.
the field was no longer referred to but we may add something similar in
the future
2022-01-05 18:44:55 +00:00
JetSetIlly f2fb0091e7 simplified/clarified memory interface
addresses and bus interface removed and split into cpubus and chipbus
packages.

ReadZeroPage() no longer has any distinction from normal Read()
function.
2021-12-26 19:00:11 +00:00
JetSetIlly e0d4c7cb7b added random package. random numbers "accessed" via instance package 2021-12-05 20:17:43 +00:00
JetSetIlly 085adf5159 added hardware/instance package 2021-12-05 20:17:43 +00:00
JetSetIlly 2348faf319 improved ROM selector. updated CARTRIDGE command
double-click in ROM selector loads the cartridge. cartridgine
information below thumbnail. save ROM selection to preferences.
automatically select previous ROM on next session.
2021-11-19 16:44:10 +00:00
JetSetIlly db7fc34889 removed hotspot symbol information for superbank
the solution was too complex. it requires a more elegant solution.
2021-03-12 11:24:11 +00:00
JetSetIlly a7cecfe0fe improved disasm window
lazy system now pulses the update time. is used by the disasm window to
synchronise updating

clearer method of switching between play and debugmodes (not fully
implemented yet)

extended mapper.BankInfo fields to include Name (useful for identifying
BIOS in the supercharger, probably not much else)

cart summary info moved from disam window to menubar
2021-02-21 06:34:27 +00:00
JetSetIlly 45e43cf0c6 improved MNetwork fingerprinting
a new demo ROM from Splendidnut (Congo Bongo) was not being detected
correctly.

during testing I noticed that the 8k version of Bump n Jump was not
supported so the MNetwork mapper now supports 8k ROMs in addition to the
documented 16k.

error message corrections.
2021-01-24 09:29:32 +00:00
JetSetIlly 76b36a4d80 cartridge rewinding is now more flexible
cart ram/static areas show changes across time

supercharger TV reset after tape load no longer resets frame number.
this affected the rewind system and how it stores historical data.

improved responsiveness of service loop polling
2020-12-31 17:19:33 +00:00
JetSetIlly 418de49ba1 ARM timer ticks forward correctly
VCSReturnChannel so the television can inform the VCS about a change in
television spec. The VCS uses this information to forward clock
information to the cartridge.Step function

DPC and DPC+ music generators now use correct VCS clock value in all
instances
2020-12-30 20:45:07 +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 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 a66c3c5087 more cartridge state Snapshot()/Plumb() implementations
- 3e
- 3e+
- cbs
- df
- dpc
- dpc+
- mnetwork
- parker bros.
- supercharger
- tigervision

reworked atari cartridge implementations

plusrom passed through all Snapshot() and Plumb() calls to the child
mapper as normal. it adds nothing additional to the saved state.
2020-10-25 11:13:35 +00:00
JetSetIlly 85b7b015cc snapshot cartridge state for rewind system
implemented for:
    - atari
2020-10-23 21:32:07 +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 83ee7e99ab cartridge ram/registers are randomised on reset
replaced Initialise() with Reset()
2020-10-19 14:30:43 +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 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 eace858835 removed unnecessary type conversions (golangci-lint -E unconvert)
update Makefile lint target
2020-10-15 22:02:32 +01:00
JetSetIlly cd77a3be19 reworked disassembly process. better bless detection particularly for JMP/JSR
moved cartridge debugging buses to mapper package

removed banks package and moved/renamed those types to mapper package

renamed IterateBanks() to CopyBanks(). function now returns all banks as
an array.

removed global Passive setting from cartridge. disassembly now only
accesses cartridge memory through a copy of the bank data (CopyBanks())
so it is not needed
2020-10-08 09:29:58 +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 7b1325e4ce added 3e cartridge mapper
altered 3e+ fingerprinting method
2020-09-21 12:20:03 +01:00
JetSetIlly 96e765525c sketched in PlusROM support
very rough currently. race conditions in network access, requires
restructuring.

no logging from network access. again, requires some engineering in the
log package to avoid race errors
2020-09-16 18:28:49 +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 4cfd4e3428 reworked cartridgeloader package
clarified error messages from cartridge mapper implementations,
particularly in regard to wrong file sizes
2020-07-22 18:50:37 +01:00
JetSetIlly 537c35ba27 reworked cartridge fingerprinting
all fingerprint code is in the one place (fingerprint.go)

reworked tape loading in preparation for real tape based loading.
introduced tape interface and renamed existing tape structure as
FastLoad. renamed TapeLoaded error to FastLoaded. silenced fastload
debugging messages for now (will re-add when I've implemented the
logging package)
2020-07-11 20:24:37 +01:00
JetSetIlly a9b6235983 more information in the cart RAM window
tab headers no longer scroll

indicator for whether the RAM bank is mapped or not

updated bus.CartRAM struct with mapped information
2020-07-10 23:53:19 +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 89a816f957 Added IterateBank() function to cartridge interface
moved BankDetails from memorymap to banks package. renamed to Details

removed SetBank() function. not flexible enough to handle all mapper
types and not required except for the CARTRIDGE BANK command, which is
not particularly important.

supercharger not working yet
2020-06-29 22:49:00 +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 56fecfbd2d refactor of cartridge mapper code for consistency and clarity
removed SaveState() and RestoreState(). added Passive flag to prevent
active changes caused by reading of cartridge

corrected disassembly iteration when first match is the first entry in
the list
2020-06-26 20:09:37 +01:00
JetSetIlly da4df2355e first attempt at supercharger mapper. not finished yet. 2020-06-26 20:09:24 +01:00
JetSetIlly 7a71650da9 added 3e+ cartridge mapper
tidied up String() values for all cartridge types

debugger now displays cartridge filename in menu bar, instead of disasm
window

CARTRIDGE command reports filename without args and mapping summary with
BANK command
2020-06-13 10:50:25 +01:00