Jump to content

Photo

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

TURBO-BASIC TURBO-BASIC XL Source Code

86 replies to this topic

#51 CharlieChaplin OFFLINE  

CharlieChaplin

    River Patroller

  • 2,481 posts

Posted Thu May 25, 2017 5:50 PM

@vitoco:

You are right, got it from here:

http://atariage.com/...d/#entry3762560

Same result here, the exe is empty, but the text files are fine.

Thank you! :-)

 

Hmm,

 

my "AtariAmpelDecoder.EXE" file is not completely empty, but it does not start under WIN XP, it gives a german error message instead: "Die Komponente COMDLG32.OCX oder eine ihrer Abhängigkeiten ist nicht richtig registriert: Eine Datei fehlt oder ist ungültig."  If you think Google translate is bad, my translation of this german text is even worse: "The component COMDLG32.OCX or one of its dependencies is not registered correctly: A file is missing or invalid."

 

Do you get the same (or a similar) Error message when you try to start the EXE file ? I also tried it under the WIN XP command prompt, but I got the same Error message... this is an *.EXE file, strip/remove the ZIP extender from the filename (upload of EXE did not work, so I added .ZIP, but the file is NOT zipped). On the other hand, you rarely find PC *.EXE files with a length of just 18Kbytes nowadays, so I would not be surprised if something is missing here...

Attached Files


Edited by CharlieChaplin, Thu May 25, 2017 5:52 PM.


#52 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Thu May 25, 2017 5:59 PM

Didn't try so far, but what excatly does that program? Reverse engineering of the object code?

Too many things to do, especially the coming HATZ...



#53 vitoco OFFLINE  

vitoco

    Chopper Commander

  • 209 posts

Posted Thu May 25, 2017 6:17 PM

 

my "AtariAmpelDecoder.EXE" file is not completely empty, but it does not start under WIN XP, it gives a german error message instead: "Die Komponente COMDLG32.OCX oder eine ihrer Abhängigkeiten ist nicht richtig registriert: Eine Datei fehlt oder ist ungültig."  If you think Google translate is bad, my translation of this german text is even worse: "The component COMDLG32.OCX or one of its dependencies is not registered correctly: A file is missing or invalid."

 

Do you get the same (or a similar) Error message when you try to start the EXE file ? I also tried it under the WIN XP command prompt, but I got the same Error message... this is an *.EXE file, strip/remove the ZIP extender from the filename (upload of EXE did not work, so I added .ZIP, but the file is NOT zipped). On the other hand, you rarely find PC *.EXE files with a length of just 18Kbytes nowadays, so I would not be surprised if something is missing here...

 

I called both from CMD prompt in Win7. Mine says "Error in EXE file", but your runs OK. I could extract the binary file from TurboBasicXL.txt.

 

BTW, I'm comparing all TurboBASIC XL 1.5 versions I got from anywhere against this extracted one, since I noticed diferences in some cases. I'll post the results.



#54 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Thu May 25, 2017 6:21 PM

https://atariwiki.or...=TURBO-BASIC XL



#55 CharlieChaplin OFFLINE  

CharlieChaplin

    River Patroller

  • 2,481 posts

Posted Thu May 25, 2017 7:30 PM

Well,

 

here are the TB XL versions I have (versions 1.4, 1.5, 1.6, 2.0, 2.1, 3.2q)

 

There were several patcher / modifier programs for TB XL 1.5, that changed small parts (a few bytes) of it, e.g.:

 

- a patcher/modifier program included with Turbo-DOS, that will patch TB XL so that it works with the Turbo 1050 enhancement and makes the turbo-driver reset-proof under TB XL

 

- a patcher/modifier program to change the (loading) colour of TB XL, changed my version to a blue loading colour ($70)

 

- a patcher/modifier program to make it work with an ST-mouse (from the Multi-Mouse diskette)

 

- a patcher/modifier program to make it work with 80 columns

 

- a patcher/modifier program for NTSC/60hz timing

 

