Jump to content
Mr SQL

Virtual ADAM high speed indexed Tape-Drive Computer Peripheral

Recommended Posts

 

 

Virtual ADAM high speed indexed Tape-Drive Computer Peripheral

 

The PlusCart and UnoCart support 256 SuperCharger loads in a 1.5 MB file with an index on it, like the ADAM high speed Tape drive.

 

The SuperCharger BASIC load command I am working on will make it easy for programs in a multiload to run one another and share data. 

 

This thread is also for SuperCharger Assembly development, which has the same low level functionality I am adding to SuperCharger BASIC.  

 

 

What data will be shareable to BASIC?

 

All 30 tiny basic variables will be shareable between programs because they live in low RAM (RIOT).
The second direct uncompressed screen buffer (60 bytes) will also be shareable and can be reused to pass data because it is also RIOT RAM.


 

Data structures that are NOT shareable:

 

SuperCharger BASIC allows unlimited RAM arrays to be declared and has built in RAM arrays (sprite buffers, color arrays and the virtual world binary array) in common with Flashback BASIC. These cannot be shared because they are overwritten whenever a new SuperCharger program is loaded.  

The ADAM Indexed Tape Drive Computer Peripheral is only compatible with the SuperCharger and SuperCharger BASIC. Here's a description of the physical implementation of this awesome peripheral from the 80's: https://www.nytimes.com/1983/09/07/business/coleco-s-new-memory-device.html

 

 

Examples of new types of games (for the Atari 2600) the virtual ADAM Drive makes possible:

 

This could enable large "choose your own adventure" Dragons Lair style graphics adventure games in a 1.5 MB SuperCharger ROM!  

 

Games with a sprawling indexed hierarchy could also be created - I had a tough time fitting The Astro Fortune Teller on a 160K disk in the 80's under Microsoft Disk Extended Color BASIC. This kind of game would be easy to implement in SuperCharger BASIC using the virtual ADAM Drive peripheral.

 

 

Other possible testing uses of SuperCharger BASIC and Flashback BASIC:

 

SuperCharger BASIC and Flashback BASIC can cross-compile games using different memory schemes, one uses the SuperCharger format [obviously] and the other users CBS RAM, the 256 byte RAM chip that is double the superchip in capacity.

 

There are some differences emulating CBS RAM across emulators and flash carts that are very interesting, playing Arkanoid Airhead you will see the game change from black to white on the Flashback Portable and then to Rainbow colored on the Retron77 which is fun because it's three different flavors for the same ROM and there was a really cool Arkanoid fat binary that would transform like that bitd for the Color Computer written by Steve Bjork but it contained two codebases. In this case the glitch creates the three game variations.

 

Most testers probably have all of these Atari systems and flashcarts so here is that interesting ROM to check out and the BASIC listing which is no different than the SuperCharger version, I simply ran it through the "CBS  RAM" compiler (Flashback BASIC) to create the different binaries.

 

"Quick mode" is useful for QA testing in BASIC:

 

Both BASIC's support a "quick mode" more like classic BASIC from the 80's where you can do tests with just a few lines of BASIC code, 10 Line BLITZ is an example of a functional game written in classic BASIC without the ASCII art Designers and chiptunes. The mode also allows the Atari 2600 to compete with the 800, Sinclair, Apple and C64 in vintage BASIC contests! 

 

This enhancement will be a lot of fun to work on and I will share builds and info here, please share any ideas or inspiration !!! :) 

 

IDE present on Windows

 

If you have Windows, the BASIC compilers repurpose the Powershell ISE as a simple IDE with a play button to compile and launch immediately Stella.

The compilers should work on Linux if you install any version of powershell or the clone but need to be run from the command line against a BASIC text file (no IDE).

 

ARKANOID_AIRHEAD_FLASHBACK_EMU_ANOMALY_20200627.bin ARKANOID_AIRHEAD.bin ARKANOID_AIRHEAD_FINDS_AIRHEAD_20200627.txt

  • Like 1

Share this post


Link to post
Share on other sites

 

Made some progress adding the load command to SuperCharger BASIC, and found a discrepancy between Stella and UnoCart to share.

 

