Jump to content

Photo

Convert EA5 game to one single XB Int/Var file


36 replies to this topic

#1 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • 134 posts
  • RUN "CS1"

Posted Wed Jul 11, 2018 7:35 AM

Lets say you have a EA5 game that loads from XB with a loader similar to this:

100 ! EA#5 LOADER FOR XB BY TURSI
110 ! BASED ON SCRATCH LOADER BY
120 ! MARK WILLS, MIKE BRENT, BILL, TIM
130 ! BEN, and THE REST OF THE SWPB GROUP
140 CALL CLEAR
155 CALL INIT :: CALL LOAD(16376,79,80,84,53,32,32,253,120)
157 CALL LOAD(8196,63,248)
220 CALL LINK("OPT5","DSK1.FBIRD")

 

and one or more external files of actual game code:

FBIRD

FBIRE

FB

LOAD (the above loader)

 

Is there anyway to somehow stuff everything into a single, self contained Int/Var file, similar to how Eric in monsterland and others are, so that i can put it on tape with CASS24K?



#2 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,819 posts
  • Location:Denmark

Posted Wed Jul 11, 2018 9:57 AM

Looks familiar ;). FBIRD and FBIRE are actual game files that you need. LOAD is just a loader. FB is the game as an E/A#3 (object) file.



#3 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Wed Jul 11, 2018 10:37 AM

But do you know of any way to somehow convert them into a single, self contained Int/Var file that can be loaded from tape with CASS24K?



#4 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,797 posts
  • Location:Hustisford, WI

Posted Wed Jul 11, 2018 12:27 PM

You can embed assembly into an XB program... But I'm not sure you could do what you're suggesting.

#5 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,168 posts
  • HarmlessLion
  • Location:BUR

Posted Wed Jul 11, 2018 8:46 PM

I think the docs included with that XB loader you display there describe how to manipulate the pointers in XB to embed assembly language with it. You wouldn't use that program itself, since it's just an EA#5 loader.

You'd need to:
-Reserve the amount of space that the program needs, and start a NEW XB program with that.
-write some additional assembly language to copy it to the correct place and start it
-load all that into the reserved XB space
-write some XB code to do a couple of CALL LOADs and a CALL LINK in order to start the assembly mentioned above

#6 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Wed Jul 11, 2018 11:50 PM

I think the docs included with that XB loader you display there describe how to manipulate the pointers in XB to embed assembly language with it. You wouldn't use that program itself, since it's just an EA#5 loader.

You'd need to:
-Reserve the amount of space that the program needs, and start a NEW XB program with that.
-write some additional assembly language to copy it to the correct place and start it
-load all that into the reserved XB space
-write some XB code to do a couple of CALL LOADs and a CALL LINK in order to start the assembly mentioned above

I have never done any assembly coding.

That all sounds like more then i could handle.



#7 Retrospect OFFLINE  

Retrospect

    Stargunner

  • 1,023 posts
  • Location:Wakefield, England

Posted Thu Jul 12, 2018 10:07 AM

I have never done any assembly coding.

That all sounds like more then i could handle.

Maybes someone could show an example, of just the amount of assembly code needed for such a task, and how to load it into the right memory allocations.... 

Assembly is a daunting prospect for many myself included but I feel with baby-steps an interest could develop. There are some such threads somewhere on Atariage.



#8 adamantyr ONLINE  

adamantyr

    Stargunner

  • 1,343 posts

Posted Thu Jul 12, 2018 10:57 AM

The E/A #5 loader is built around the disk system and loading 8K segments. Unfortunately the DSR's for the disk system are pretty much fixed to use the VDP for file buffering; the only way you can do direct to CPU is advanced options like the Corcomp controller with the Miller Graphics EPROMS which lets you do direct sector reads to CPU.

 

Also, option 5 files aren't necessarily loaded into the upper 24K in a linear fashion, which means CASS24K may not work because it would expect the data to be a literal stream in order. You would need to look at the Option 5 files and see what structure they have. MOST of the time they are just linearly read into the upper 24K because the lower 8k is occupied by the loader code, but for example, Rock Runner has 4K segments and they are loaded out of order in weird places, and leave a large gap in the upper memory, probably for buffers.


  • RXB likes this

