Commit graph

69 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 b3c743d8df tiny efficiency improvement in ACE 2023-08-30 07:34:19 +01:00
JetSetIlly 12b9f19d1f removed lazy update components. made savekey rewind safe 2023-08-26 09:14:40 +01:00
JetSetIlly aacea11fdb simplified coprocessor interfaces 2023-08-09 15:26:05 +01:00
JetSetIlly 2d02764e60 moved coprocessor interface/types from mapper to coprocessor package
there could be more work to do here to make this more readable
2023-08-09 15:26:05 +01:00
JetSetIlly 9b86b88440 simplified CoProcRead* instructions to CoProcPeek 2023-08-09 15:26:05 +01:00
JetSetIlly 14b62804e3 ace.Step() function careful not to run too often 2023-08-06 19:54:37 +01:00
JetSetIlly f5c75b13df ACE will set the system clock argument to whatever the ARM prefs value says 2023-08-04 20:23:19 +01:00
JetSetIlly 9f79e8b2d1 implicit relocation of .dwarf_frame for ACE 2023-07-31 08:57:41 +01:00
JetSetIlly cddb2efba1 corrected DW_OP_regx. unsigned LEB value not signed
stipulated that the coprocessor takes extended register values in the
Register() and SetRegister() functions. extended register check in
coprocessor implementation (ie. ARM)
2023-07-29 14:21:53 +01:00
JetSetIlly 61b4c07b65 thumbnailer (animation and image) implement CartYieldHook
a cartridge with a coprocessor that had failed for some reason would
cause the thumbnailer goroutine to halt

in the case of the thumbnailer.Image type this would lock the UI
goroutine. and in the case of the thumbnail.Anim type it would lock the
goroutine that had been launched to produce the animation

added YieldHookResponse to better indicate the intention of the
CartYieldHook
2023-07-18 09:26:39 +01:00
JetSetIlly 769bb68477 coproc MapAddress() implementations return origin address rather than index
this makes more sense and is easier to understand and think about. if
the index for the adddress is needed, then it can be attained simply by
subtracting the origin from the address
2023-07-17 15:50:07 +01:00
JetSetIlly 81f4a83490 more flexible yield information 2023-07-17 15:50:07 +01:00
JetSetIlly 7ff8013d69 corrected placement of non-relocatable source code relative to executable memory
this primarily affects ACE files and corresponding ELF/DWARF data
2023-07-11 08:24:17 +01:00
JetSetIlly 025746af65 adjusted ACE memory allocation 2023-06-21 20:04:34 +01:00
JetSetIlly 63933d4e51 added ACE-UF00 variation of ACE 2023-06-21 08:35:06 +01:00
JetSetIlly b61dd3fe06 implemented CartMapper.CopyBanks() for ACE 2023-06-21 08:35:06 +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 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 31be309056 tidied up GPIO implementation for ACE 2023-02-05 14:04:43 +00:00
JetSetIlly 1572f9f836 corrected ExecutableOrigin() value for ACE 2023-01-29 17:50:11 +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 2aa9fb9c4f implemented CoProcStack frame for coprocessor capable mappers
the ARM implementation now keeps track of the current stack frame. the
stack frame is used as the framebase of a location list if there is no
location list specified for the function
2022-12-05 10:51:45 +00:00
JetSetIlly faf1e5a60a added COPROC SET command
allows the seting of a coproc register from command line

moved COPROC LIST REGS to COPROC REGS

fixed COPROC TOP
2022-11-22 08:28:12 +00:00
JetSetIlly cfb6a19f34 complete coproc developer implementation for ELF
temporarily broken after development work on ACE
2022-11-20 20:24:37 +00:00
JetSetIlly 1adc8f91db local variables mostly fully functional now
not all DWARF expression operators are implemented but there's enough
for us to assess whether the system is working correctly
2022-11-20 20:13:01 +00:00
JetSetIlly 1ad3b98ed3 proof-of-concept for local variable inspection
only local variables that are stored in registers are handled at the
moment but that's good enough to show the basic breakpoint mechanism
works

