Jump to content



1

Problem making "A-VCS-tec Challenge" boards


9 replies to this topic

#1 Simon OFFLINE  

Simon

    Moonsweeper

  • 374 posts
  • Location:Germany

Posted Mon Feb 6, 2006 1:57 AM

Hello,

this is a technical question to all homebrew developers with experience in bankswitched carts (Thomas, Andrew, Manuel, Eckhard, etc.)...

The facts:
- The .bin files of the PAL and NTSC versions run perfectly in z26.
- The .bin files run perfectly with Cuttle Cart on VCS/2600jr (Test Manuel).
- The .bin files run perfectly with Cuttle Cart 2 on 7800 (Test Walter Lauer).
- The created boards run perfectly on 7800.

BUT:
- The created boards only start rarely on VCS/2600jr. If it starts, it runs without any problems. But for some reason it only starts very rarely.

:?: Does somebody know what the reason for this problem may be? How do 7800 and VCS/2600jr vary in starting a cartridge?

The game is 8 kb and using bankswitching. The startvectors in both banks were checked again.

Thanks,
Simon

#2 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,237 posts
  • begin 644 contest

Posted Mon Feb 6, 2006 3:03 AM

Simon, on Mon Feb 6, 2006 2:57 AM, said:

How do 7800 and VCS/2600jr vary in starting a cartridge?

View Post

'course, this may not help, but I know that the 7800 (and I think the Cuttle Cart) starts up with RAM in a known state. I think it also starts with stack pointer, registers and certain flags known. The 2600 is not reliable as to its startup state (except if you have a CC.)

#3 Eckhard Stolberg OFFLINE  

Eckhard Stolberg

    Dragonstomper

  • 882 posts
  • Location:Germany

Posted Mon Feb 6, 2006 8:49 AM

Simon, on Mon Feb 6, 2006 8:57 AM, said:

:?: Does somebody know what the reason for this problem may be? How do 7800 and VCS/2600jr vary in starting a cartridge?

View Post

The 2600 starts the game right away while the 7800 first goes through it's BIOS. So maybe your cartridge is a little too slow with setting the initial bank? Then the startup vector might get read incorrectly on the 2600.

Also I think vdub_bobby had some strange problems with Reindeer Rescue when using CMOS EPROMs for the cartridge. They might be caused by using write instructions for triggering the bankswitching hotspots. Do you use CMOS EPROMs, and/or do you trigger the hotspots with STA instructions?

And did you verify that the game really does start from both banks? The Cuttle Cart and z26 allow you to chose the starting bank for F8-bankswitching games.

BTW, did you try your cartridge on more than one VCS?


Ciao, Eckhard Stolberg

#4 Kroko OFFLINE  

Kroko

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Mon Feb 6, 2006 11:25 AM

Post the binary, then I can try it on the Krokodile. Are you using CLEAN START ? I would like to have a look at the startup vectors and the startup code for both banks.

#5 Simon OFFLINE  

Simon

    Moonsweeper

  • 374 posts
  • Location:Germany

Posted Tue Feb 7, 2006 3:04 AM

Hello,

Eckhard Stolberg, on Mon Feb 6, 2006 2:49 PM, said:

The 2600 starts the game right away while the 7800 first goes through it's BIOS. So maybe your cartridge is a little too slow with setting the initial bank? Then the startup vector might get read incorrectly on the 2600.

And did you verify that the game really does start from both banks? The Cuttle Cart and z26 allow you to chose the starting bank for F8-bankswitching games.
Hmm. The startup-vectors navigate instantly into the right bank.

Here are the vectors at the ends of the banks. The program has to start in bank 2 (intro sequence). After the intro the game itself is in bank 1.

BANK 1:

;---------------------------------------------------------------------------
; Start in BANK2!
;---------------------------------------------------------------------------
org $1FF0

Restart LDA BANK2 ; lands at 2FF3 in Bank 2 (Introstart)

org $1FFA ; Program startup vector
.word Restart
.word Restart
.word Restart

include bank2.asm

;<End of bank 1>



BANK 2:

;--------------------------------------------------------------------------
; Start in this BANK (Intro)!
;--------------------------------------------------------------------------
org $2FF3
rorg $1FF3

jmp MitEGcl ;(Introstart in this bank)

org $2FFA ; Program startup vector
rorg $1FFA ; Program startup vector
.word MitEGcl ;Introstart
.word MitEGcl
.word MitEGcl

