Accessing VIC-IV features from BASIC10 / C65 mode

Es gibt 9 Antworten in diesem Thema, welches 3.028 mal aufgerufen wurde. Der letzte Beitrag (26. September 2020 um 13:42) ist von Snoopy.

  • To access VIC-IV features, one needs to put the values 71 and 83 into the KEY register (53295).

    Those of you who try this from BASIC10 are in for a nasty surprise, because between the first and the second poke, the VIC gets thrown into VIC-II mode and hides all of its extra registers. But since the C65 interrupt depends on those registers being there, a freeze or crash usually follows.

    Here's a little routine that you can use to switch to VIC-IV mode without crashing the system:

    Code
     10 bank128:restore
     20 for i=0 to 12:read a$:poke dec("1600")+i,dec(a$):next i
     30 data 78,a2,47,a0,53,8e,2f,d0,8c,2f,d0,58,60
     40 sysdec("1600")

    Once there, you can use BASIC10 to play around with some of the VIC-IV's advanced features, like the sprite bitplane mode:

    Bitte melde dich an, um diesen Anhang zu sehen.

    Have fun :)

  • The demo works perfect with the Xemu emulator:

    hm, not quite 100% perfect... ;) on the real machine, the sprites are in bitplane mode, i.e., each sprite sets its corresponding colour bit (sprite 0 = bit 0, sprite 1 = bit 1, and so on), so the effect is that the sprites are changing the colour of the colour bars in the background.

    Einmal editiert, zuletzt von ubik (25. September 2020 um 09:53)

  • Maybe it would be a good idea to patch the C65 ROM, so that it would always unlock VIC-IV, not just VIC-III?

  • Probably patching would be easy (only two bytes should be changed). However, once you do so, then it can't be called a "C65 Kernal" any more (since it will stop working on C65).

  • The demo works perfect with the Xemu emulator:

    hm, not quite 100% perfect... ;) on the real machine, the sprites are in bitplane mode, i.e., each sprite sets its corresponding colour bit (sprite 0 = bit 0, sprite 1 = bit 1, and so on), so the effect is that the sprites are changing the colour of the colour bars in the background.

    I have tested your sprite demo on the Nexys board. Here it works as you described:

    Bitte melde dich an, um diesen Anhang zu sehen.

    Bitte melde dich an, um diesen Anhang zu sehen.

    A curious thing is, that it also works with line 90-110 being deleted (without init VIC-IV and no pokes).

    Bitte melde dich an, um diesen Anhang zu sehen.

    It seems that these lines aren't needed on the MEGA65 (Nexys board) for showing your sprite effect? :gruebel

  • It seems that these lines aren't needed on the MEGA65 (Nexys board) for showing your sprite effect?

    I think the control bits survive RUN/STOP+RESTORE, since the C65 doesn't know anything about sprite bitplane mode. So once you've run the program, the sprites will be in bitplane mode until the next hard reset (or the control bits are being reset manually...)

  • It seems that these lines aren't needed on the MEGA65 (Nexys board) for showing your sprite effect?

    I think the control bits survive RUN/STOP+RESTORE, since the C65 doesn't know anything about sprite bitplane mode. So once you've run the program, the sprites will be in bitplane mode until the next hard reset (or the control bits are being reset manually...)

    It also works without line 90-110 even after a complete power off and power on again.

    It seems that the MEGA65 starts with activated VIC-IV? :gruebel

  • hmmm... now that's strange ?( ...

    this is how it looks on my (r2 preseries) board, after power on and deleting 90-110 before running the program:

    Bitte melde dich an, um diesen Anhang zu sehen.

    ...and this is after taking 90-110 back in:

    Bitte melde dich an, um diesen Anhang zu sehen.

    (using bitstream from 138-hdmi-audio-27-mhz, 20200917.07 branch)

    Maybe you're running a different bitstream? On my board, vic-iv is definitely not enabled in c65 mode...

  • hmmm... now that's strange ?( ...

    I have tested it again on the Nexys board ... and have to say: "Sorry!" :whistling:

    Now it behaves as you described in your post above.

    Maybe I recognize wrong and I only made a reset and the settings for VIC-IV were stored from the first running,