Jump to content
IGNORED

TURBO-BASIC XL-Source Code now in PD and online! :-)))


Recommended Posts

@ijor:

You did read:

http://atariage.com/forums/topic/265490-turbo-basic-xl-source-code-the-chase-is-over-i-failed/?do=findComment&comment=3760293

?

Frank has left us in 2011, there will be no original source code. The one published is as far as we can get. It is from someone with contact to Frank in the golden age. I didn't wrote 'original' source code. And objection: this is not a pure disassembly! There are many comments in the code, of course in German, but they are inside! A pure disassembly can't do that. All major points have comments, so the user can get into the code. Look at vitoco's work above and please wait for an assembly done with the Bibo Assembler. Stepe by step, one after another. Compare the Star Raiders code with the one from Lorenz. Sure, original ones have more value, but I inted to put the focus on more usability. Therefore, Altirra is a really good option, Basic++ is another, and Hypra-Soft-Basic. As posted before, interbreeding will give us the best verson available.

ijor, please don't mind, but I really don't want to go further here, there is too much on my list. When the digitizing project is finished and all source codes are in the can, we can continue here. But I will take your point, of course.

  • Like 1
Link to comment
Share on other sites

This is what I translated so far.

 

I would assume .OR is the same as ORG. I am just questioning if .da should be translated to .byte or .dta, it is a long piece of programming. I am not sure if TurboBasicXL uses any self modifying code. If not, it can probably be assembled to run from a AtariMax or Williams cartridge. Would need to add bank switching code.

TurboBasicXL_MADS.ZIP

Link to comment
Share on other sites

I'm certainly impressed with the work which is going on for this TBXL Source! The Ultra Disassembler refers to this type of re-creation as "Pseudo-Source." Maybe that would be a good description for this. Wow, getting some of our really good assembler guys on this project and an "Ultimate Basic" is very possible, although we already have several truly good ones.

 

I've always thought of Basic XE as just a small notch above TBXL because it has (optional) string arrays which are very useful in some circumstances. BXE is a bit slower, but still no slouch as far as Basic goes. But I'm sure there are a lot of folks who have other opinions!

 

Congrats on your fine work, Luckybuck, and all those who help in this endeavor.

 

-Larry

Link to comment
Share on other sites

Thanks Larry, yes it is still a long way to go, but worth to go it.

 

Besides other Basic, please take into account the Integer BASIC from OSS. Else, an Ultimate Basic on a 64 KB cartridge?

 

Thanks peteym5 for the file. On AtariWiki you already will find a cartridge file created from Turbo-Basic XL.

Link to comment
Share on other sites

Just, IMHO, you have to make perfectly clear to anybody reading this page or your web site, what exactly comes from original sources and what from a reverse engineered work. e.g. the very same title of this thread is inaccurate.

 

I have to agree in this point. This thread announced the release of the source code of Turbo BASIC XL, which is not completely true, because we have found that it is not the same code than what we know as Turbo BASIC XL 1.5. This source code probably matches about 95% of it, but there is another 5% that is not from Frank. It seems to be a derivative work labeled as 2.0 and we don't know what are all the changes it includes for (we've already found at least two differences so far).

 

Frank has left us in 2011, there will be no original source code. The one published is as far as we can get. It is from someone with contact to Frank in the golden age. I didn't wrote 'original' source code. And objection: this is not a pure disassembly! There are many comments in the code, of course in German, but they are inside! A pure disassembly can't do that. All major points have comments, so the user can get into the code.

 

Of course, the labels and comments inside the 2.0 source will help the decompilation and reconstruction of the officially published version 1.5, but it will never be the "original" source code of this. Also, we don't know if the comments and labels were put in the source by Frank or by your contact.

 

Anyway, the point is that it should be adviced that the source code published in AtariWiki is for a different (probably unreleased) version of Turbo BASIC XL, and the title of this thread should be changed to show that, as well as a note in Turbo BASIC XL's AtariWiki page. The fact that the title does not say "original" does not mean that it is "not original". ;)

Link to comment
Share on other sites

