RXB Posted April 13, 2011 Share Posted April 13, 2011 Ok REA is done and here it is. Has AMS support and some fixes. Tell me what you think. Included GPL Source and GPL*LOADER plus manuals. Also here is a Youtube to help out. RXB TEMP.zip 3 Quote Link to comment Share on other sites More sharing options...
lucien2 Posted April 13, 2011 Share Posted April 13, 2011 (edited) Wonderful , thanks! GROM >E000 * GROM HEADER BYTE >AA,>01,>01,>00 DATA >0000 * POWER UP DATA MENU DATA >0000 * DSRS DATA >0000 * SUBROUTINES DATA >0000,>0000 MENU BYTE >00,>00 DATA START STRI 'HELLO WORLD' * MAIN START FMT COL 2 ROW 2 HTEX 'HELLO, WORLD :)' FEND L1 B L1 END Edited October 9, 2016 by lucien2 Quote Link to comment Share on other sites More sharing options...
lucien2 Posted April 13, 2011 Share Posted April 13, 2011 (edited) I added OCR and bookmarks to the GPL manual: GPL Manual Edit: Direct link to the file Edited October 10, 2016 by lucien2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 13, 2011 Share Posted April 13, 2011 Please forgive my ignorance, as I may have missed a previous thread on this: Is this package essentially an enhanced assembler or is it for GPL programming only? Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 13, 2011 Share Posted April 13, 2011 Wow! You know what? I thought I had the 4A about 90% licked. Now I realise, after all these years, I've still got SO much to learn about this damn machine! It's like a frikin' mainframe! It's endless! I've just watched the video, and I'm 100% impressed, though much of it has gone over my head. I'm sure what it is I'm looking at! Mark Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 13, 2011 Share Posted April 13, 2011 I added OCR and bookmarks to the GPL manual: GPL Manual That link gives me an error when I click it. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 13, 2011 Share Posted April 13, 2011 I added OCR and bookmarks to the GPL manual: GPL Manual That link gives me an error when I click it. Worked for me. I just downloaded and printed the entire manual (>200 pages!) and I have been quickly scanning through it. It sounds to me that GPL is simply another form of assembly language, which then begs the question: what would the benefit be in using GPL versus standard AL? What am I missing here? Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 13, 2011 Share Posted April 13, 2011 Worked for me. I just downloaded and printed the entire manual (>200 pages!) and I have been quickly scanning through it. It sounds to me that GPL is simply another form of assembly language, which then begs the question: what would the benefit be in using GPL versus standard AL? What am I missing here? GPL is MUCH more compact than assembly language Quote Link to comment Share on other sites More sharing options...
marc.hull Posted April 13, 2011 Share Posted April 13, 2011 Worked for me. I just downloaded and printed the entire manual (>200 pages!) and I have been quickly scanning through it. It sounds to me that GPL is simply another form of assembly language, which then begs the question: what would the benefit be in using GPL versus standard AL? What am I missing here? GPL is MUCH more compact than assembly language Not really if you account for the GPL interpreter required to run it(sorry it was just hanging there for me to swipe at ). I wonder what the actual speed difference between assembled code and GPL is. Any benchmarks ? Quote Link to comment Share on other sites More sharing options...
RXB Posted April 13, 2011 Author Share Posted April 13, 2011 Please forgive my ignorance, as I may have missed a previous thread on this: Is this package essentially an enhanced assembler or is it for GPL programming only? This is a enhanced EA module. It includes ASM CONTROLLER for testing and writing programs using the AMS. i.e. set up Memory and AMS as you would like and test your programs. Also included in my Catalog/Directory program that is a smart loader. i.e. Bufferes the file and either loads and runs it or saves that location for secondary buffer use. You can use this module alone or with RXB as a complete package. The AMS control works best if not included with RXB as then you can use >6000 and >7000 memory as RXB is XB so uses that memory. So you could use REA like a Supercart, but uses AMS instead of ROM bank switching like a SuperCart does. With AMS and REA you have access to memory >2000,>3000,>4000,>5000,>6000,>7000, >A000,>B000,>C000,>D000,>E000,>F000 all at 4K boundries. As >8000,>9000 is memory mapped so unusable, but you do get 24K and 24K fully usable by REA and AMS. REA is in GROM so it does not care if a DSR is there or not. Just download and read the docs. Quote Link to comment Share on other sites More sharing options...
RXB Posted April 13, 2011 Author Share Posted April 13, 2011 I added OCR and bookmarks to the GPL manual: GPL Manual That link gives me an error when I click it. Worked for me. I just downloaded and printed the entire manual (>200 pages!) and I have been quickly scanning through it. It sounds to me that GPL is simply another form of assembly language, which then begs the question: what would the benefit be in using GPL versus standard AL? What am I missing here? Mostly what you are missing is Size of programs. A example is MOVE is a 7 byte command in GPL, that same command in Assembly would be ove 1.4K. MOVE will move any size of memory to any kind of memory. MOVE works with VDP, GRAM, GROM, ROM, RAM and VDP Registers. But remember only takes 7 bytes of memory to so this from GPL. I wrote a few articles on this, one is called COMPARING LANGUAGES. Quote Link to comment Share on other sites More sharing options...
RXB Posted April 13, 2011 Author Share Posted April 13, 2011 (edited) Worked for me. I just downloaded and printed the entire manual (>200 pages!) and I have been quickly scanning through it. It sounds to me that GPL is simply another form of assembly language, which then begs the question: what would the benefit be in using GPL versus standard AL? What am I missing here? GPL is MUCH more compact than assembly language Not really if you account for the GPL interpreter required to run it(sorry it was just hanging there for me to swipe at ). I wonder what the actual speed difference between assembled code and GPL is. Any benchmarks ? From my testing over the years I would rank speed on the TI as Assembly, Forth, C99, and GPL. But on emulators GPL runs just as fast as C, Forth or another other language as the Hardware delays are not needed. Mind you that I can do one heck of a lot more in GPL with 40K then anyone can do in Assembly as the TI had 640K of GPL module space built into the machine in 40K banks. 16 address lines at 40K each is 640K combined with the very small footprint of space used it is not a contest for over all capabilities. Very few people have every taken advantage of this amount of space and put it to use. I always wanted to be able to make a UNIX GPL module. Edited April 13, 2011 by RXB Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2011 Share Posted April 14, 2011 From my testing over the years I would rank speed on the TI as Assembly, Forth, C99, and GPL. But on emulators GPL runs just as fast as C, Forth or another other language as the Hardware delays are not needed. Mind you that I can do one heck of a lot more in GPL with 40K then anyone can do in Assembly as the TI had 640K of GPL module space built into the machine in 40K banks. 16 address lines at 40K each is 640K combined with the very small footprint of space used it is not a contest for over all capabilities. Very few people have every taken advantage of this amount of space and put it to use. I always wanted to be able to make a UNIX GPL module. So what you are saying is that GPL on real hardware is the slowest of the available languages (I assume XB is even slower), yet the learning curve is likely as steep as assembly, and the main advantage would be potential use of additional memory in external modules. While this might be advantageous for a few very specialized applications, I'm not sure it's worth the effort for most programmers when they can get faster execution speed with assembly... Unix in a cart might be a great idea, although I wonder if it would run too slowly if written in GPL. Besides, Tursi has demonstrated a great little hack with Linux in a cart at last year's Faire Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2011 Share Posted April 14, 2011 Mostly what you are missing is Size of programs. A example is MOVE is a 7 byte command in GPL, that same command in Assembly would be ove 1.4K. MOVE will move any size of memory to any kind of memory. MOVE works with VDP, GRAM, GROM, ROM, RAM and VDP Registers. But remember only takes 7 bytes of memory to so this from GPL. I wrote a few articles on this, one is called COMPARING LANGUAGES. 1.4K??? That can't be right. Can you clarify this for me? Quote Link to comment Share on other sites More sharing options...
RXB Posted April 14, 2011 Author Share Posted April 14, 2011 From my testing over the years I would rank speed on the TI as Assembly, Forth, C99, and GPL. But on emulators GPL runs just as fast as C, Forth or another other language as the Hardware delays are not needed. Mind you that I can do one heck of a lot more in GPL with 40K then anyone can do in Assembly as the TI had 640K of GPL module space built into the machine in 40K banks. 16 address lines at 40K each is 640K combined with the very small footprint of space used it is not a contest for over all capabilities. Very few people have every taken advantage of this amount of space and put it to use. I always wanted to be able to make a UNIX GPL module. So what you are saying is that GPL on real hardware is the slowest of the available languages (I assume XB is even slower), yet the learning curve is likely as steep as assembly, and the main advantage would be potential use of additional memory in external modules. While this might be advantageous for a few very specialized applications, I'm not sure it's worth the effort for most programmers when they can get faster execution speed with assembly... Unix in a cart might be a great idea, although I wonder if it would run too slowly if written in GPL. Besides, Tursi has demonstrated a great little hack with Linux in a cart at last year's Faire No TI BASIC is the worst of all of them as Basic is GPL with slow interupts and then interpeted. A double slowdown for using BASIC. When running GPL modules like GPL GAMES do you see that much of a difference, yea you can but timing shows only a 8% difference. And no the amount of writing in Assembly is way harder to do then GPL, GPL is way more easy to use then Forth or C. The reason why it is much more easy to use is the OS takes care of house keeping that every other language makes YOU the user keep track of. Keeping track of stuff is what Assembly sucks at, wastes space and bloats the programs. Yes Assembly is faster but is a huge memory hog and is harder to work with and debug, why C is so popular. And you miss the point of what I am saying, you put the menus and house keeping into GPL then put the Assembly into GPL GROM and run Assembly. That way the stuff Assembly sucks at (Menu, house keeping and Device access) it left to GPL which what GPL is designed for. Marry the two of them and you get great apps. RXB is Assembly and GPL. REA is GPL and Assembly. You can not say that Assembly is better only that it is faster, Assembly has only one single advantage, speed nothing else makes it better. I would love to see a Linux of Unix in the TI99. And like I said let GPL do what it does best and let Assembly do what it does best, you get best of both worlds that way. Quote Link to comment Share on other sites More sharing options...
RXB Posted April 14, 2011 Author Share Posted April 14, 2011 Mostly what you are missing is Size of programs. A example is MOVE is a 7 byte command in GPL, that same command in Assembly would be ove 1.4K. MOVE will move any size of memory to any kind of memory. MOVE works with VDP, GRAM, GROM, ROM, RAM and VDP Registers. But remember only takes 7 bytes of memory to so this from GPL. I wrote a few articles on this, one is called COMPARING LANGUAGES. 1.4K??? That can't be right. Can you clarify this for me? What can Assembly do with out the Support routines loaded? Answer nothing. You have a 1K support routine to load then you have to write a program to do the same thing as what GPL has built into the TI OS. Now you could right a hack to use the OS GPL routines and that would be the only way you could pull off using very little memory. So Assembly is a hog for memory, this is just a fact of life. If you look at the XB ROMS you will see MVUP and MVDN and these were the routines that TI wrote to do what GPL MOVE does, but the team that wrote them did not know about the GPL MOVE command in the OS at the time. The MVUP and MVDN routines are .4K and 1K support is needed to do the same thing outside of the XB module if you were to do it in Assembly, hence 1.4K Quote Link to comment Share on other sites More sharing options...
marc.hull Posted April 14, 2011 Share Posted April 14, 2011 From my testing over the years I would rank speed on the TI as Assembly, Forth, C99, and GPL. But on emulators GPL runs just as fast as C, Forth or another other language as the Hardware delays are not needed. Mind you that I can do one heck of a lot more in GPL with 40K then anyone can do in Assembly as the TI had 640K of GPL module space built into the machine in 40K banks. 16 address lines at 40K each is 640K combined with the very small footprint of space used it is not a contest for over all capabilities. Very few people have every taken advantage of this amount of space and put it to use. I always wanted to be able to make a UNIX GPL module. So what you are saying is that GPL on real hardware is the slowest of the available languages (I assume XB is even slower), yet the learning curve is likely as steep as assembly, and the main advantage would be potential use of additional memory in external modules. While this might be advantageous for a few very specialized applications, I'm not sure it's worth the effort for most programmers when they can get faster execution speed with assembly... Unix in a cart might be a great idea, although I wonder if it would run too slowly if written in GPL. Besides, Tursi has demonstrated a great little hack with Linux in a cart at last year's Faire No TI BASIC is the worst of all of them as Basic is GPL with slow interupts and then interpeted. A double slowdown for using BASIC. When running GPL modules like GPL GAMES do you see that much of a difference, yea you can but timing shows only a 8% difference. And no the amount of writing in Assembly is way harder to do then GPL, GPL is way more easy to use then Forth or C. The reason why it is much more easy to use is the OS takes care of house keeping that every other language makes YOU the user keep track of. Keeping track of stuff is what Assembly sucks at, wastes space and bloats the programs. Yes Assembly is faster but is a huge memory hog and is harder to work with and debug, why C is so popular. And you miss the point of what I am saying, you put the menus and house keeping into GPL then put the Assembly into GPL GROM and run Assembly. That way the stuff Assembly sucks at (Menu, house keeping and Device access) it left to GPL which what GPL is designed for. Marry the two of them and you get great apps. RXB is Assembly and GPL. REA is GPL and Assembly. You can not say that Assembly is better only that it is faster, Assembly has only one single advantage, speed nothing else makes it better. I would love to see a Linux of Unix in the TI99. And like I said let GPL do what it does best and let Assembly do what it does best, you get best of both worlds that way. Uh.... Seems to me GPL is nothing more than an interpreted language running in assembly. Wouldn't it just be better to have a library of useful assembly routines ? Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2011 Share Posted April 14, 2011 Marry the two of them and you get great apps. RXB is Assembly and GPL. Point taken. Now the dreaded question: how does one mix GPL and assembly into a single program since GPL is interpreted and assembly is compiled? Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 14, 2011 Share Posted April 14, 2011 (edited) I must say I am intrigued. I think the GPL manual is going to be my bedtime reading for the next few days Given that it's so similar to AL, I should not have too much difficulty going through it quickly. Edited April 14, 2011 by Vorticon Quote Link to comment Share on other sites More sharing options...
RXB Posted April 14, 2011 Author Share Posted April 14, 2011 Marry the two of them and you get great apps. RXB is Assembly and GPL. Point taken. Now the dreaded question: how does one mix GPL and assembly into a single program since GPL is interpreted and assembly is compiled? GPL is compiled and interpeted. When I compiled RXB or REA or any other cart it is a compiled program, but when I run it the OS interpetes the complied code and from there GPL can load Assembly and run it. Examples are CALL LOAD, CALL LINK and many other RXB routines. GRAMPACKER was a program that puts Assembly into GROMs and runs them. None of this stuff is hard to do or that complicated. When you do a CALL INIT from XB or BASIC using a EA cart you are loading Assembly from GPL. About 1/5th of all routines you run in XB are actually run from the GPL calling Assembly in the ROMs. Actually the main reason XB is so slow is the total lack of VDP memory and the insane number of times the Garbage collection is needed to clean up the mess. When you see XB pause for a second while using it, that is the Garbage collection trying to get more VDP memory that is used for Strings, numbers, Files, Variables, and copies of stuff. 16K is dinky really. Quote Link to comment Share on other sites More sharing options...
RXB Posted April 14, 2011 Author Share Posted April 14, 2011 I must say I am intrigued. I think the GPL manual is going to be my bedtime reading for the next few days Given that it's so similar to AL, I should not have too much difficulty going through it quickly. I am going to have to make a video of how to do that. 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted April 14, 2011 Share Posted April 14, 2011 I must say I am intrigued. I think the GPL manual is going to be my bedtime reading for the next few days Given that it's so similar to AL, I should not have too much difficulty going through it quickly. I am going to have to make a video of how to do that. Please do, would love to see the steps involved Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 14, 2011 Share Posted April 14, 2011 (edited) GPL is one of the 'last great mysteries' of the 4A for me. It's the one thing (now) that I have not touched. Rich, you could be guilty here of starting a GPL renaissance! For the record, I do agree that assembly on the 9900 is indeed a memory hog. It's biggest problem? The minimum instruction size is two bytes. We have 32K of ram, but you only actually have 16K of program space, as fas as I'm concerned. Contrast this with processors such as the Z80 and the 6502, and even modern Intel processors, which have byte oriented instructions. You get more code space with those processors. GPL on the other hand is a byte oriented, virtual machine. You get much more bang for your byte in GPL than you do with assembly. Of course, you are running in a VM, so your performance will suffer, but it should still turn a reasonable speed. I tell you want I would like to see in GPL? A conversion of a simple TI BASIC program. Let's say a program to bounce an asterisk around the screen? Then we will compare TI Basic with GPL and see the difference in speed? My hunch is that a 'raw GPL' (i.e. one that does not go back and forth into the TI BASIC interpreter) will be much faster than the TI BASIC program. Heck, just the fact that GPL is VM is as cool as hell, and makes me want to play with it! This kind of re-asserts what I was saying the other day. The little 4A, launched in 1981 was way way way more sophisticated than ANY of it's contemporaries. By a massive margin. Changing the subject a little: The word is, that GPL was actually going to be executed by a custom GPL processor. Imagine that! How fast would that have been? Anyway, I would like to see the GPL code for this program, and also a video of it compiling and running, with no CPU overdrive. 5 CALL CLEAR 10 X=5 20 Y=9 30 XD=1 40 YD=1 50 CALL HCHAR(Y,X,42) 60 X=X+XD 70 Y=Y+YD 80 IF X>32 THEN 130 90 IF X<1 THEN 160 100 IF Y>24 THEN 190 110 IF Y<1 THEN 220 120 GOTO 50 130 X=32 140 XD=-XD 150 GOTO 50 160 X=1 170 XD=-XD 180 GOTO 50 190 Y=24 200 YD=-YD 210 GOTO 50 220 Y=1 230 YD=-YD 240 GOTO 50 Mark Edited April 14, 2011 by Willsy Quote Link to comment Share on other sites More sharing options...
Tursi Posted April 14, 2011 Share Posted April 14, 2011 (edited) How about a direct compilation of a simple XB program into GPL? I offer because I already have that prepared here. GPL is /much/ faster than both BASICs. It's much SLOWER than assembly. Many early cartridges are written in GPL, like Zero Zap, A-Maze-Ing, and such - so you have seen the speed of GPL. GPL does tend to be more compact than assembly but it does have a limitation, it needs GROM to execute out of. That was why I made the GPL chip a year ago. Here's my example file. I wrote a tool to convert so this is a machine conversion, but as such it gives a nice 1:1 relationship. This is the configuration tool for my MPD project. (One note: I needed to write to GROM, which XB can't do, so I also snuck in the ability to drop MOVE commands in XB comments ). example.zip An excerpt: *470 GOSUB 1450 1AA7: CALL G@L1450 * 06,00,00, *480 CALL KEY(0,K,S) 1AAA: ST @>8374,>00 1AAD: SCAN *490 IF S=0 THEN 480 1AAE: BR G@L480 * Mapping 'k' to >8375 * BE,74,00,03,40,00, *500 CALL HCHAR(24,1,32,32) 1AB0: FMT 1AB1: COL 1 1AB3: ROW 24 1AB5: HCHAR 32,32 1AB7: ENDFMT * 08,FF,00,FE,17,5F,20,FB, *510 IF K=48 THEN 1010 1AB8: CEQ @>8375,>30 1ABB: BS G@L1010 * D6,75,30,60,00, It's a little messy, as it's the raw output of my converter, but it shows the XB statement, the GPL it was converted to, and after each block, the raw bytecode of the GPL. Edited April 14, 2011 by Tursi Quote Link to comment Share on other sites More sharing options...
lucien2 Posted April 14, 2011 Share Posted April 14, 2011 (edited) Anyway, I would like to see the GPL code for this program, and also a video of it compiling and running, with no CPU overdrive. Voilà! I used words for my variables, I don't know if it is better than bytes. I had to put the variables on CPU RAM, I don't know how to address the RAM extension (I try to locate them at >2000, but got a "gas error" ). GROM >E000 * GROM HEADER BYTE >AA,>01,>01,>00 DATA >0000 * POWER UP DATA MENU DATA >0000 * DSRS DATA >0000 * SUBROUTINES DATA >0000,>0000 MENU BYTE >00,>00 DATA START STRI 'BOUNCING *' * MAIN X EQU >8318 Y EQU >831A XD EQU >831C YD EQU >831E POS EQU >8320 START BACK >1C DST >1C1C,V@>384 DST 4,@X DST 8,@Y DST 1,@XD DST 1,@YD L1 DST @Y,@POS DSLL 5,@POS DADD @X,@POS ST 42,V@0(@POS) DADD @XD,@X DADD @YD,@Y DCGT 31,@X BS L2 DCGE 0,@X BR L3 DCGT 23,@Y BS L4 DCGE 0,@Y BR L5 B L1 L2 DST 31,@X DNEG @XD B L1 L3 DST 0,@X DNEG @XD B L1 L4 DST 23,@Y DNEG @YD B L1 L5 DST 0,@Y DNEG @YD B L1 END Edited October 9, 2016 by lucien2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.