#9 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,168 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Jul 12, 2018 4:40 PM

Well, he doesn't want to load from disk, he wants a single standalone XB program that starts the game he shared. Since it's only 16k in size (FBIRD, FBIRE), it should fit fine.

Are the files available somewhere?

Edited by Tursi, Thu Jul 12, 2018 4:47 PM.


#10 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Thu Jul 12, 2018 5:22 PM

Are the files available somewhere?

Disk, with source.

Attached File  FlappyBird.zip   36.59KB   7 downloads


Edited by jrhodes, Thu Jul 12, 2018 5:25 PM.


#11 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,168 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Jul 12, 2018 5:29 PM

Disk, with source.
attachicon.gifFlappyBird.zip


Ahhh! I course. I didn't recognize it by filename alone. ;)

#12 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,168 posts
  • HarmlessLion
  • Location:BUR

Posted Thu Jul 12, 2018 9:08 PM

Don't have time for a proper tutorial, but I wrote down the basics of what I did in here...

Attached File  FlappyX.zip   11.21KB   17 downloads

#13 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Thu Jul 12, 2018 11:17 PM

Awesome, thanks for doing this!



#14 senior_falcon ONLINE  

senior_falcon

    Stargunner

  • 1,218 posts
  • Location:Lansing, NY, USA

Posted Fri Jul 13, 2018 5:44 AM

Here's an idea for a more generic program that would take EA5 files and embed them in an XB program. When the program runs it would move the files where they should be and start them up.
 
You would need an assembly subprogram in low memory to create the XB program. This would do the following:
1-get the name of the EA5 program
2-read each of the files comprising the EA5 program. This first pass is only to find out how long the files are. Each of the files has a 6 byte header with:
   >FFFF (not the last file) or >0000 (last file)
   Number of bytes
   Address to load the bytes
Add them up and now we know how many bytes need to be saved and with that can determine the address where they should be copied.
3-Copy a short AL program to high memory at around >FF80. When the XB program runs, this AL program will move the embedded code where it belongs, then set up the registers and VDP to duplicate the EA5 environment. To do all this will take about 128 bytes depending on how thoroughly you restore the EA5 environment.(For some EA5 programs this may not be necessary)
4-Read the EA5 files again. This time copy them, including the 6 byte header, into high memory such that they stop just short of the AL program loaded in step 3. Put the 1st address of these files into the AL program so it knows where the code begins.
5-Just below those add this 1 line XB program: 10 CALL INIT::CALL LOAD(8192,2 BYTE ADDRESS OF LOADER)::CALL LINK("X")
6-Set the pointers at >8330 and >8332 to point to this line of XB code.
The XB program is now complete and can be saved as a normal XB program.
 
When the AL program loaded in 3 runs, it knows the starting address of the code and can read the 3 word header. With that it can determine how many bytes need to be moved, where to move them, and if there is more code to be moved after this segment. The very first address is the starting address of the program. (Usually >A000)
 
This would make it possible to save an EA5 program that uses almost all the high memory. 

Edited by senior_falcon, Fri Jul 13, 2018 6:57 AM.


#15 RXB ONLINE  

RXB

    River Patroller

  • 3,250 posts
  • Location:Vancouver, Washington, USA

Posted Fri Jul 13, 2018 12:15 PM

Or Use RXB 2018

Load your program you want....exit to Title Screen, then select RXB:

CALL SAMS("SAVE","DSK4.FILENAME",1) 

 

SAMS BANK 1 is same as SAMS PASS mode or same as a normal 32K and RXB does not check if it worked or not.

 

To load your 32K after you save it:

CALL SAMS("LOAD","DSK4.FILENAME",1,address or link "NAME")

 

Simple way to do this is LOAD your program you want to save, save it, and when loaded look at where it starts execution address or use a link name.

 