Well what ever version this is, this is what I had translated so far to have it compile with Mads Assembler. I am very sure some of us will love to add a ton of commands and functions to this thing, but first thing is it figure out everything this Biblo assember did and its equivalents on other assemblers. We might need an utility to remove the line numbers.

 

Have a question about this:

 

03000 L0989 WORD #Y1277-1
03010 L0991 WORD /Y1277-1 ;Is this high and low?

I am not sure if preceding a label with # and / is for low and high address.

TurboBasicXLMads.zip

Edited by peteym5
Link to comment
Share on other sites

Hi,

 

Well what ever version this is, this is what I had translated so far to have it compile with Mads Assembler. I am very sure some of us will love to add a ton of commands and functions to this thing, but first thing is it figure out everything this Biblo assember did and its equivalents on other assemblers. We might need an utility to remove the line numbers.

 

Have a question about this:

 

03000 L0989 WORD #Y1277-1

03010 L0991 WORD /Y1277-1 ;Is this high and low?

 

I am not sure if preceding a label with # and / is for low and high address.

Yes, those are equivalent to "#<" and "#>" respectively.

 

Vitoco already posted the translated sources in post#16: http://atariage.com/forums/topic/265869-turbo-basic-xl-source-code-now-in-pd-and-online/?p=3768221

 

Problem is that, as we don't have the resulting binaries, you can't be sure even if the produced file works as intended.

Link to comment
Share on other sites

I just tried assembling it. The text on the splash screen is not correct. I will try something other than .byte like dta or .sb. It goes through the CIO in the OS to print the text on the screen, it is not copied directly.

The data tables also maybe off also.

I am also translating some of the German into English, and expanding out some of the labels so we have a better ideal what is going on.

Edited by peteym5
Link to comment
Share on other sites

I just tried assembling it. The text on the splash screen is not correct.

 

I'm sorry, I attached a wrong version, which I noticed and changed some minutes later, but I failed again and uploaded the same bad file... It was too late and I was tired.

 

Just do a global replace of all double quotes (") to turn them into single quotes ('). Then, it will compile OK in MADS. But as dmsc said, we need a binary compiled by BIBO assembler to be sure that it is really OK. I tried some hours ago unsuccessfully, and I'll try again in a couple of hours.

 

About the translation of the labels and comments into English, what do others think?

  • Like 1
Link to comment
Share on other sites

@dmsc: Well, we have the binary from the original program, please see attached. So, we have from the compiler and runtime.

 

@all:

 

Will try to get a compiled Bibo Assembler version out of it. If we can agree each other on one final format, I even would translate all German stuff into English.

 

With a good editor, UltraEdit, Sublime Text and even Word(!), one can cut columns out of the code... ;-)

 

Personally, I would prefer to have it in MAC/65 format, my all time favorite. MADS can cope with that format... ;-)

Atari_Ampel_Decoder_0.09.zip

TurboBasicXL.txt

Edited by luckybuck
Link to comment
Share on other sites

I already started translating and renaming stuff as I discover what stuff does. I am trying to determine what that extra byte does inside the token table. It must be necessary, something not present in other Atari Basics token tables. I am wondering if 2.0 is the fixed version that allows the timer to work properly on NTSC machines. Not sure if it checks the PAL register ($D014) to check the frame rate.

tb20-mads_pm.zip

Edited by peteym5
Link to comment
Share on other sites

@dmsc: Well, we have the binary from the original program, please see attached. So, we have from the compiler and runtime.

 

The attached zip contains a corrupted AtariAmpelDecoder.exe file. It is neither a Win/DOS nor an Atari program. Actually, it has a Win header but it is full with zeroes. Anyway, I decoded the TurboAtariXL.txt file manually and compared it to the 1.5 version XEX and it is OK. That would be our starting version for a source recovery.

 

