Open mlund opened 1 year ago
To the last point, the following parts of core and utilities do enable mega65_io:
So I gather we are save on that side.
As you have added versions, this is a good change as it reduces repetition, which makes the program slower, so if someone forgot to enable MEGA65 IO at the start of the program, they can fix it after reading the release notes.
Additrional idea: If we add a real startup for MEGA65 C programs to the various compilers, then the startup should do that and the user does not need to remember, right?
Is this habit still the case? https://github.com/MEGA65/mega65-libc/blob/0f7bdab33b0cd59c62d3a6d547e73c05ffd20535/src/fcio.c#L557
good question, lets ask @dansanderson
The Compendium warns that DOS operations reset the KEY register. I don't see where this happens in code. (Get_DOS
doesn't seem to have anything relevant.) I'm still pretty new to the DOS code.
There are only a few direct references to vic+47
(and none to d024) and they're in respectable places (ioinit
, c64beg
, reset
). I gather that any write to d024 that isn't an enable knock will disable, so maybe there are indirect references. The only place I know that resets all VIC registers is the one in ioinit
.
I have tried and failed to set a watchpoint on a VIC register, so I don't know if there's an easy way to interrogate this. Ideas welcome. Let me know how else i can help.
To ensure that MEGA65 expanded features are availbel,![image](https://github.com/MEGA65/mega65-libc/assets/3248398/278bca6f-b051-4f78-9ab3-d8d824e4fbc8)
mega65_io_enable()
is called from many functions, for examplememory.c::do_dma()
and multiple places infcio.c
, see e.g. the call graph produces by Doxygen: