The Usotsuki Posted November 12, 2010 Author Share Posted November 12, 2010 I've got "generic terminal code" written that needs only a memory map, screen dimensions, and a means of getting input. (And a beep function). I think it's generic enough to adapt for this. Haven't gotten anything up on the 78 yet , but once I do, it'll all fall into place. Needs about 1K of ROM space and 8 bytes of the zero page. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 10, 2011 Author Share Posted February 10, 2011 Bit of thread necromancy so I don't fog up the 7800 Development thread. http://usotsuki.info/firmware.stripped.a65 This is the "retargettable terminal driver" I wrote for a hypothetical 6502 machine I implemented in emulation. (It works there.) It's not written for a 78 yet. http://usotsuki.info/ataruso.zip This is the raw, 6845-style font I am planning to use. (8x8 monochrome) You can see it in the image I have spammed in both threads. Sample Char: A ($41) Offset: +$0208 80 40 20 10 08 04 02 01 0 0 0 0 0 0 0 0 ........ 0208:00 0 0 0 1 1 0 0 0 ...**... 0209:18 0 0 1 1 1 1 0 0 ..****.. 020A:3C 0 1 1 0 0 1 1 0 .**..**. 020B:66 0 1 1 0 0 1 1 0 .**..**. 020C:66 0 1 1 1 1 1 1 0 .******. 020D:7E 0 1 1 0 0 1 1 0 .**..**. 020E:66 0 0 0 0 0 0 0 0 ........ 020F:00 It's all I got right now and nothing's 7800-specific or even, at this point, 7800-compatible. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 It's all I got right now and nothing's 7800-specific or even, at this point, 7800-compatible. What part of MARIA initialisation are you having problems with? Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 11, 2011 Author Share Posted February 11, 2011 It's all I got right now and nothing's 7800-specific or even, at this point, 7800-compatible. What part of MARIA initialisation are you having problems with? I didn't even get that far... I tried writing just some quick code, but as it didn't "flash the fuji" I couldn't even test whatever I had. (so I'm not sure my signing tools are even working.) I did find this file, which looks like my attempt. (A second .a65 generates the .a78 wrapper because mess insists on it.) charbase = $34 .org $C000 A78adr = * font: .incbin "ataruso.78f" ; each line is 2 DLs and an end-of-zone code, 12 bytes. 25 lines need copied initdl: nmi: irq: rti reset: cld ldx #$FF txs jsr initty hang: jmp hang initty: lda #>font sta charbase rts .res $FF7A-* .res $FFF8-*, 0 ; signature .byte $FF .byte ($07+>A78adr) vnmi: .word nmi vrst: .word reset virq: .word irq A78len = *-A78adr (Keep in mind that I'm on Linux and prefer to use MESS for initial testing because it forces the ROM to run through the BIOS. I'm using CA65.) Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 You won't get a display because you haven't enabled MARIA, locked into 7800 mode, set up the DLL or any DLs. What technical documents are you using as a reference? Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 11, 2011 Author Share Posted February 11, 2011 I have a few txt files, gcc1702b_maria_specs.pdf, MARIA_01.txt, dlltemplate.zip, maria.i65. but even until I get as far as flashing the fuji all of this is moot as nothing will run on metal or in MESS if it doesn't flash the fuji. the two different signing programs I have don't even agree on how to do THAT, they each consider each other's checksums invalid. >_> Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 Change this :- .byte ($07+>A78adr) To this :- .byte ((>reset)&$f0)|07 Sign it and post the binary. I'll check what my tools say. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 11, 2011 Author Share Posted February 11, 2011 Change this :- .byte ($07+>A78adr) To this :- .byte ((>reset)&$f0)|07 Sign it and post the binary. I'll check what my tools say. What the heck, did I break my header generator or something? x.x since MESS just segveed when I tried to load the output. Or maybe I just forgot what the heck I had been doing to build this damn thing before... atarexp.a78 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 Your *.a78 header isn't right. The first byte should be 1 which is the version number of the header. The cart size should be big endian too. What tool are you using to create the header? Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 I forgot to add that you can't write to CHARBASE without enabling MARIA either. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 For comparison here is the A78 header from kenfused's Beef Drop in CC65 :- .segment "A78HEADER" .byte 1 .byte "ATARI7800 " .byte "Beef Drop " .dbyt 0 ;data length high word .dbyt $8000 .if .def(FORCEPOKEY) .dbyt FORCEPOKEY .else .dbyt 1 ;cart type 1=pokey + 2=super cart bs + 4=Super Cart RAM .endif .byte 1 ;controller 1 type 0=none 1=joy 2=gun .byte 1 ;controller 2 type .byte 0 ;0=ntsc 1=pal .res 42 .byte "ACTUAL CART DATA STARTS HERE" Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 11, 2011 Author Share Posted February 11, 2011 .org $2000 ; can be anywhere really .byte 0 .byte "ATARI7800 " ; voodoo bytes .byte "incomplete firmware test ", 0 ; name of rom .word A78len, 0 .byte $00, $00 ; XXX .byte 1, 1 ; joysticks .byte 0 .res $2064-* .byte "ACTUAL CART DATA STARTS HERE" A78adr = $C000 A78beg = * .incbin "atarexp.bin" A78len = *-A78beg ...it's been so long I don't know where I got my mumbojumbo :/ Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 11, 2011 Share Posted February 11, 2011 Without a valid header the emulator will most likely have a hard time with the binary. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 12, 2011 Author Share Posted February 12, 2011 Which is precisely the issue with MESS. Let's see. *segvee* I guess something else isn't right here... *replaces the .res* *tries again* *segvee* *blink* Apple programming is so much easier Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 12, 2011 Share Posted February 12, 2011 How about correcting the problems in your header as the first step then we can move on. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 12, 2011 Author Share Posted February 12, 2011 Having replaced the header bytes with these, it still faults the emulator trying to load it. .org $2000 ; can be anywhere really .byte 1 .byte "ATARI7800 " ; voodoo bytes .byte "incomplete firmware test ", 0 ; name of rom .word A78len, 0 .byte $00, $00 ; XXX .byte 1, 1 ; joysticks .byte 0 ; .res $2064-* .res 42 .byte "ACTUAL CART DATA STARTS HERE" A78adr = $C000 A78beg = * .incbin "atarexp.bin" A78len = *-A78beg I guess I just get frustrated easily and prone to give up but if I *can* get this off the ground (it took 3 attempts and a lot of bungling for me to even get my Apple ][ emulator running and showing the BASIC prompt), I can try to get further on what I really want to do. (I *did* say I was a n00b.) Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 12, 2011 Share Posted February 12, 2011 In your latest A78 header the size of the cart in bytes is in little endian word format and not big endian word format as MESS, ProSystem etc. expect. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 12, 2011 Author Share Posted February 12, 2011 That's the ".word A78len", right? It would have made more sense to me to use little endian since that's what the 6502 is... lol Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 12, 2011 Share Posted February 12, 2011 That's the ".word A78len", right? Correct! It would have made more sense to me to use little endian since that's what the 6502 is... lol Maybe so, but doing it your way isn't adhering to the A78 header specification . Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 13, 2011 Author Share Posted February 13, 2011 Well, that fixes the Fuji flash. It hangs right at the end, which is I presume a sign that the wrapper is correct, but the code isn't (which is as expected). Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 13, 2011 Share Posted February 13, 2011 Post the completed binary and I'll check the signature. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 13, 2011 Author Share Posted February 13, 2011 I thought if the signature was wrong it didn't flash the Fuji, but just locked down into 2600 mode? which means that the program I'm using should be working correctly. (it's called sign7800 and lists a Bruce Tomlin as the author. it runs natively; I prolly compiled it myself.) Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 13, 2011 Share Posted February 13, 2011 The Fuji is displayed to give the player something to look at while the signature is checked. If you want to check that your code has been executed then enable TIA and play a tone. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 13, 2011 Author Share Posted February 13, 2011 Ah. I guess I was given a misconception then. I thought the Fuji was only flashed if the signature matched. This obviously doesn't do anything. Quote Link to comment Share on other sites More sharing options...
The Usotsuki Posted February 13, 2011 Author Share Posted February 13, 2011 The attachment attempt failed, trying again. atarexp.a78 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.