- a patcher/modifier program to change the title (e.g. instead of the Happy-Computer logo and Turbo-Basic XL 1.5 it displayed Warp-Speed Basic or something else to make naive users think this is not TB XL - since TB XL was copyrighted by Happy Computer / Markt & Technik in the 80s)

 

and many others. I did not keep all of these patcher programs (think I still have the patcher programs from Turbo-DOs and the Multi-Mouse diskette, the patcher program for 80 columns is somewhere in the Abbuc PD library, the patcher programs to change the title/logo and/or the loading colour are not so important I think, the patched 60hz version of TB XL is quite common, etc.).

 

See also here:  http://atariage.com/...ic-xl-versions/

and here: http://atariage.com/...-3#entry3233750

Attached Files


Edited by CharlieChaplin, Thu May 25, 2017 8:06 PM.


#56 AtariGeezer ONLINE  

AtariGeezer

    River Patroller

  • 2,446 posts
  • Location:Santee, CA

Posted Thu May 25, 2017 8:23 PM

 

Hmm,

 

my "AtariAmpelDecoder.EXE" file is not completely empty, but it does not start under WIN XP, it gives a german error message instead: "Die Komponente COMDLG32.OCX oder eine ihrer Abhängigkeiten ist nicht richtig registriert: Eine Datei fehlt oder ist ungültig."  If you think Google translate is bad, my translation of this german text is even worse: "The component COMDLG32.OCX or one of its dependencies is not registered correctly: A file is missing or invalid."

 

Do you get the same (or a similar) Error message when you try to start the EXE file ? I also tried it under the WIN XP command prompt, but I got the same Error message... this is an *.EXE file, strip/remove the ZIP extender from the filename (upload of EXE did not work, so I added .ZIP, but the file is NOT zipped). On the other hand, you rarely find PC *.EXE files with a length of just 18Kbytes nowadays, so I would not be surprised if something is missing here...

You need the Visual Basic 6 Runtime Files for this to run.

http://download.cnet...4-10730950.html



#57 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Thu May 25, 2017 9:51 PM

 

here are the TB XL versions I have (versions 1.4, 1.5, 1.6, 2.0, 2.1, 3.2q)

 

- a patcher/modifier program for NTSC/60hz timing

 

I wonder if this VON 2.0 version is the one with the NTSC fix. Honestly I do not use Time$ that often, but all one need to do is check where Time$ routine is and modify it. I might even go a step further and add in a check the PAL register and divide whatever by 50 or 60.



#58 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Fri May 26, 2017 9:14 AM

I just found the cause of this FOR-NEXT issue. There is a BCC that is suppose to go to a RTS instruction.  I first narrowed it down to an issue when the final call to POP_1 occurs inside the final call to NEXT_CMD routine. It is attempting to do an extra POP from the Basic stack after the for-next has been completed invoking the error.

         JSR L0265
         BCS ?L3
         JSR L0625
         PLA
         JSR Y1098
         BCC ?L2  ;< ---- In TB 1.5 this branches to a RTS instruction 
         LDA #$11
         JSR Y1112
         LDA #$08
         JMP Y1043
?L3      JMP ERROR_11

What I did in the following Y1098 module, right before the final RTS was to add a label "Y1098_RET" and change that BCC ?L2 to BCC Y1098_RET.


Edited by peteym5, Fri May 26, 2017 9:29 AM.


#59 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Fri May 26, 2017 10:05 AM

Here is what I had done with TurboBasic XL so far. It is almost the same. It has the FOR-NEXT fix, and my slight optimization to the indent listing sections. I also noticed that 2.0 does not go back into DOS. Maybe next thing we need to fix.

 

Attached Files



#60 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Fri May 26, 2017 10:17 AM

Could you compare your binary with post #55 binary regarding 2.0?



#61 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Fri May 26, 2017 10:27 AM

We are not sure if that 2.0 is the same as "VON 2.0" as I am attempting to put the GO TO AtariDOS/MYDOS back into it. I guarantee my version is different now.

 

I noticed this basic is starting at $2080, but there is a lot of empty space before that. Maybe have room for the DUP.SYS. or different versions of DOS.