Note: I have not tested this on PlusCart yet and we are finding some issues which may only be specific to the UnoCart so please post if there is different behavior as well as any ideas on errors I may have in the source (maybe missing headers or RAM autostart code?)

 

Here is a screenshot of the Alpha using just asm pasted into the BASIC (SuperCharger BASIC allows asm to be mixed in in quotes):

Multiload_alpha1.thumb.JPG.329870bbdb94dafb9bcd63644de44f95.JPG

 

And here is the file:

Program.bin

 

ARKANOID airhead starts it out and when the button is pressed after catching the Laser power-up it will load one of the ROM's in the multiload, #2 is passed to select load #2.

 

Issues so far are that on the UnoCart it is loading the concatenated ROM's in reverse - it starts with ROM #2 (0,1,2 so LIFO order) and in Stella it starts FIFO order.

 

 

This is what I used to concatenate them from the shell, the program in the IDE in the screenshot always gets compiled as "program.bin" so I stacked two more supercharger binaries onto it from the CMD shell:

 

c:\vwBASIC>copy /b program.bin+kcII_ntsc.bin+zeropage_low128_explorer.bin
Program.bin
KCII_NTSC.bin
ZeroPage_low128_explorer.bin
        1 file(s) copied.

 

to create a 25K 3 file SuperCharger multiload.

 

I created another 33k 4 file concatenation adding ARKANOID to the beginning and the end as well, and then Arkanoid started in UnoCart from the end, but it reloads itself instead of another of the SuperCharger files in the multiload once the laser powerup is caught and the button pressed:

 

program2.bin

 

I wanted this to be the first ROM to test the loading, possibly I am also missing something in the code? appreciate any ideas or feedback! :)

 

ARKANOID_AIRHEAD_FINDS_AIRHEAD_LOADER_TEST.txt

Edited by Mr SQL
added source
  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Mr SQL said:

I wanted this to be the first ROM to test the loading, possibly I am also missing something in the code? appreciate any ideas or feedback! 

Have you checked the multiload_ids  in the LoadHeader when you concatenated the files? They should be unique in the resulting ROM..

 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Al_Nafuur said:

Have you checked the multiload_ids  in the LoadHeader when you concatenated the files? They should be unique in the resulting ROM..

 

Thanks, I didn't have any header information in the files! 

 

I've added 8 byte headers but the multifile crashes in Stella now -

 

I used this reference on the 8 byte headers:

https://www.prismnet.com/~nickb/atari/doc/sctech.txt

 

And wrote this simple PowerShell script to create them in binary format, they are 8 bytes but I think I likely got the checksum wrong, not sure how it should sum to $55

 

Here is what I plugged into the script to create the headers and the multifile output.

Also attached the asm for the first load that is just crashing within the multiload so far, not sure why.

#create 8 byte binary SuperCharger header with checksum, assume start is $1000, BS is 3/1 (starting bank) 
 $myblock2 = @(0)*8 #declare 8 element byte array

 $myblock2[0]=[char]0 #hex 0= decimal 0
 $myblock2[1]=[char]16# hex 18 = decimal 24   #hex 10 = decimal 16
 $myblock2[2]=[char]5 # initial banking starts with 3/1 like CMFS  "... ;started at %00001001 ; bank 3 and 1"
 $myblock2[3]=[char]24 #24 256 byte blocks= 6K
 $myblock2[4]=[char]47 #checksum ??? not sure if correct to sum these? Not summing to $55....
 $myblock2[5]=[char]0 #multiload 0, 1st unique  value
 $MYBLOCK2[6]=[char]2#224 hex hi
 $myblock2[7]=[char]36#224 hex low

 [io.file]::WriteAllBytes('c:\vwbasic\Header1.bin',$myblock2)

#generate 2nd header file:
 $myblock2[5]=[char]1 #multiload 1, unique  value
 [io.file]::WriteAllBytes('c:\vwbasic\Header2',$myblock2)

 #gen 3rd header:
 $myblock2[5]=[char]2 #multiload 2  unique  value
 [io.file]::WriteAllBytes('c:\vwbasic\Header3',$myblock2)

#concatenate them:
echo c:\vwbasic\multifile.bat
C:\vwBASIC>copy /b header1.bin+program.bin+header2+kcII_ntsc.bin+header3+zeropage_low128_explorer.bin 