I tried to assemble 2.0 sources using BIBO unsuccessfully. First, I had to convert the ATASCII files into a BIBO-tokenized form using ENTER+SAVE commands in BIBO, and rewrite the TURBO.IN file which I also SAVEd. The ASM command gave me a duplicated label error, which was not true: I searched inside all the files for it and there was only one declaration and one use of it. I renamed it to see what would happen. It failed again, but with a branch too far error. So, BIBO assembler is processing in a bad way the zero page addressing (using 2 bytes instead of only 1 in operands), it is proccessing a portion of the code twice, or it is not the right assembler (SYNASSEMBLER shares some of the special syntax with BIBO).

 

If someone completes the compilation from within the Atari (or emulator), without the use of a cross-compiler, please share the resulting binary.

 

  • Like 1
Link to comment
Share on other sites

I am able to assemble the MADS version and it works. It must be copied into an ATR file first with DOS present. It won't load with Altirra Boot or Load Image probably because it loads under the O/S. I have a theory about what that extra byte in the command token table is doing. Looks like it is controlling the indent for IF, FOR, PROC, WHILE, REPEAT, etc. when you type list. Could also be checking if you have the right amount of terminating statements like ENDIF, NEXT, WEND, UNTIL, etc. I know Basic XE does that also, but does not appear to have that extra byte in the token table.

 

I would prefer we try to optimize this TurboBasicXL before adding any new commands. We want to leave room for the Basic program. I already spotted something that can be done when trying to figure out that token thing.

Y1063  PHA
       JSR Y1083
       PLA

There is only one JSR Y1083 in there, and not called anywhere. Can just copy and paste the code in place of that JSR.

 

Now Y1083 looks like this:

Y1063
Y1083
       PHA
       CMP #$08
       BEQ ?L2
       CMP #$3C
       BEQ ?L2
       CMP #$3E
       BEQ ?L2
       CMP #$45
       BEQ ?L2
       CMP #$4F
       BEQ ?L2
       CMP #$07
       BEQ ?L4
       JSR Y1055
       BNE ?L3
?L1    DEC ZP0B9
       DEC ZP0B9
       BPL ?L3
?L2    INC ZP0B9
       INC ZP0B9
       BMI ?L1
?L3    PLA
       RTS
?L4    LDA STATE_PTR
       PHA
       JSR L0423
       PLA
       STA STATE_PTR
       CPX #$1B
       BNE ?L2       
       PLA
       RTS
Edited by peteym5
Link to comment
Share on other sites

@peteym5:

'I am able to assemble the MADS version and it works.'

with the file from post #38?

This was the one from #16. I had abandoned the other one since someone else already completed the work. I am working on translating and making the labels mean something to help everyone figure out what is going on.

Link to comment
Share on other sites

As I previously said, I've compiled the sources of Turbo BASIC XL 2.0 and the result is in the attached ATR. This double density MyDos 4.5 disk also includes BIBO Assembler, all the source files in BIBO internal (SAVE) format and a BASIC program to test FOR-NEXT loops.

 

"BIBOASS.COM" is the BIBO assembler. "TURBO.BIB" is the main source file, which must be LOADed in BIBO and it includes the "TUR??.BIB" files during the assembly. "TURBO.COM" is the BASIC interpreter. "FORNEXT.BAS" is the test program.

 

These are some screenshots:

 

Splash screen for version 2.0:

post-20192-0-17232000-1495741857.png

 

Cannot return to DOS:

post-20192-0-84193700-1495741872.png

 

ERROR-13 running a simple FOR-NEXT loop:

post-20192-0-50617900-1495742115.png

 

Have fun with this buggy/unfinished version/update of Turbo Basic XL 2.0. :-D

 

TBXL20.atr

  • Like 4
Link to comment
Share on other sites

Well, where do we have that again? Publishing that kind of source code means, it was not published as original, therefore no problems with the law, but in a kind the community can fix it, so we have it within the law. Hard work als always, but I am sure, we are on good way.

 

So, who finds the errors in Einstein's equations to overcome the light barrier? ;-)

Link to comment
Share on other sites

Is it properly pushing and popping the for-next commands from the basic stack? I already started looking into it. The next_cmd section looks identical to 1.5 except the start of the location is back by 4 few bytes.

 

Looks like the problem is originating with for "FOR-CMD" routine. (FOR-BEF if you had not renamed it yet)

  • Like 1
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...