This makes it as complicated as using MERGE FILES, but less steps then what Senior_Falcon recommended which is not very user friendly to do.


Edited by RXB, Fri Jul 13, 2018 12:17 PM.


#16 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,168 posts
  • HarmlessLion
  • Location:BUR

Posted Fri Jul 13, 2018 6:00 PM

Well, Senior Falcon is proposing a piece of software that does those steps... and jrhodes ultimately just wanted to be able to load the assembly game from XB and CS1.
  • RXB likes this

#17 RXB ONLINE  

RXB

    River Patroller

  • 3,250 posts
  • Location:Vancouver, Washington, USA

Posted Fri Jul 13, 2018 6:19 PM

Well, Senior Falcon is proposing a piece of software that does those steps... and jrhodes ultimately just wanted to be able to load the assembly game from XB and CS1.

Yea, well just got a idea to use a GPL DSR.

Thus testing a version that saves entire 32K in two 12K files at 48 sectors and one 8K file 32 sectors.

 

Cool thing is you can type TEST at any prompt in EA or XB and it saves the files.

 

I can add a feature to look for device filename after the device DSR like TEST.DSK4.FILENAME how would that be for cool?

 

Go to EA or XB or TI BASIC and type OLD TEST.DSK2.GAMENAME

Loads anything you have saved into 32K, guess I could add execute ADDRESS or LINK NAME 

i.e. OLD TEST.DSK2.GAMENAME.LINKNAME

Or a prompt?


Edited by RXB, Fri Jul 13, 2018 6:20 PM.


#18 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Fri Jul 13, 2018 7:16 PM

Yea, well just got a idea to use a GPL DSR.

Thus testing a version that saves entire 32K in two 12K files at 48 sectors and one 8K file 32 sectors.

 

Cool thing is you can type TEST at any prompt in EA or XB and it saves the files.

 

I can add a feature to look for device filename after the device DSR like TEST.DSK4.FILENAME how would that be for cool?

 

Go to EA or XB or TI BASIC and type OLD TEST.DSK2.GAMENAME

Loads anything you have saved into 32K, guess I could add execute ADDRESS or LINK NAME 

i.e. OLD TEST.DSK2.GAMENAME.LINKNAME

Or a prompt?

Sounds interesting, but unless i am missing something, i thought regular TI Basic could under no curcumstances use the 32k?

... That said, i know the T.E. II cart adds some features to TI Basic.

So this would work the same way? As long as you have RXB in the cart slot, it would add the capability to TI Basic to do OLD TEST.DSK2.GAMENAME?

If so, thats pretty neat.

I still kind of wish you could replace the consoles TI-Basic with RXB. The more i play with it under emulation, the more tempted i am to get a physical cart.


Edited by jrhodes, Fri Jul 13, 2018 7:17 PM.

  • RXB likes this

#19 senior_falcon ONLINE  

senior_falcon

    Stargunner

  • 1,218 posts
  • Location:Lansing, NY, USA

Posted Fri Jul 13, 2018 7:29 PM

I still kind of wish you could replace the consoles TI-Basic with RXB. The more i play with it under emulation, the more tempted i am to get a physical cart.

I am a little confused about what you want to do. Do you have 32K in your console? Do you have an Extended BASIC cartridge? If not then CASS24K  cannot load a program as there is no memory to hold it, and without a cartridge such as XB, MiniMemory, or Editor/Assembler you cannot (easily) access the memory.



#20 jrhodes OFFLINE  

jrhodes

    Chopper Commander

  • Topic Starter
  • 134 posts
  • RUN "CS1"

Posted Fri Jul 13, 2018 7:38 PM

I am a little confused about what you want to do. Do you have 32K in your console? Do you have an Extended BASIC cartridge? If not then CASS24K  cannot load a program as there is no memory to hold it, and without a cartridge such as XB, MiniMemory, or Editor/Assembler you cannot (easily) access the memory.

I do have 32k as a side car, and i do have extended basic, and i was just saying that at times i wish i could replace TI Basic by flashing/whatever RXB into its place in the system ROMs.