c:\vwbasic\multifile.bat

ls header1.bin
    Directory: C:\vwBASIC

Mode                 LastWriteTime         Length Name                         
----                 -------------         ------ ----                         
-a----         8/28/2020   5:15 PM          25368 header1.bin  

 

 

 

Program.asm header1.bin

Share this post


Link to post
Share on other sites

The only byte(s) of the header the UnoCart or PlusCart are using is(are) the multiload_id(s).

 

I tried to load your header1.bin file with the PlusCart, but it says "Unknow/Invalid" ROM so the detection has failed.
most probably because the file size is not a multiple of 8448 bytes. There are 24 bytes too many in your ROM

Edited by Al_Nafuur

Share this post


Link to post
Share on other sites
55 minutes ago, Al_Nafuur said:

The only byte(s) of the header the UnoCart or PlusCart are using is(are) the multiload_id(s).

 

I tried to load your header1.bin file with the PlusCart, but it says "Unknow/Invalid" ROM so the detection has failed.
most probably because the file size is not a multiple of 8448 bytes. There are 24 bytes too many in your ROM

Thanks, I didn't realize the header was already present at the bottom of the asm template, it's really a footer -

 

I have a ROM example now with a header "footer" that has the multiload ID of 0, and a second game with an ID of 1, but it freezes or reloads when I transfer to it:

;-----------------------------------------------
;-----------------------------------End Bank III
;-----------------------------------------------


    ; Supercharger Header (8448 Bin Format)
    SEG    HEADER
    ORG    $3000,0
      ;  rorg    $1800
    ; Start Address
    DC.W    Start
    ; Bank Select Configuration
    ; Bits 7-5 Write Pulse Delay    
    ; Bits 4-2 Bank Config    
    ;    000    3    ROM
    ;    001    1    ROM
        ;       010     3       1    
    ;    011    1    3
    ;    100    3    ROM
    ;    101    2    ROM
    ;    110    3    2
    ;    111    2    3
    ; Bit 1 Write Enable (1=enable)
    ; Bit 0 ROM power (1=on)
        DC.B  %00001001  ;  %00001010       ; Bank 3+1
    ; Page Count, Checksum, and Multi-Load Index
    DC.B    $18, $00, 1
    ; Progress Indicator (6K) 
    DC.W    $0224

    ; Bank Offsets
    ORG    ($3010),0
    DC.B    $00,$04,$08,$0C,$10,$14,$18,$1C        ; Bank 1 
    DC.B    $01,$05,$09,$0D,$11,$15,$19,$1D        ; Bank 2 
    DC.B    $02,$06,$0A,$0E,$12,$16,$1A,$1E        ; Bank 3 

        ; Bank Checksums
    ORG    ($3030),0
    DC.B    $00,$00,$00,$00,$00,$00,$00,$00        ; Bank 1 
    DC.B    $00,$00,$00,$00,$00,$00,$00,$00        ; Bank 2 
    DC.B    $00,$00,$00,$00,$00,$00,$00,$00        ; Bank 3 

    ; Padding To 8448 Bytes
    DS.B    184,0
 

I didn't change the checksum, just the multiload index from 0 to 1. 

 

If I load the multiload in Stella the first load ARKANOID starts and when the laser powerup is used it crashes. On the Uno it will reload the 1st load instead of loading the second. 

 

Multifile.bin

 

  

Share this post


Link to post
Share on other sites

Found a SuperCharger header analyzer  @alex_79 created and it appears the header information is correct and that the checksums can be off and are ignored.

 

Everything looks good in this file, it seems to not be passing the load number correctly though - it crashes on Harmony and Stella instead of grabbing the next load and Uno reloads multiload 0 instead of load 1.  I thought LDA #1 and STA $FA before the loading routine would pass the argument.

 

Here's the output from the analyzer and the latest test file:

 

FILE: ..\AMtest4.bin [LOAD 1]


GAME HEADER (2000-2007):

00    START ADDRESS LOW BYTE        ---> 1000
10    START ADDRESS HIGH BYTE
09    RAM CONFIG BYTE
     - Write pulse delay = 0
     - Bank scheme:    VCS(x000-x7ff) -> RAM3(000-7ff)
            VCS(x800-xfff) -> RAM1(000-7ff)
     - Write disabled
     - ROM power off
