Jump to content
IGNORED

How do I access 1088 Meg with Basic XE ?


rcamp48

Recommended Posts

OK the thought of using a ramdisk is tempting but I want to leave the BBS up and running sothat people can log onto it, tomorrow I will experiment with 19200 Baud and a ramdisk , I will put in a routine to copy all of my files to ramdisk and write them back to disk after a logoff, that should be doable.... one of my changes is to use sub-directories in the file system on Forem XE Pro, but everytime I attemp changes I run out of memory....

 

Russ

 

Link to comment
Share on other sites

46 minutes ago, Rybags said:

Yep - unsure if anyone's attempted to patch it.  In theory it might be feasible to expand on that a bit.

 

Alternative is use a Ramdisk and make do with a fast file system.

That might be a good idea , patching Basic XE , I have a few of those USB carts coming is it possible to put  a Basic XE on one of them? (Its not just limited to games is it?)

 

Link to comment
Share on other sites

4 hours ago, rcamp48 said:

That might be a good idea , patching Basic XE , I have a few of those USB carts coming is it possible to put  a Basic XE on one of them? (Its not just limited to games is it?)

It looks like some of the bank switching is implemented in the Cart and some in the extensions disk.

Peek and Poke work if a bank is added to the call i.e. Poke 16384,255,1 and Peek(16384,1)

but as Move is part of the extension disk, the Move command will only work when loaded from the disk.

 

SO if someone was to try changing the code, it would probably need to be done in both places.

 

Might be easier to add new functionality to the extensions disk (probably would still need new keywords on the Cart to access them)

Link to comment
Share on other sites

It might be simple enough to just search and replace references to the $D301 table and the hardcoded bit twiddling, but there might be other issues. First off, we don't have source code that will build a working 4.2 cartridge AND the extensions. I'm not aware of any source available for the working, if slightly bugged 4.1 version. Next, you would have to look into the code that manages splitting the BASIC program between banks. Does it have any assumptions about available memory ? For example, the Action! editor memory manager assumes you can't have more than 32K-1 bytes of free memory, and craps out completely if you have 40K available.  Lastly, if you got it to work, what do you do if the line numbers go above 32767 ? I suspect fixing that would be a huge issue.

 

Performance would also be an issue. How long would it take to search 17,000 lines for a CALL or GOSUB ? Probably longer than your callers want to wait. FAST could only address the first 64K, so it would be no help.

Link to comment
Share on other sites

17 hours ago, TGB1718 said:

It looks like some of the bank switching is implemented in the Cart and some in the extensions disk.

Peek and Poke work if a bank is added to the call i.e. Poke 16384,255,1 and Peek(16384,1)

but as Move is part of the extension disk, the Move command will only work when loaded from the disk.

 

SO if someone was to try changing the code, it would probably need to be done in both places.

 

Might be easier to add new functionality to the extensions disk (probably would still need new keywords on the Cart to access them)

Can you elaborate on the Move command, I am indeed using the extension disk

 

Link to comment
Share on other sites

18 hours ago, TGB1718 said:

It looks like some of the bank switching is implemented in the Cart and some in the extensions disk.

 

Incorrect. The MOVE command in the extensions only parses the From and To addresses, and Length. It then jumps in to the ZMOVE routine in the cartridge, which looks at the next symbol to see if a bank # was specified. If it was, it then checks the bank number to see if it's greater than 4, and if valid, selects the appropriate bank via store to $D301. No bank selection is performed in the extensions, or as OSS calls it, the "Removed Statements", haha.

 

         .PAGE "MOVE -- A DANGEROUS GAME"             
;                                                     
;MOVE FROM, TO, LEN                                   
;                                                     
:BR0     .=  *       used 1                           
         RTS                                          
JXMOVE   JSR @GETIAY ;FROM                            
         PHA                                          
         TYA                                          
         PHA                                          
         JSR @GETIAY ;TO                              
         PHA                                          
         TYA                                          
         PHA                                          
         JSR @GETSGN                                  
         TAX                                          
         LDA FR0     ;NEED TO SUBTRACT ONE FOR MOVE   
         STA MVLNG                                    
         EOR #$FF                                     
         TAY                                          
         LDA FR0+1                                    
         ;                                            
         STA MVLNG+1 ;ADJUSTED                        
         BMI :BR0    ;OOPS...LENGTH OUT OF RANGE      
         TXA         ;JUST TO CHECK DIRECTION OF MV   
         BPL :XMV2   ;MOVE THE OTHER WAY              
         PLA                                          
         CLC                                          
         ADC MVLNG+1 ;IS ADJUSTED                     
         STA MVTA+1                                   
         PLA                                          
         STA MVTA    ;LSB OF 'TO'                     
         PLA                                          
         CLC                                          
         ADC MVLNG+1                                  
         STA MVFA+1  ;MSB OF 'FROM'                   
         PLA                                          
         STA MVFA    ;LSB                             
         SEC                                          
         JMP ZMOVE   ;'EXPAND' AND MOVE               

 

 

