levi - you know, if I just wrote the carts in asm, it'd be 'easier' that way; this interplay of the C compiler to the asm is the problem here; just soooo much crap to look at to trace through where the hell its going
using the LD A, LD MB, A, JP.SIS works too, gets into the right area. But seems like a few thousand opcodes later its going off into space. No time to trace more tonight, have to get some work done (sigh!) .. and got my parts to rebuild the 3d printer so need to work on that sometime (that'll take a few days to rebuild .. ugh.) Still, for _sure_ jumping to the cart is working, just need to nail the code down. (course, its rather always been that way .. I proved long ago I coudl read/write to the cart, before calling the pcb workable; now I've got the cart flashing stuff right in the firmware, it just makes me more determined to get the BIOS->cart jumping actually working nicely .. can't be that much work... doh
... time time time....
liveunderwater -- yeah, precisely; I'm not on top of Z80 or eZ80 assembly as you can see; surely a lot of the code looks relocatable (PIC), but also surely some of it does not; theres probabyl a convention at place where the majority of it is safe, but some specific bits are not and I don't know the convention. Zilog has some really good docs, but also some big holes they rather assume we know
The above is a lot of wildly guessing, as I just don't have much free time right now, so I'm mulling things in the head while sitting on my phone or at lunchbreaks or etc etc, and as you know this is all trial/error stuff where you end up slamming some code in and seeing what happens. Time consuming
I've spent most of the project time working on the hardware and the test cases that go with it; the thread is so long its hard to find stuff; I should add youtube links to the zikzak.ca webpage if they're not there now, so its easy to see some of the video tests and so on. But hey, as a side effect, I've got working ps/2 driver code and so on, which is awesome.
As mentioned, if someone wants to get in at this bare metal stage, I do have some spare parts around, but it'd cost a bit (ie: the parts aren't cheap for some).
But one option is .. I did long ago whip up a simple test pcb for the eZ80 and th STM32 .. ie: those two boards, jumpered together, can act as an old zikzak rev1 or something; but you don't need all that, if you want to just goof around, you could just have the eZ80 board, and an eZ80 mcu, and drop on some mono caps and a couple other passives (crystal, etc), and its 'good to go'; to make it run you'd then have to feed power (use a proper bench power supply, or use an FTDI-basic from ebay for $5 and uts ies 3.3V out and also thus get serial over USB to talk to it.) The trick then is flashing it of course..
Right now, I'm using the official Zilog flashing kit which is a bit of $ (ot a huge amount, but its like $75 or something, I totally forget.) Another option is building your own ZDI tools, which is more a drag than I thought so; but a dude just put up a hjackaday project for it, so its feasible, anyway.
This is one of the reasons I'd like to get carts going better .. makes peoples lives easier; no need to flash the firmware if they don't want to, just live in cart-land. (An easy out of course is just to map the cart to 0x00 and have no "BIOS" at all on the eZ80, but thats much less fun. ie: It makes it hard to burn carts, when you need a cart in place just to fire it up and load the burn software from...)
Hmm, for that matter .. I should dig out some CP/M code again see if _that_ does anything; no C compiler there, its all hand rolled ASM and you can build it with good old OSS "TASM"
I need to customize a lot of the code (ie: it expects floppies, a serial or video display etc), but I was able to bring it up in pure-memory briefly once, just to see it 'run'; but hacking in a faked up storage (to RAM, say), with serial console should be doable, and get some text out. Lemondate Stand and Zork, oh baby
But the end goal is being able to build carts with straight C (or ASM of course, always lots of choices!), since its so much more efficient on time, and easy, to knock out code
jeff
edit: Here is the official tool I use, as its 'ethernet' based (ie: it pluhgs into your network and talks IP); this means runing the ZDS II official toolchain in virtualbox on linux works fine, since it doesn't need to fight with USB or other pften screwed up stuff in VMs.
http://www.digikey.com/product-detail/en/zilog/ZUSBOPTSC01ZACG/269-4664-ND/1236589
[doublepost=1465532365,1465531870][/doublepost]Let me know if any pics are needed, or if anyone wants to see anything in particular, rather than my random blathering on
I go in phases, swinging from one aspect to another as I need to, or as they interest me