18    NUMBER OF PAGES TO LOAD (24 pages, 6144 bytes)
00!(fffffffe) GAME HEADER CHECKSUM
00    MULTILOAD INDEX NUMBER
24    PROGRESS COUNTER LOW BYTE    ---> 0224
02    PROGRESS COUNTER HIGH BYTE


PAGE NUMBER TABLE (2010-2027) - PAGE CHECKSUM TABLE (2040-2057):

PAGE    CHECKSUM    MEMORY MAP
            rom image -> supercharger
00    00!(cc)        0000-00ff -> RAM1(000-0ff)
04    00!(de)        0100-01ff -> RAM1(100-1ff)
08    00!(c6)        0200-02ff -> RAM1(200-2ff)
0c    00!(cc)        0300-03ff -> RAM1(300-3ff)
10    00!(9a)        0400-04ff -> RAM1(400-4ff)
14    00!(b5)        0500-05ff -> RAM1(500-5ff)
18    00!(1b)        0600-06ff -> RAM1(600-6ff)
1c    00!(ee)        0700-07ff -> RAM1(700-7ff)
01    00!(a5)        0800-08ff -> RAM2(000-0ff)
05    00!(97)        0900-09ff -> RAM2(100-1ff)
09    00!(7a)        0a00-0aff -> RAM2(200-2ff)
0d    00!(ec)        0b00-0bff -> RAM2(300-3ff)
11    00!(15)        0c00-0cff -> RAM2(400-4ff)
15    00!(dd)        0d00-0dff -> RAM2(500-5ff)
19    00!(72)        0e00-0eff -> RAM2(600-6ff)
1d    00!(38)        0f00-0fff -> RAM2(700-7ff)
02    00!(1d)        1000-10ff -> RAM3(000-0ff)
06    00!(64)        1100-11ff -> RAM3(100-1ff)
0a    00!(b3)        1200-12ff -> RAM3(200-2ff)
0e    00!(a3)        1300-13ff -> RAM3(300-3ff)
12    00!(43)        1400-14ff -> RAM3(400-4ff)
16    00!(2e)        1500-15ff -> RAM3(500-5ff)
1a    00!(ac)        1600-16ff -> RAM3(600-6ff)
1e    00!(37)        1700-17ff -> RAM3(700-7ff)

--------------------------------------------------------------------------------

FILE: ..\AMtest4.bin [LOAD 2]


GAME HEADER (2000-2007):

00    START ADDRESS LOW BYTE        ---> 1000
10    START ADDRESS HIGH BYTE
09    RAM CONFIG BYTE
     - Write pulse delay = 0
     - Bank scheme:    VCS(x000-x7ff) -> RAM3(000-7ff)
            VCS(x800-xfff) -> RAM1(000-7ff)
     - Write disabled
     - ROM power off
18    NUMBER OF PAGES TO LOAD (24 pages, 6144 bytes)
00!(fffffffd) GAME HEADER CHECKSUM
01    MULTILOAD INDEX NUMBER
24    PROGRESS COUNTER LOW BYTE    ---> 0224
02    PROGRESS COUNTER HIGH BYTE


PAGE NUMBER TABLE (2010-2027) - PAGE CHECKSUM TABLE (2040-2057):

PAGE    CHECKSUM    MEMORY MAP
            rom image -> supercharger
00    00!(9b)        0000-00ff -> RAM1(000-0ff)
04    00!(8f)        0100-01ff -> RAM1(100-1ff)
08    00!(03)        0200-02ff -> RAM1(200-2ff)
0c    00!(cf)        0300-03ff -> RAM1(300-3ff)
10    00!(c5)        0400-04ff -> RAM1(400-4ff)
14    00!(b7)        0500-05ff -> RAM1(500-5ff)
18    00!(d0)        0600-06ff -> RAM1(600-6ff)
1c    00!(2d)        0700-07ff -> RAM1(700-7ff)
01    00!(97)        0800-08ff -> RAM2(000-0ff)
05    00!(dc)        0900-09ff -> RAM2(100-1ff)
09    00!(dc)        0a00-0aff -> RAM2(200-2ff)
0d    00!(0f)        0b00-0bff -> RAM2(300-3ff)
11    00!(12)        0c00-0cff -> RAM2(400-4ff)
15    00!(84)        0d00-0dff -> RAM2(500-5ff)
19    00!(ec)        0e00-0eff -> RAM2(600-6ff)
1d    00!(50)        0f00-0fff -> RAM2(700-7ff)
02    00!(10)        1000-10ff -> RAM3(000-0ff)
06    00!(07)        1100-11ff -> RAM3(100-1ff)
0a    00!(42)        1200-12ff -> RAM3(200-2ff)
0e    00!(ef)        1300-13ff -> RAM3(300-3ff)
12    00!(47)        1400-14ff -> RAM3(400-4ff)
16    00!(31)        1500-15ff -> RAM3(500-5ff)
1a    00!(6d)        1600-16ff -> RAM3(600-6ff)
1e    00!(c3)        1700-17ff -> RAM3(700-7ff)

