ok so i used my Arduino Mega as a Logic Analyzer, basically it would wait for something from USB, then prints the current state of the RWB pin, Address Bus, and Data bus.
afterwards it would monitor the PHI2 pin of the CPU, and advance the clock until PHI2 goes low and then high again.
that way the program would only print the current state exactly once per bus cycle, regardless of wait states and such.
and acording to the DIY Logic Analyzer... everything works perfectly fine. i can see the CPU reading the Reset Vector, starting at $00FF00, going into native mode, and then jumping to $010000.
so i removed the Arduino's wires and just inserted the 1.8MHz Clock again and it still works fine. i even tried the 40MHz Clock (20MHz CPU speed) and it also works fine.
hmm, either way i wrote a small RAM test program that goes from $020000 to $02FFFF, writes a byte, does a few NOPs, reads it again and then prints either a "." if the value was the same, or an "x" if not. it would also count the total amount of incoreect values and print them in HEX after the program was over. (i tried it at both 1.8 and 40MHz for a few times the total amount of wrong values was always 0 and i never saw any x's in the terminal)
and since the HEX printing function is an actual function entered via JSL and returns with RTL, and it works fine too, it overall confirms to me that RAM is working as it should.
and whatever the issue was, was likely with the logic and i apparently fixed it and then forgot about (because i was procrastinating the whole project a bit)
the only thing i remember changing was swapping the ATF1508 with another one, because i somehow bricked the first as i wasn't able to program it via JTAG anymore, despite me making sure that JTAG is always set to "ON" when using POF2JED. idk, maybe i missed it that one time and it for some reason disabled JTAG, or the CPLD was actually just faulty and about to die anyways (they do get kinda warm over time, maybe a heat sink could extend their life a bit?).
either way, this means the next step is making a Serial Bootloader! so i can finally write programs without having to constantly remove, program, and reinsert the ROM over and over again.
specifically i want to implement the PGZ format from the C256 described here:
https://wiki.c256foenix.com/index.php?t ... inary_fileas that's a format that Calypsi C supports and it's simple enough to handle.
as a later project i also want to create my own PGY format for Position Independent Code (or PIC) as that is one of the things i want to experiment with, another thing being multitasking which works nicely with PIC (i'll probably make a new thread about that over the Programming Section). and then maybe see if i can get the Calypsi C dev to add support for PIC to the C compiler and then make it use the PGY format.