;<End of bank 2>

Eckhard Stolberg, on Mon Feb 6, 2006 2:49 PM, said:

Also I think vdub_bobby had some strange problems with Reindeer Rescue when using CMOS EPROMs for the cartridge. They might be caused by using write instructions for triggering the bankswitching hotspots. Do you use CMOS EPROMs, and/or do you trigger the hotspots with STA instructions?
I don't know about the chips. The test boards were made by AtariAge, Packrat and a local friend of mine. All have got the same problem with VCS/2600jr.

The bankswitch is performed with LDA/LDX BANK1/BANK2.
BANK1 equ $1FF8
BANK2 equ $1FF9

Eckhard Stolberg, on Mon Feb 6, 2006 2:49 PM, said:

BTW, did you try your cartridge on more than one VCS?
Yes. Neither of my VCS or 2600jr starts the carts on every try. BTW: a test on a "Gemini" clone system lets the cart start always...

Later,
Simon

#6 batari OFFLINE  

batari

    )66]U('=I;B$*

  • 6,237 posts
  • begin 644 contest

Posted Tue Feb 7, 2006 5:44 AM

Simon, on Tue Feb 7, 2006 4:04 AM, said:

    org $1FF0 

Restart LDA BANK2  ; lands at 2FF3 in Bank 2 (Introstart)

View Post

The problem could be that you have the instruction at $1FF0. Having it so close means fewer address lines change. It may take less time for fewer address lines to change. Maybe this causes the hotspot to be detected too soon, and then when it tries to latch the value of A0, it hasn't changed yet. Could also explain why it works fine if it does work.

Possible fixes, if this is the problem:

- Ensure that you don't need to wait for A0 to change, so bump up a byte: change to ORG $1FF1/ORG $2FF4

- Force more address lines to change by moving the LDA BANK2/JMP MitEGcl somewhere else, like at the beginning of the banks ($1000)

This is wild speculation, but worth a try nonetheless.

#7 Kroko OFFLINE  

Kroko

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Tue Feb 7, 2006 12:35 PM

Kroko, on Mon Feb 6, 2006 7:25 PM, said:

Post the binary, then I can try it on the Krokodile. Are you using CLEAN START ?


#8 Eckhard Stolberg OFFLINE  

Eckhard Stolberg

    Dragonstomper

  • 882 posts
  • Location:Germany

Posted Tue Feb 7, 2006 4:19 PM

Simon, on Tue Feb 7, 2006 10:04 AM, said:

I don't know about the chips. The test boards were made by AtariAge, Packrat and a local friend of mine. All have got the same problem with VCS/2600jr.
Did they all use the same board type from PixelsPast, or did someone use his own design? And did they all have problems with the cartridges on their systems too, or do the games only fail on your consoles?

Simon, on Tue Feb 7, 2006 10:04 AM, said:

Yes. Neither of my VCS or 2600jr starts the carts on every try. BTW: a test on a "Gemini" clone system lets the cart start always...
Very strange. Did you try different power supplies with your VCSs, or did you always use the same? And what exactly happens when the game doesn't "start"?


Ciao, Eckhard Stolberg

#9 Simon OFFLINE  

Simon

    Moonsweeper

  • 374 posts
  • Location:Germany

Posted Tue Mar 7, 2006 3:02 AM

Hello,

last week I finally found the time to check the coding once again. I found the bug and a friend of mine burned eproms for testing. I got the pal eprom yesterday and it finally works every time I start the VCS.

I'll test the ntsc cart today.

Reason was a small routine that I included very late. Somehow I inserted the routine with a JSR-call before the original cart-initialization routine is performed. I must have been confused or drunk to put the jsr there. Probably both. :)

MitEGcl LDA #$00
JSR subroutine

Start SEI
CLD
LDX #$FF
TXS
LDA #$00
LDX #$CB
Loesch STA $0,X
DEX
BNE Loesch
...

The VCS starts up with random condition in ram, while z26, 7800 and the CuttleCarts seem to start clearly initialized. Therefore the problem only occured when turning the VCS off and on again. Switching the VCS on for the first time always started the game without problems.

Thanks,
Simon

#10 vdub_bobby OFFLINE  

vdub_bobby

    Quadrunner

  • 5,831 posts
  • Boom bam.
  • Location:Seattle, WA

Posted Tue Mar 7, 2006 12:19 PM

Glad you found the bug! :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users