ZMOVE D301READ ;GET MACHINE STATE
PHA ;SAVE IT
PHP ;MOVE DIRECTION
ORA #4*4+1 ;MAIN RAM, ROM ON
LDY STINDEX ;BANK # SPECIFIED?
CPY NXTSTD
BCS :Z7 ;NO
JSR @GET1INT ;YUP, GET IT
LDX FR0
JSR STBK1 ;GO SELECT IT
; "A" RET =D301
:Z7 D301WRITE
PLP ;WHICH WAY?
BCS :Z6 ;TO 'EXPMOVE'
JSR FMOVER ;CONTRACT MOVE
JMP :Z5
:Z6 JSR EXPMOVE
:Z5 PLA ;MACHINE STATE
JMP SXTD ;RESTORED...

 

 

 

STBK1 CPX #5 ;ILLEGAL BANK #?

BCS :BR1
SETBANK D301READ
AND #$E3
ORA :BR0,X
:BR1 .= * used 2
SXTD STA CURB
D301S D301MAIN
RTS

Link to comment
Share on other sites

I have decided to run a 320 K ram disk instead of using memory banks, I am loading with RD dot COM a 320 K ramdisk with all of the text ilfes that are loaded from disk, it seems to be faster that way... Russ

The command is D1:RD.COM D9: /E

 The /E parameter is used to make sure that Basic XE memory is not overwritten

 

Edited by rcamp48
Link to comment
Share on other sites

  • 5 months later...
On 2/15/2022 at 11:19 PM, Alfred said:

Incorrect. The MOVE command in the extensions only parses the From and To addresses, and Length. It then jumps in to the ZMOVE routine in the cartridge, which looks at the next symbol to see if a bank # was specified. If it was, it then checks the bank number to see if it's greater than 4, and if valid, selects the appropriate bank via store to $D301. No bank selection is performed in the extensions, or as OSS calls it, the "Removed Statements", haha.

 

         .PAGE "MOVE -- A DANGEROUS GAME"             
;                                                     
;MOVE FROM, TO, LEN                                   
;                                                     
:BR0     .=  *       used 1                           
         RTS                                          
JXMOVE   JSR @GETIAY ;FROM                            
         PHA                                          
         TYA                                          
         PHA                                          
         JSR @GETIAY ;TO                              
         PHA                                          
         TYA                                          
         PHA                                          
         JSR @GETSGN                                  
         TAX                                          
         LDA FR0     ;NEED TO SUBTRACT ONE FOR MOVE   
         STA MVLNG                                    
         EOR #$FF                                     
         TAY                                          
         LDA FR0+1                                    
         ;                                            
         STA MVLNG+1 ;ADJUSTED                        
         BMI :BR0    ;OOPS...LENGTH OUT OF RANGE      
         TXA         ;JUST TO CHECK DIRECTION OF MV   
         BPL :XMV2   ;MOVE THE OTHER WAY              
         PLA                                          
         CLC                                          
         ADC MVLNG+1 ;IS ADJUSTED                     
         STA MVTA+1                                   
         PLA                                          
         STA MVTA    ;LSB OF 'TO'                     
         PLA                                          
         CLC                                          
         ADC MVLNG+1                                  
         STA MVFA+1  ;MSB OF 'FROM'                   
         PLA                                          
         STA MVFA    ;LSB                             
         SEC                                          
         JMP ZMOVE   ;'EXPAND' AND MOVE               

 

 

ZMOVE D301READ ;GET MACHINE STATE
PHA ;SAVE IT
PHP ;MOVE DIRECTION
ORA #4*4+1 ;MAIN RAM, ROM ON
LDY STINDEX ;BANK # SPECIFIED?
CPY NXTSTD
BCS :Z7 ;NO
JSR @GET1INT ;YUP, GET IT
LDX FR0
JSR STBK1 ;GO SELECT IT
; "A" RET =D301
:Z7 D301WRITE
PLP ;WHICH WAY?
BCS :Z6 ;TO 'EXPMOVE'
JSR FMOVER ;CONTRACT MOVE
JMP :Z5
:Z6 JSR EXPMOVE
:Z5 PLA ;MACHINE STATE
JMP SXTD ;RESTORED...

 

 

 

STBK1 CPX #5 ;ILLEGAL BANK #?

BCS :BR1
SETBANK D301READ
AND #$E3
ORA :BR0,X
:BR1 .= * used 2
SXTD STA CURB
D301S D301MAIN
RTS

Just set that #5 to #69... lol

Edited by rsh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...