--------------------------------------------------------------------------------
 

 

 

 

AMtest4.bin

Share this post


Link to post
Share on other sites

Got it! :)

 

I had a bug where I was switched out the active bank when switching in the ROM, comments from the fix:


L_232;_232 " ldx #%00000100 ;(ram1-rom, write dis, power ON)"
 ;ldx #%00000100 ;(ram1-rom, write dis, power ON)
 ;My routine is in bank3, so it needs to be [email protected]#$!#[email protected]#[email protected]
  ldx #%00000000 ;

 

Thank you @Al_Nafuur for your help! :) 

Thanks @alex_79 for that awesome tutorial in the sc_loader.asm file and your threads! :) 

 

Multifile.bin

  • Like 1

Share this post


Link to post
Share on other sites

Ran the Flashback BASIC Manual on my PlusCart Today!  

 

The text display looks fantastic on my CRT and reminds me of the TRS-80 Color Computer! :)

 

PlusCartTextReaderIsAwesome.thumb.jpg.ce9fe78a4b09dfe41b03bd70852b4b34.jpg

 

Circular reference multi-load file test

 

I've attached a new build of KC II PAL with a title screen program and a game program that both call each other, and also the BASIC listing for the title screen which is pretty short and has the SuperCharger callback shown in inline Assembly.

 

The circular reference worked after I downloaded the new BIOS but not consistently. Sometimes it will freeze going back to the menu and sometimes the screen is black for a few seconds. 

 

It should load the title screen and when the button is pressed the game loads. When KC dies, it will usually reload the title screen after a few seconds but it is possible to miss the event unintentionally via timing sometimes or intentionally by parking KC in orbit in his home right quickly (right above the binary score).

 

More Ideas on adding the Load Command - what should it do?

 

The SuperCharger loading capability is really impressive, just one bank or part of a bank can also be selectively loaded. SuperCharger BASIC has two gameloops that each live in a vertical blank in a 2K bank each, so I'm thinking to implement the load command so that it can load either a whole new 6K of ROM like this example, or just the other vertical blank's 2K gameloop.

 

KCII_PALTTL.bin KCTitleScreen.txt

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, Mr SQL said:

More Ideas on adding the Load Command - what should it do?

 

 

The SuperCharger loading capability is really impressive, just one bank or part of a bank can also be selectively loaded. SuperCharger BASIC has two gameloops that each live in a vertical blank in a 2K bank each, so I'm thinking to implement the load command so that it can load either a whole new 6K of ROM like this example, or just the other vertical blank's 2K gameloop.

The UnoCart and PlusCart (and Stella too) are always loading the whole 6K of an multiload block into the emulated supercharger RAM.
Do you know how the SC bios loads a single 2K page into one of the RAM blocks?

 

Share this post


Link to post
Share on other sites
2 hours ago, Al_Nafuur said:

The UnoCart and PlusCart (and Stella too) are always loading the whole 6K of an multiload block into the emulated supercharger RAM.
Do you know how the SC bios loads a single 2K page into one of the RAM blocks?

 

I have to do some experiments to confirm, I think I can change the number of blocks and the starting fill address - the Assembly in the title page listing that calls the SC BIOS is passing it a 24 in the heading telling it to retrieve 24 256k=6k.

 

I am planning on leaving the start address alone and passing it 6K like in the example, or 2K or 4K to just reload the 1st bank (gameloop1) or banks 1 & 2.

 