#62 vitoco OFFLINE  

vitoco

    Chopper Commander

  • 209 posts

Posted Fri May 26, 2017 10:33 AM

Could you compare your binary with post #55 binary regarding 2.0?

 

2.0 from this source is completely different to the one from post #55. The one that CharlieChaplin posted is a modified version of 1.5, but I haven't disassembled it yet to know what are the changes for, but they are different from other changes I saw. Also, the file structure changes a bit and it has extra code inside.



#63 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Fri May 26, 2017 10:34 AM

Thanks, in 1985 Frank has used the DOS 2.0 with TB. That is why the DIR command is included in TB. So, extracting it, would result in the use of other DOSs, but maybe difficult in the use of TB itself.



#64 dmsc OFFLINE  

dmsc

    Chopper Commander

  • 237 posts
  • Location:Viņa del Mar, Chile

Posted Fri May 26, 2017 10:37 AM

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.


The "extra byte" is the starting state of the parsing state-machine, this gives the instructions to parse the given statement.

For example, you have, for "COLOR" statement, the byte $91. This is the index 17 in the parsing table, pointing to address $EF04 (note that the disassembly in this thread is not correctly done, so the pointer is labeled to $EF03 instead).
The code at $EF04 is "8C 90 03", this means:
- $8C = parse using table 12 (like a subroutine call), this is "parse EXPR", then
- $90 = parse using table 16 (this is "parse EOS"), then
- $03 = return (parsed ok).

If you go to table 16, at address $EF3D, the code is "14 02 16 03", that means:
- $14 = accept token ":" (from OPTABLE)
- $02 = or...
- $16 = accept token EOL
- $03 = return.

And so on.
 

Possibly it would be better to decompile original 1.5 and use labels and comments from 2.0?  Anyway, looks like a solid piece of rewarding work!


I have a disassembly of the original TBXL15, with english labels and correctly decoded parsing tables, I started this disassembly years ago to understand the workings and find the bugs. I now have translated the sources to MADS, and assembly produced a bit-exact copy of the original (posted here) binary.

I was reluctant to post the code, as I'm not sure of the copyright, but I will try to cleanup a little and post over the weekend.

#65 vitoco OFFLINE  

vitoco

    Chopper Commander

  • 209 posts

Posted Fri May 26, 2017 10:43 AM

Here is what I had done with TurboBasic XL so far. It is almost the same. It has the FOR-NEXT fix, and my slight optimization to the indent listing sections. I also noticed that 2.0 does not go back into DOS. Maybe next thing we need to fix.

 

 

Instead of fixing this 2.0 source files, I'd prefer to know what was the original idea in this version/branch of the code. The DOS statement was disabled replacing few instructions (that could be recovered from 1.5), but the question is "why?". I've seen other variations of Turbo BASIC in the form of DOS.SYS, i.e. integrated with some DOS. Is there where this source was going to? 



#66 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Fri May 26, 2017 10:45 AM

TB VON 2.0 with DOS command restored to 1.5.

 

Attached Files



#67 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Sat May 27, 2017 10:35 AM

I was reluctant to post the code, as I'm not sure of the copyright, but I will try to cleanup a little and post over the weekend.

 

If the family is already posting 2.0 in PD, and the original was freeware they may not pursue anyone legally.

 

It is Basic XE, Basic XL, that may be concerned. I am not sure what became of ICD and OSS.



#68 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Mon May 29, 2017 10:13 AM

Thank you very much peteym5! Regarding your post #67: AtrariWiki has a go from OSS and ICD. Further, we have contacted Mike H. directly, whether we can or can not publish the FTe stuff. At least he didn't say no. Frank has left us in 2011, but his brother gave us a go for publishing. The family didn't have the source code anymore, but the rights on TB. All are very glad, that the spirit of these bright people can go on forever, live through us further and will be further develeoped. I really would like to focus on creating Ultimate Basic for Atari on a 64KB cartridge with compiler and runtime, including all the good sources we already have.