From the main menu, you would have a choice of:

1. RXB

2. <whatever cart is inserted>

 

Instead of:

1. TI Basic

2. <whatever cart is inserted>

 

Just imagine if something like RXB had shipped built in to the 99/4a back in the day. Would have been epic.


  • RXB likes this

#21 RXB ONLINE  

RXB

    River Patroller

  • 3,250 posts
  • Location:Vancouver, Washington, USA

Posted Fri Jul 13, 2018 9:17 PM

Sounds interesting, but unless i am missing something, i thought regular TI Basic could under no curcumstances use the 32k?

... That said, i know the T.E. II cart adds some features to TI Basic.

So this would work the same way? As long as you have RXB in the cart slot, it would add the capability to TI Basic to do OLD TEST.DSK2.GAMENAME?

If so, thats pretty neat.

I still kind of wish you could replace the consoles TI-Basic with RXB. The more i play with it under emulation, the more tempted i am to get a physical cart.

Hmm TI Basic EA support routines will not work without a 32K?



#22 RXB ONLINE  

RXB

    River Patroller

  • 3,250 posts
  • Location:Vancouver, Washington, USA

Posted Fri Jul 13, 2018 9:22 PM

I am a little confused about what you want to do. Do you have 32K in your console? Do you have an Extended BASIC cartridge? If not then CASS24K  cannot load a program as there is no memory to hold it, and without a cartridge such as XB, MiniMemory, or Editor/Assembler you cannot (easily) access the memory.

Just normal 32K. 

But also the SAMS broken up into multiple 32K banks you can switch.

 

And TI Basic can access a GPL DSR in EA/XB/or BASIC.

 

Like in RXB currently you can type OLD EA and it goes to the EA cart, type OLD EA from BASIC and it goes to EA cart, type OLD XB from Basic and it goes to XB, from any EA prompt like EA3 or EA5 type XB and it goes to XB, or type BASIC and it goes to TI Basic, in EA cart from any prompt type Basic and from there type EA and it goes to EA cart....

 

You can with this swap from BASIC to XB to EA even from programs, like in RXB  CALL CAT("BASIC") would send you to TI Basic or SAVE EA would send you to EA cart...


Edited by RXB, Fri Jul 13, 2018 9:25 PM.


#23 senior_falcon ONLINE  

senior_falcon

    Stargunner

  • 1,218 posts
  • Location:Lansing, NY, USA

Posted Fri Jul 13, 2018 9:51 PM

Rich, please read posts number one and twenty, and then explain how your suggestions have any usefulness in accomplishing what is being asked for on a system with only cassette, XB and 32K.

It may come as a surprise to find out that RXB is not always the answer to every TI problem.

 

On vacation for a week-I have edited my post #14 with a little more information. Maybe someone else can use those ideas to create the program..



#24 RXB ONLINE  

RXB

    River Patroller

  • 3,250 posts
  • Location:Vancouver, Washington, USA

Posted Sat Jul 14, 2018 12:58 AM

Rich, please read posts number one and twenty, and then explain how your suggestions have any usefulness in accomplishing what is being asked for on a system with only cassette, XB and 32K.

It may come as a surprise to find out that RXB is not always the answer to every TI problem.

 

On vacation for a week-I have edited my post #14 with a little more information. Maybe someone else can use those ideas to create the program..

LOL it may come as a surprise to you but RXB can work with no 32K in just console with Cassette.

 

Matter of fact in RXB doc shows how to make a Assembly program in scratch pad and run it with just Console.

 

With 32K is even better. You have to remember I started with only a Cassette and Mini Memory cart myself. 



#25 senior_falcon ONLINE  

senior_falcon

    Stargunner

  • 1,218 posts
  • Location:Lansing, NY, USA

Posted Wed Jul 25, 2018 7:55 AM

 

Matter of fact in RXB doc shows how to make a Assembly program in scratch pad and run it with just Console.

 

This look interesting. I have looked for it in the docs but could not find it. This was RXB 2015; maybe it is in a later version?






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users