ZackAttack Posted January 7 Author Share Posted January 7 47 minutes ago, Dionoid said: I'm trying to wrap by head around how this bus-stuffing error correction is implemented. It sounds like first you do some error detection to figure out which bits have an issue with being stuffed. Then you provide values for A, X and Y which cover the bits which won't be overridden by the ARM. The SAX instruction will put A & X on the bus, so that covers the case where you want to send 0's for the non-stuffed bits, right? And then Y will probably contain 1's for these non-stuffed bits. Now depending on the value you want the ARM to put on the bus, you will give the 6502 the STA, STX, STY or SAX instruction, right? And will the bus-stuffing error detection and correction make the 6502 load the correct values into A, X and Y automatically at the start? And does it mean that you can't use these registers in 6502 code logic anymore and everything should be bus-stuffed? Or is bus-stuffing only active during the display kernel? Using STA, STX, STY, and SAX to limit stuffing to 6 bits is a main part of it. I think @batari was who suggested it. It also tests stuffing low over high and vice versa because we found that some bits on some systems only work one way or the other. Bus-stuffing is implemented in the latest UCA firmware. You can review the vcsInitBusStuffing() function in United-Carts-of-Atari/vcsLib.c at main · Al-Nafuur/United-Carts-of-Atari (github.com) to see exactly how it works. You are correct that A, X, and Y must be a certain value when using the vcsWrite() function. This is accomplished by calling vcsLda2(), vcsLdx2(), and vcsLdy2() respectively. I'll try to post an example project to demonstrate the use of these functions soon. Really, this whole topic should be updated soon since the introduction of the elf format with UCA firmware v2.3.14 makes it possible to use GCC directly. It's much easier to build now and no longer requires the use of the STM IDE. In the meantime, there are a few projects to reference in United-Carts-of-Atari/source/ElfTests at main · Al-Nafuur/United-Carts-of-Atari (github.com) Just have arm-none-eabi version of GCC and run make to build. You will need an Uno or Plus cart with Unified firmware 2.3.14 or higher, or Gopher2600 built from the latest source to run the resulting binaries. 1 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.