Jump to content
acadiel

GPL Interpreter emulator / assembly re-write

Recommended Posts

I have in my possession, a code snippet from Barry Boone that allows one to run an emulated GPL environment from a non standard memory address. Barry's GPL software, as written, should allow you to run up-to-four GROMs (24K) from upper memory expansion.

 

My time to learn new coding skills, etc, is rather limited, and I would really like to get this code written to where we can use GROM-only carts in the 64K cartridge board. That way, those of you who want to play with Diagnostic, Demonstration, the MB Games cart, etc, on a real TI-99/4A can do so.

 

I've created a nice spreadsheet stating which cartridge uses what GROM/ROM: Database of ROM/GROM usage by cartridge

 

Now, here's what I need help with..

 

I'd like to get this attached snippet working with a variety of different GROMs. There's a few different ways we can do this:

 

1) Put the code in the power-up bank on the 64K ROM cartridge. Have it copy the GPL emulator to 32K (either lower 8K or upper 24K), execute itself, and then bank switch the ROM as different GROM bases are called.

2) Put the code in the power-up bank on the 64K ROM cartridge. Have it bank and copy the GROM code to upper 24K, 6K at a time (obviously, this will mean we can only copy four GROMs), and execute the GPL emulator from the >6000 space.

3) Your choice here. Bonus points if you make a PC based program that takes a GROM cart for input and spits out the EPROM image. :)

 

Being that both MESS and Classic99 have built in support for the 64K Cartridge board, both emulators should be able to run what we're trying to do here. You might also want to be able to extend this to 128K, as these cart boards can definitely handle 128K when hacked.

 

Note that I didn't put into scope us using GROM+ROM carts - as this gets very hairy. The only way I can think of maybe doing it is to use method #1, and maybe remap calls to >6000->7FFF to a 32K segment. This might be impossible to do.

 

Now, for a little incentive... it's not much, but maybe you guys will have fun with it...

 

1st place) A multicart Funware cartridge prototype. This is one of the first ones I built with the 16K cart board, that was hacked. Picture here. PLUS a BRAND NEW 64K Cartridge board/case with your choice of EPROM!

2nd place) A multicart Navarone prototype. This is 16K cartridge prototype #3, so it's the THIRD prototype made of the new cartridge board generation. A really cool thing to have: Picture here

 

The only things that I'm asking is that if you are interested in helping with this:

a) Please post in this thread.

b) Please comment the code so the rest of us can learn, and

c) I'd like to be informed as you have new proof-of-concept code, etc, to try out. :)

 

- acadiel

GPL1.TXT

Share this post


Link to post
Share on other sites

For anyone who wants to take a shot; you might want to take a detailed look at the development resources sticky thread for things like "TI-Intern", Editor/Assembler manual, etc.

Share this post


Link to post
Share on other sites

Thanks to both of you! This sounds interesting but I wasn't sure where to begin with it. I'll check out those links retroclouds.

Share this post


Link to post
Share on other sites

Also, for reference, here are the 16K and 64K headers I use to adapt E/A programs into a cart. The 16K one is very simple, bankswitch, copy, bankswitch, copy, and execute. The 32K one has the same functionality, however, it also has functionality to copy the lower case character set and set it up, as well as set the keyboard up to where CTRL works. Credit goes to Tursi and Stuart Conner for the help.

16K-Header-Source.txt

Header Source.txt

Share this post


Link to post
Share on other sites

Are all four banks loaded at once, consecutively, or single banks loaded as needed? I would think the later but the * ALRIGHT, WE'RE DONE. LET'S GO! comment makes me ask.

 

BTW, for the cost of an additional jump for a bank switch, you can shrink the bank code 3x of

 

      MOV *R9+,*R10+
      MOV *R9+,*R10+
      DEC R4
      JNE LP1      

 

Is the above code snippit about 128 bytes? If so 3x, 384 bytes saved.

 

edit. goofed bits/bytes. If everything were 16bit, it'd be 3x 20 bytes.

 

* THIS IS THE ROUTINE THAT WILL
* SWAP BANKS TO HIGH, THE NEXT 2, LOW BANKS
MAIN1  MOV R0,@>6000
      LI R10,>A000 * ADDRESS TO COPY TO       
      JMP MAIN
      
MAIN2  MOV R0,@>6002 
      LI R10,>BC50 * ADDRESS TO COPY TO              
      JMP MAIN
      
MAIN3  MOV R0,@>6004
      LI R10,>D8A0 * ADDRESS TO COPY TO                  
      JMP MAIN
      
MAIN4  MOV R0,@>6006
      LI R4,>023F
      LI R9,>7704
      LI R10,>2000       
      JMP LP1
MAIN                     
      LI R4,>0714  * BYTES DIV 4
      LI R9,>63B0  * ADDRESS TO COPY FROM
LP1
      MOV *R9+,*R10+
      MOV *R9+,*R10+
      DEC R4
      JNE LP1      
            
* ALRIGHT, WE'RE DONE.  LET'S GO!

      B @>A000

 

 

And similar for the 16k header:

 

* THIS IS THE ROUTINE THAT WILL
* SWAP BANKS TO HIGH BANK
MAIN1  EQU $
      LWPI >8300
      MOV R0,@6000
      LI R10,>A000
      JMP MAIN

* THIS IS THE ROUTINE THAT WILL
* SWAP BANKS TO LOW BANK
MAIN2  MOV R0,@>6002
      LI R10,>BD00
MAIN   LI R4,>0740
      LI R9,>6300       
LP1
      MOV *R9+,*R10+
      MOV *R9+,*R10+
      DEC R4
      JNE LP1

* ALRIGHT, WE'RE DONE.  LET'S GO!

      B @>A000

Edited by in8regs
  • Like 1

Share this post


Link to post
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.

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...