Re: [stella] FE Bankswitching

Subject: Re: [stella] FE Bankswitching
From: Christopher Tumber <christophertumber@xxxxxxxxxx>
Date: Sun, 15 Dec 2002 12:52:01 -0500
Erik wrote:

>Two stack accesses in a row is a combination that usually
>only happens for JSR/RTS in VCS programming, so if this
>happens, you can safely assume that your bankswitching
>logic is supposed to be triggered.

There are at least two other uses I can see for JSR/RTS combination.

The first is to waste 12 cycles.

The second is if you're using dynamic subroutines in RAM and you wind up with an "empty" subroutine - Like say you're putting a subroutine in RAM to draw a scanline, if there's nothing to draw at that time, the routine may just consist of a RTS.

So I don't know if it's really safe to assume JSR/RTS automatically implies bankswitching. (I suppose we could put a moritorium on these kind of uses. That RAM routine could include a NOP before the RTS and we just wouldn't use JSR/RTS to waste cycles (But do any games already use this?) but it'd have to be pretty prominently mentioned somewhere (FAQ?) so someone who starts programming 2 or 5 years from now doesn't go and do this...)


Archives (includes files) at
Unsub & more at

Current Thread