Jump to content

Photo

Ideas n00b me has been thinking of...


50 replies to this topic

#26 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Thu Nov 11, 2010 11:07 PM

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.

#27 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Thu Feb 10, 2011 2:00 PM

Bit of thread necromancy so I don't fog up the 7800 Development thread.

http://usotsuki.info...re.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.

#28 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Thu Feb 10, 2011 7:10 PM

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?

#29 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Thu Feb 10, 2011 9:39 PM

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.)

#30 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 4:27 AM

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?

#31 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Fri Feb 11, 2011 9:10 AM

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. >_>

#32 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 9:19 AM

Change this :-

          .byte     ($07+>A78adr)


To this :-

           .byte ((>reset)&$f0)|07

Sign it and post the binary. I'll check what my tools say.

#33 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Fri Feb 11, 2011 10:38 AM

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... :(

Attached Files



#34 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 10:50 AM

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?

#35 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 11:04 AM

I forgot to add that you can't write to CHARBASE without enabling MARIA either.

#36 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 11:17 AM

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"


#37 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Fri Feb 11, 2011 1:22 PM

.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 :/

#38 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Fri Feb 11, 2011 1:26 PM

Without a valid header the emulator will most likely have a hard time with the binary.

#39 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Fri Feb 11, 2011 11:18 PM

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 :(

#40 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Sat Feb 12, 2011 4:20 AM

How about correcting the problems in your header as the first step then we can move on.

#41 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sat Feb 12, 2011 9:30 AM

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.)

#42 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Sat Feb 12, 2011 9:40 AM

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.

#43 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sat Feb 12, 2011 12:43 PM

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

#44 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Sat Feb 12, 2011 12:46 PM

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 ;).

#45 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sat Feb 12, 2011 10:45 PM

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).

#46 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Sun Feb 13, 2011 4:19 AM

Post the completed binary and I'll check the signature.

#47 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sun Feb 13, 2011 8:47 AM

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.)

#48 GroovyBee OFFLINE  

GroovyBee

    Games Developer

  • 7,821 posts
  • Busy bee!
  • Location:North, England

Posted Sun Feb 13, 2011 8:58 AM

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.

#49 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sun Feb 13, 2011 10:16 AM

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.

#50 The Usotsuki OFFLINE  

The Usotsuki

    Stargunner

  • Topic Starter
  • 1,132 posts
  • Also called "Licca"

Posted Sun Feb 13, 2011 10:17 AM

The attachment attempt failed, trying again.

Attached Files






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users