Commit graph

127 commits

Author SHA1 Message Date
JetSetIlly 24f3f32342 simplified notifications package
notifications interface instance moved to environment from
cartridgeloader. the cartridgeloader package predates the environment
package and had started to be used inappropriately

simplified how notifications.Notify() is called. in particular the
supercharger fastload starter no longer bundles a function hook. nor is
the cartridge instance sent with the notification
2024-04-06 10:12:55 +01:00
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 6bb531104c implemented UA cartridge mapper 2023-11-26 09:32:20 +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 54e3abd04f cartridge RAM window not available for atari carts unless superchip is present
the decision whether to show cartridge menu is partly made on whether
the cartridge has a "RAM bus" available. atari cartridges (unlike other
cartridge type) always have a RAM bus but only some have a superchip.
the test for whether a cartridge has cartridge RAM has been made more
stringent
2023-10-03 19:24:22 +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 81f4a83490 more flexible yield information 2023-07-17 15:50:07 +01:00
JetSetIlly 63933d4e51 added ACE-UF00 variation of ACE 2023-06-21 08:35:06 +01:00
JetSetIlly 81ce314187 plusrom will fail safely if it can't adopt a child ROM 2023-06-15 19:06:24 +01:00
JetSetIlly 3baafd9282 SCABS bank switching (FE)
used by Activision's Robot Tank and Decathalon

updated method by which ParkerBros is fingerprinted. results are the
same but the code now matches other fingerprint methods
2023-05-25 19:49: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 a0e764d09c corrected CDFJ+ fingerprinting
CDFJ+ fingerprint now accepts any size file so long as the magic string
is present

all CDF variants can be specfied with the -mapping argument or by file
extension (in case fingerprinting does not work)

CDF0
CDF1
CDFJ
CDFJ+

CDF implies CDFJ
2023-03-31 23:02:34 +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 a447a0ccfc implemented 'wickstead design' bankswitching 2023-02-02 14:07:58 +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 7683fe268d generalised undriven databus pins
TIA undriven pins were already implemented but we need to be able to
have undriven pins from the cartridge too (when reading Superchip write
addresses). this is preparatory work for that
2023-01-11 18:06:46 +00:00
JetSetIlly f82a5e7460 simplified implementation of EF mapper
EF is just a 64k standard atari ROM type. the implementation can
therefore be simplified tremendously
2023-01-11 18:06:46 +00:00
JetSetIlly f042b4a3bd generalised changes made in f1a32f2
this allows the handling of any sized cartridge less than 4096 bytes
that is a power of two
2022-12-24 11:38:19 +00:00
JetSetIlly f1a32f2a63 support for 1k atari cartridges
this is a curiosity as much as anything else and added to support this
game https://forums.atariage.com/topic/345290-going-bananas-atari-2600/

reading the description however and it seems likely that this will be
subsumed into a larger cartridge at some point. but still, it was an
easy addition
2022-12-21 21:20:04 +00:00
JetSetIlly 60bea7dfc6 BusStuff and CoProc interfaces were not always plumbed correctly
when plumbing from a different emulation BusStuff and CoProc were not
updated. this was visible in the timeline thumbnailer for ROMs that
relied on bus stuffing for screen rendering from a coprocessor

error introduced in 8497d95f
2022-12-07 10:16:42 +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 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 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 8497d95fb0 extistance of BusStuff and CoProc interfaces decided in cartridge Attach() and Plumb()
BusStuff and CoProc functions are called a lot and type assertions are
moderately expensive and noticeable when done frequently. by making the
assertion in when the cartridge is inserted we can reduce the test to a
simple boolean comparison
2022-10-24 15:46:36 +01:00
JetSetIlly fd5522543b CBS/FA mapper now more accurate with regards to the patent
this does not affect the performance of the original CBS ROMs that used
this mapper. also tested with the Noice demo
2022-10-08 15:37:25 +01:00
JetSetIlly 9a137e71d2 implementation of commavid 2022-10-05 11:32:00 +01:00
JetSetIlly 22b6007e51 simplified instantiaion of DPC+/CDF/ACE 2022-09-27 07:39:54 +01:00
JetSetIlly 0cde9cc7fb added Notifications package
this replaces Event in govern package and in the mapper package.
NotificationHook moved from cartridgeloader package to new package
2022-08-31 14:37:00 +01:00
JetSetIlly 92376586ca CoProcIsActive() replaced with CoProcState()
returns a CoProcState value rather than a boolean value