sketched in local variables window
2022-11-16 19:08:45 +00:00
JetSetIlly b01dff193d clarified ARM yield concepts and introduced Interrupt() to help
more careful enabling/disabling of cartridge breakpoint. we don't want
them triggering during rewinding or during startup, for example

transition from playmode to the debugger when a breakpoint is triggered,
works better - still not perfect though
2022-11-06 20:27:00 +00:00
JetSetIlly 6ef3ffbcef renamed and commented coprocessor YieldReason values 2022-11-05 20:59:34 +00:00
JetSetIlly ac5825a160 arm.Run() no longer returns error
errors will be logged and OnYield called with YieldError
2022-11-05 20:59:34 +00:00
JetSetIlly 15850af3a8 CartYieldHook.CartYield() returns bool
the returned value is true if the ARM emulation should 'give up' for the
time being. when this happens it is assumed that the state of the
emulation is not ideal and so drifting by a couple of video cycles (at
most) is not an issue - we'll try to remove even this small deviation
in the future but it's not a priority

A YieldReason, other than YieldForVCS, when in playmode will cause the
emulation to switch to debugging mdoe. there are possible issues with
this but for now it works
2022-11-05 20:59:34 +00:00
JetSetIlly 15be2bfd4f implemented StubCartYieldHook
initialise cartridge mappers that need YieldHook with the stub in case
the driver doesn't need to implement one (eg. the thumbnailer)
2022-11-05 20:59:34 +00:00
JetSetIlly e65b00a9c9 coprocessor yield now have reasons (eg. breakpoint, undefined behaviour, etc.)
acquire critical section in OnYield()
2022-11-05 20:59:29 +00:00
JetSetIlly 49b118e266 ACE format refinements
corrected allocation of memory for ACE. moved ACE stack from SRAM to Flash

ARM is not run on ACE Reset()
2022-11-05 06:53:54 +00:00
JetSetIlly 1de9614e2e first working version of ARM breakpoints
UI is rudimentary for now and of course, there is no local variable
inspection

implemented for CDF and ACE only for now. DPC+ will use the same
technique as CDF once it's been finalised and ELF will be similar to ACE
2022-10-29 07:48:30 +01:00
JetSetIlly ac9d909906 corrected ACE.ExecutableOrigin() result
however, for now the coprocessor source parsing does not use the result.
for now, binaries should be linked appropriately for the emulator
2022-10-25 21:09:17 +01:00
JetSetIlly dc224474a5 moved "PreferredMAMCR" value to architecture package 2022-10-24 15:46:36 +01:00
JetSetIlly 4fb09ff92b renamed memorymodel package to architecture 2022-10-24 15:46:36 +01:00
JetSetIlly 37080c7be9 corrected BusStuff() for ACE
gpio_mode is reset after first BusStuff(). without this reset, the bus
stuffing signal will persist and pollute future memory accesses that
might happen before the next ARM execution
2022-10-20 13:54:50 +01:00
JetSetIlly bff39bfe3b ACE GPIO refinement 2022-10-20 13:54:50 +01:00
JetSetIlly 310af0352a ACE and ELF mappers reports being in bank 0 rather than bank 'none' 2022-10-16 14:52:45 +01:00
JetSetIlly 16f9c410f7 added CartCoProcNonRelocatable and CartCoProcDWARF interfaces
CartCoProcNonRelocatable is used by ACE so that the developer package
can associate source code with executed addresses correctly

CartCoProcDWARF simplifies the CartCoProc interface and moves the
DWARF() and ELFSection() functions

this completes the work done in e605c018
2022-10-16 14:52:30 +01:00
JetSetIlly 225213881c ACE correctly reflects ARM activity 2022-10-15 15:57:54 +01:00
JetSetIlly 03318ab1c5 coproc developer/disasm features for ACE 2022-10-08 18:42:23 +01:00
JetSetIlly 688ca31ea8 resetting of VCS is no longer automatic on cartridge insert
the reset can be done automatically but as an optional operation. it has
been discovered that in some situations more preparation is required
before the cartridge is reset. particularly, ACE/ELF type cartridges
where the ARM may executed before the coprocessor disasm/developer
packages are initialised and attached
2022-10-08 18:42:23 +01:00