This will preserve the calling bank (gameloop 2 lives in bank3) while reloading the other program in bank1 - there are two BASIC programs running by design:

architecture.jpg.f6c121649a8431bd25b0df1123d6cead.jpg

 

One notable difference with batari BASIC and SuperCharger BASIC is that there are two BASIC gameloops and they are seperate BASIC programs that run separately and interact with each other - in this case the design lends itself really well to reloading one BASIC program while the other remains running.

 

The chiptunes for the tracker sequencer is stored in bank2 along with the BASIC Runtime, so being able to reload that bank can load new music.

 

I want to keep it simple so I think the options for the BASIC command should be something like "load" without an argument defaulting to "load 3" for 6K, "load 1" for just reload bank1,  "load 2" for reload banks 1 & 2.

 

I'm pretty sure "load 1" for grabbing just the 1st 2K will work weather I format a 2K,4K or 6K image to link in the file because it's contiguous and I'm not changing start.

 

If this is too difficult for me to get it working I will keep the load command limited to reloading the whole 6K but partial loads would be pretty cool! :)

 

  • Like 1

Share this post


Link to post
Share on other sites

I've been having a lot of fun adding the indexed load command to BASIC - here's what I came up with so far:

 

new command: load

 

There is a new constant SUPERCHARGERID that defaults to 0, this identifies the supercharger program and must be unique

 

There is a new temp variable SUPERCHARGERINDEX that should be set prior to calling load, it defaults to 1 and identifies the other programs unique supercharger id.

 

The load command is effectively a simple DOS filesystem for SuperCharger BASIC using the indexed tape drive functionality to combine the files together into an ISAM for emus and flashcarts (or use a looping continuous tape with the SuperCharger to provide equivalent functionality).

 

I have not finished implementing or testing the new temp variable PARTIALLOAD to allow loading just bank1 or just bank1 and 2 instead of all 3 banks.

 

I've attached the KC II Title Screen program using the BASIC load command, and the unreleased compiler update.

 

Network access for BASIC?

 

It would be really cool to add network access to BASIC next, the PlusCart has some interesting API's I am reading about right now... :) 

 

Disk_Extended_SuperCharger_BASIC.ps1 KCTitleScreenTestingload.txt

Share this post


Link to post
Share on other sites
9 hours ago, Mr SQL said:

Network access for BASIC?

 

It would be really cool to add network access to BASIC next, the PlusCart has some interesting API's I am reading about right now... :)

Currently the SuperCharger bankswitching on PlusCart and Javatari.js does not (yet) supports PlusROM functions:

"Currently the PlusROM functions are supported by the PlusCart and javatari.js with 2K, 4K, 3F, 3E and 3E+ cartridges and any standard bankswitching cartridge with or without 128 bytes of RAM (@ 1000 to 10FF) and a 'Standard' F4 Bankswitching (@ 1FF4 to 1FFB)"

 

As far as I can see the PlusROM hotspots don't interfere with the SuperCharger bankswitching, so we might implement it at PlusCart and javatari.js

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Al_Nafuur said:

Currently the SuperCharger bankswitching on PlusCart and Javatari.js does not (yet) supports PlusROM functions:

"Currently the PlusROM functions are supported by the PlusCart and javatari.js with 2K, 4K, 3F, 3E and 3E+ cartridges and any standard bankswitching cartridge with or without 128 bytes of RAM (@ 1000 to 10FF) and a 'Standard' F4 Bankswitching (@ 1FF4 to 1FFB)"

 

As far as I can see the PlusROM hotspots don't interfere with the SuperCharger bankswitching, so we might implement it at PlusCart and javatari.js

 

 