Edited by luckybuck, Mon May 29, 2017 10:16 AM.


#69 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Wed May 31, 2017 3:09 PM

Just by looking at the source code and attempting to debug it, and figure out what does what, I spotted one optimization already. I am trying to do it in areas that will not sacrifice any speed. I posted somewhere else that MYDOS leaves some room before $2080. I thought about backing up the start address a few pages and see if we can have a special MYDOS version with extra RAM.

 

64K cartridge Ultimate basic is possible. I know where I can have 64K Williams Cartridges burned and sold. Use the ability to turn the ROM area off and use the RAM underneath also. Williams uses close to the same Bank Switching scheme as AtariMax, except a different byte is written to turn off the ROM area. Would have to figure out how to make it backward compatible with both Basic XE and Turbo Basic XL. Would have to be token compatible with one. Would need to list your program to disk with one basic and use "enter" to load it into this new Ultimate Basic.



#70 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Wed May 31, 2017 3:16 PM

Hi peteym5,

 

please don't misunderstand me, the Ultimate Basic is just an crazy idea I have. But many of them came true... ;-)

 

First, I want to save all programs with magnetic layers, put them in the Wiki, then the 2nd edition of my PhD thesis and so on. So, that would be a long, long way to go still. I deeply concerned about box CX401, because I know of just 2 users who have the box and it is really time to make a backup after > 35 years...

 

Further, I prefer MADS for development...



#71 flashjazzcat ONLINE  

flashjazzcat

    Quadrunner

  • 12,462 posts
  • Location:United Kingdom

Posted Thu Jun 1, 2017 3:21 AM

Don't drop the start address below $2000. This is the lowest safe load address guaranteed to work on most systems. TBXL likely raised this by 128 bytes to accommodate extra DOS buffers.

#72 peteym5 OFFLINE  

peteym5

    Stargunner

  • 1,661 posts
  • Location:Buffalo NY USA

Posted Thu Jun 8, 2017 4:14 PM

I moved the Turbo Basic 2.0 to $2080, the same as 1.5. Leaves about 34,000 bytes available for programming. I got a little tied up with other projects and may get back to this Turbo Basic optimization sometime in the near future. I could not find a whole lot of of things I can optimize without sacrificing speed or function so far. 



#73 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Fri Jun 9, 2017 5:33 AM

Thanks peteym5,

 

Yes, same here. ;-)

 

But it is good to know, that the TB source code is now in the best hands. :-)))



#74 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,099 posts
  • Location:Chile

Posted Sat Jun 10, 2017 8:57 AM

 

Hmm,

 

my "AtariAmpelDecoder.EXE" file is not completely empty, but it does not start under WIN XP, it gives a german error message instead: "Die Komponente COMDLG32.OCX oder eine ihrer Abhängigkeiten ist nicht richtig registriert: Eine Datei fehlt oder ist ungültig."  If you think Google translate is bad, my translation of this german text is even worse: "The component COMDLG32.OCX or one of its dependencies is not registered correctly: A file is missing or invalid."

 

Do you get the same (or a similar) Error message when you try to start the EXE file ? I also tried it under the WIN XP command prompt, but I got the same Error message... this is an *.EXE file, strip/remove the ZIP extender from the filename (upload of EXE did not work, so I added .ZIP, but the file is NOT zipped). On the other hand, you rarely find PC *.EXE files with a length of just 18Kbytes nowadays, so I would not be surprised if something is missing here...

 

it works fine in my pc, I can see it translates some kind of file... thus, what is ampel ?



#75 luckybuck OFFLINE  

luckybuck

    Dragonstomper

  • Topic Starter
  • 649 posts

Posted Sat Jun 10, 2017 10:19 AM

Ampel was/is a program to type in hex code from program listings published in magazines in the golden age. It makes checksums, whether the type in was right or wrong, so the program can be executed the right way.







Also tagged with one or more of these keywords: TURBO-BASIC, TURBO-BASIC XL, Source Code

1 user(s) are browsing this forum

1 members, 0 guests, 0 anonymous users