Am Freitag, 31. Januar 2025, 17:10:09 Mitteleuropäische Normalzeit schrieb
Boris Steinmetz:
> I have a question which I need a little bit support with.
> I have VICE running on a Raspberry Pi 5 (Raspbian OS). Now I'm looking for
> a way to control 8 GPIOs from the Raspberry Pi from within the VICE
> emulated C64. On these GPIOs I have hooked up some LEDs. This works fine,
> but since I'm not a professional software developer I'm not sure if my
> approach is really good. Maybe you have a better proposal.
>
> On the Raspbian side, with the GNU debugger (gdb) and some Python scripts,
> I was able to find the memory addresses used in the Raspbian OS for the
> VICE C64 memory location $C000 - $C007 and also the memory range used for
> the C64 screen memory.
> But for some reason I can't find the memory locations $DD00 and upwards
> which is to control the CIA2 for the user port. I did same way as I did to
> look up $0400 and $C000 by putting a pattern of some values in it which I
> was then looking for with a python script. As mentioned, it did work fine
> for $0400 and $C000 but not for $DD00 and upwards.
>
> Do you know how I can find this memory locations or do have a better
> proposal for me to emulate the userport on my raspberry pi from within VICE?
>
> Thanks a lot for a helpful advice!!
> Have a nice day.
First of all - use a recent VICE release (the last one, 3.9)
now look at src/userport/userport_io_sim.c
at the top uncomment #define HOST_HARDWARE_IO
then scroll down to "userport_io_hw_store_pbx" (and following) functions,
there you can add the gpio handling code
--
http://hitmen.eu http://rr.pokefinder.org
http://vice-emu.sourceforge.net http://magicdisk.untergrund.net
Every program has at least one bug and can be shortened by at least one
instruction --- from which, by induction, one can deduce that every program
can be reduced to one instruction which doesn't work.
|