Very cool! If you can add support for the FA CBS RAM format too (it's the one used by Tunnel Runner) I will add networking commands to Flashback BASIC as well.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Mr SQL said:

 

Very cool! If you can add support for the FA CBS RAM format too (it's the one used by Tunnel Runner) I will add networking commands to Flashback BASIC as well.

 

 

It seems that PlusROM functions can be easily added there too.

 

Is it a very common bankswitching in current 2600 projects?

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Al_Nafuur said:

It seems that PlusROM functions can be easily added there too.

 

Is it a very common bankswitching in current 2600 projects?

Great question!

 

I like CBS RAM because it has 256 bytes of extra RAM which is just enough to make it cross compatible with SuperCharger BASIC games scrolling virtual worlds, most games will compile with no changes. The similarity between the classic Atari games Tunnel Runner (CBS RAM) and Escape from the Mind Master (SuperCharger) is pretty illustrative as well, both are 3D Pacman games.

 

This capability for close interoperability makes them my two favorite memory and banking schemes for classic Atari development with enhanced graphics.

 

I think the 128 byte SuperChip and 8K, or vanilla 4K may be the most popular classic development schemes.

 

One very interesting case is SuperCharger Space Invaders where while under development the program grew to large to run on the SuperCharger though it would otherwise compile for it, but could still compile successfully with the CBS RAM cross compiler for having extra ROM space in the scheme. I've been trying to shrink it down enough to get it to compile it for the SuperCharger.

 

Share this post


Link to post
Share on other sites
9 hours ago, Mr SQL said:

 

Very cool! If you can add support for the FA CBS RAM format too (it's the one used by Tunnel Runner) I will add networking commands to Flashback BASIC as well.

 

 

new firmware version v0.14.14 in PlusStore with:

  • PlusROM functions for FA (CBS RAM plus) Bankswitching
  • Like 1

Share this post


Link to post
Share on other sites

Awesome I will check it out! :)

 

... I just tested the SuperCharger BASIC ROM load command after the update, it went from the TitleScreen to KCII, then took a long time to go back to the menu, then froze.

On subsequent runs it goes from the TitleScreen to KCII, but freezes instead of going back.

 

The unique identifier is can be used to seek bidirectionally anywhere within the file or anywhere on the Tape (a looping tape would work the same) to find any of the SuperCharger files looking for the one with the specified index. In my examples I used SUPERCHARGERINDEX to pass the target index to the load command for SuperCharger BASIC, and SUPERCHARGERID to specify the calling programs own unique SuperChargerID (index) for the other programs to call it back up.

 

Also I wonder if you are hitting the SuperCharger security? There is a thing in the BIOS that keeps programs from executing unless their index is zero, or it matches the passed index (the security feature).

Share this post


Link to post
Share on other sites

Here is a test program with four loads to help the supercharger BIOS compatibility -

 

First load: BREAKOUT 2002 LASERBEAMS PAL my 4th place 2019 demo entry for SillyVenture is the first program that loads (load 0) and will load four games if you go into the four corners and press the button.

 

Here's the uniqueID of each of the programs it loads and the logic:

 

 rem 20200901 load 4 games in the corners if the button is pressed!
 if joy0fire=0 then goto dontloadsuperchargergames
 if x=0 and y=1 then SUPERCHARGERINDEX=1:goto loadAnotherSuperChargerGame:
 if x=0 and y=19 then SUPERCHARGERINDEX=2:goto loadAnotherSuperChargerGame
 if x=91 and y=1 then SUPERCHARGERINDEX=3:goto loadAnotherSuperChargerGame
 if x=91 and y=19 then SUPERCHARGERINDEX=0:goto loadAnotherSuperChargerGame:rem load the same game back in!!!
 rem ----------------------------------------------------------------------------
dontloadsuperchargergames

 

In the upper left it loads KC II PAL which has a unique SuperCharger ID of 1 - this game loads the breakout game back in when KC dies, sometimes.

In the upper right it loads the KC TitleScreen which uses a unique ID of 2 - this game loads KC II PAL which in turn can load the BREAKOUT game back in.

In the lower left it loads my Fluid City my 2019 Game entry for SillyVenture, if you beat the game it returns to the BREAKOUT game.

 

Only the upper left and lower left work on plus cart - they happen pretty quick, the other two loads freeze up or timeout for a while and get the wrong load.

 

program0.bin

Share this post


Link to post
Share on other sites
15 hours ago, Mr SQL said:

Only the upper left and lower left work on plus cart - they happen pretty quick, the other two loads freeze up or timeout for a while and get the wrong load.

I had (occasionally) timeouts on the lower left too, lower right (loading inital bank) worked without timeout for me..

 

There are no http request from the PlusCart in the PlusStore logs if the timeout happens.

 

Does these timeouts (or not loading the requested bank) also occure at the UnoCart, or does the file works as expected with the UnoCart?

 

Share this post


Link to post
Share on other sites
4 hours ago, Al_Nafuur said:

I had (occasionally) timeouts on the lower left too, lower right (loading inital bank) worked without timeout for me..

 

There are no http request from the PlusCart in the PlusStore logs if the timeout happens.

 

Does these timeouts (or not loading the requested bank) also occure at the UnoCart, or does the file works as expected with the UnoCart?

 

 

Yes all the corners load on the Uno, maybe something changed from working on SI?

 

Also one of the four corners has the same index as the current games ID and should reload itself, could this duplicate index be causing an issue?

  

Share this post


Link to post
Share on other sites

Here are two test files that are exhibiting inconsistent behavior in Stella and on the Harmony cart - not sure why:

 

This is the map of what BREAKOUT GUI OS demo is doing -

 

 if joy0fire=0 then goto dontloadsuperchargergames
 if x=0 and y=1 then SUPERCHARGERINDEX=1:goto loadAnotherSuperChargerGame: rem KC II PAL  upper left
 if x=0 and y=19 then SUPERCHARGERINDEX=2:goto loadAnotherSuperChargerGame: rem FLUIDCITY lower left
 if x=91 and y=1 then SUPERCHARGERINDEX=3:goto loadAnotherSuperChargerGame: REM KC II TITLE SCREEN upper right
 if x=91 and y=19 then SUPERCHARGERINDEX=0:goto loadAnotherSuperChargerGame:rem load the same game!!! lower right

 

The other demo is simpler and should just go back and forth between KC II PAL and the title screen whenever the button is pressed (have to hold it down for a bit in KC) 

 

This may flush the bug better because it sometimes just reloads the current load

 

@DirtyHairy I think you fixed this SuperCharger bug in your UnoCart implementation, I am using Stella 5.0 so it is possible the bug is already fixed in a new release.

 

BREAKOUT_GUI_OS.bin KCPALTTL_occasional_Stella_bug.bin

Share this post


Link to post
Share on other sites

Made some progress on this bug - this version works on the PlusCart, in Stella and on the Harmony too if you are extremely light fingered and only hold the button for one frame.

 

And the bug never happens in the lower left, where you need to beat the game in order to return to breakout -

I'm thinking the button press is being cached between loads?

 

It is falling through and getting triggered in the next frame, possibly sometimes before the index from the header has been seeded yet.

 

It surprised me to see the difference in PlusCart and Uno because they both have the delay from the bars built in - maybe without the delay there is a race condition where the button press goes through right away before the index is retrieved and set from the end of the file; the configuration headers with the programs directory index are really footers. There would be more time to seed this with the loading bars delay.

 

Also I think the Harmony and Stella with no loading bars give the best performance for this Demo, if we want to keep them for more authenticity maybe they could be set to the SuperChargers maximum load speed (x4) to speed the up the loading transitions?

 

I will create a version with a larger delay that I think will fully resolve this loading bug like the load in the lower left does that always works regardless of weather it is an init  delay - you have to beat the game to return from there instead of being instantly accessible via the button.

 

BREAKOUT_GUI_OS_hotfix.bin

Share this post


Link to post
Share on other sites

OK I think I narrowed it down to latency from this test build which is now very close to working on PlusCart -

 

This build now works fine in Stella and Harmony as well as UnoCart (which doesn't have the latency bug) and every corner works easily on the PlusCart except the upper right going into the TitleScreen for KC - this can freeze for 15 seconds (old SC bug triggered?) and reload the 1st load when it doesn't work.

 

The wrong supercharger ID appears to be cached at first? Maybe there is a delay for PlusCart functions before grabbing the ID from the "header" at the end of the load, if so storing it first would resolve.

 

Stella and Harmony (since there is no loading bar delay) can now be used to hold the button down, and you can see my delays between the transitions - plenty of time to see them even if you keep the button pressed the whole time so I think on the PlusCart the ID update needs to happen faster (or first before any PlusCart calls are made) once the load is running; it can't wait 2 seconds to update it or the transition usually breaks and hits the 15 second timeout and grabs the wrong load.

 

BREAKOUT_GUI_OS_hotfix5.bin

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...