updated prompt building and debugger reflection overlays to work with
new type and values

commentary introduces the idea that coprocessor state is about VCS
synchronisation

ELF will call ExecutionStart() and ExecutionEnd() as appropriate for the
change of state. this needs work because the meaning of "Execution" in
context of StrongARM type synchronisation is unclear
2022-08-20 21:00:20 +01:00
JetSetIlly 5cddf7a5d9 CartCoProcExecution interface folded into CartCoProc interface
(CartCoProcBus renamed to CartCoProc)
2022-08-20 21:00:20 +01:00
JetSetIlly 62a36683fb preliminary bus stuffing interfaces
interfaces only implemented by the ELF mapped for now. potential for the
older BUS mapper to be supported
2022-07-17 14:05:29 +01:00
JetSetIlly a8c66f7160 corrected accumulation of cycles in callfn package in event of breakpoint
the callfn package previously assumed that all ARM cycles would have
been accounted for (on the VCS side of the ledger) before Start() was
called agin

renamed CartBreakpoints interface to CartCoProcExecution

reflection now used CartCoProcExecution.CoProcIsActive() to determine
when coprocessor is active, rather than the clumsy BankInfo mechanism
2022-06-28 07:26:24 +01:00
JetSetIlly a7ab22c365 reverted changes made in cd5fc1ddec
it didn't improve performance, complicated the code and moreover,
introduced a bug when flipping between immediate and non-immediate mode
2022-06-27 07:42:53 +01:00
JetSetIlly 9a0150b597 debugging loop will halt in the event of a ARM yield and resume as expected
rewind seems to work well with it too so long as we enable/disable
cartridge breakpoints on entering/leaving rewind mode
2022-06-27 07:42:53 +01:00
JetSetIlly cd5fc1ddec cartridges are now attached to the television FrameTrigger system
this means that cartridge types that need that information can implement
the FrameTrigger interface and act accordingly.

this was added for the ACE format so that it can update the ARM
preferences less frequently. this gives a small but significant
performance improvement. it also applies to DPC+ and the CDF formats
although performence improvement is less noticeable in those instances
because such ROMs tend not to call the ARM program that frequently
2022-06-22 09:50:40 +01:00
JetSetIlly 2475f07979 added CartROMDump interface. atari cartridges only for now
implemented CARTRIDGE DUMP command
2022-06-07 08:43:55 +01:00
JetSetIlly 5885c9e776 fixed race condition in instance caused by timeline
thumbnailer was running in a different goroutine to that which the state
being used to generate the thumbnail was create in. there's no way of
making that safe except through mutexes or similar. that's too much
overhead for something as inconsequential as a timeline thumbnailer

timeline thumbnailer now runs in the same goroutine as the main
emulation, bypassing these problems. scheduling of when thumbnailer runs
is now done manually

"Live" TIA Revision values replaced with atomics. small performance
improvement
2022-04-04 21:27:56 +01:00
JetSetIlly fb50253178 added mapper.CartLabelsBus interface. implemented for CDF mapper 2022-02-18 10:57:51 +00:00
JetSetIlly b4763e7581 cartridge.GetBank() correctly report cartrdige state even when
execution is currently outside of cartridge address space. The NonCart
flag is set in addition to the cartridge information

improved how the disassembly window shows coproc/non-cart execution
information, particularly when both conditions are true at the same time
2022-02-05 14:07:15 +00:00
JetSetIlly 720f59c64b nil point dereference in cartridge loading fixed
this would be happen when supercharger failed to load due to a missing BIOS file
2022-01-29 18:39:17 +00:00
JetSetIlly 0fb9a502d3 cartridgeloader Data field is now a pointer to a byte array
this allows cartridgeloader to be passed by value but for the Data field
to be shared
2022-01-28 20:53:51 +00:00
JetSetIlly 3c288adf79 clarified some memory bus concepts
corrected/simplified how supercharger is accessed
2022-01-18 20:33:58 +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 2c7bf893ef added EF cartridge mapper 2022-01-05 11:24:01 +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