7800-devtools / 7800basic

a BASIC-like language for creating games that run on the Atari 7800 console.
Other
23 stars 3 forks source link

Incbanner from later bank (Limitation) #4

Closed chunkypixel closed 1 year ago

chunkypixel commented 3 years ago

Attempting to incbanner an image from Bank 8 (in this case the shared bank -128kRAM) and show it in Bank 2 displays the following compile error: *** (22): ERROR, plotbanner didn't find a banner height for xxxx

From RevEng Yeah, it's a known limitation, for now. 7800basic only knows about graphics it's already encountered the incgraphic/incbanner for, and due to it's interface with dasm. It can't defer rom generation until it knows the info, nor can it backtrack later. I'll probably need to come up with a new command that pulls in the required info from the png without actually importing the graphic.

Example incbanner.zip

msaarna commented 1 year ago

I've converted 7800basic to a two-pass compile, where banner and tallsprite info is picked up in the first pass, and applied in the second. The linked example now compiles and displays the banner.

chunkypixel commented 1 year ago

Tested as working in v0.31. Thanks Mike