Opry99er Posted November 13, 2010 Share Posted November 13, 2010 Yea--- I just need to shut up and listen and learn. I'm getting places--- slowly, but getting there. Quote Link to comment Share on other sites More sharing options...
insomnia Posted November 14, 2010 Share Posted November 14, 2010 Not to hype my own project (much), but my port of GAS has most of the parsing code required for an assembler written in C. It would take more work to split that stuff off into a complete assembler, but I imagine it wouldn't be too bad. If I have time after working on my other stuff, making an assembler library for the other IDE-like projects out there might be an interesting. You can never have too many tools, right? Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 14, 2010 Author Share Posted November 14, 2010 Not to hype my own project (much), but my port of GAS has most of the parsing code required for an assembler written in C. It would take more work to split that stuff off into a complete assembler, but I imagine it wouldn't be too bad. If I have time after working on my other stuff, making an assembler library for the other IDE-like projects out there might be an interesting. You can never have too many tools, right? Absolutely Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 14, 2010 Author Share Posted November 14, 2010 (edited) A new day, a new spectra2 example: Today I have been toying with multiple menu items on the TI selection screen. Remember from the previous examples, that when option 2 is selected from the TI selection screen, the spectra2 library initialisation routine (RUNLIB) is called which then jumps to MAIN. In the current example, I fiddled with the cartridge header to get multiple menu entries and to execute an own setup routine before entering RUNLIB. In this setup routine I load R0 with the address of the message I want to display. The RUNLIB initialisation routine clears scratch-pad memory, setup registers, VDP, etc. This process normally also resets all registers. With the only exception being R0. R0 is still intact when we reach MAIN and I use this register to pass-trough a parameter. Once we get into MAIN, I display the string on screen and that's it Could imagine storing multiple mini-games in an 8K ROM. That got me into trying the menu selection stuff. ********@*****@*********************@************************** AORG >6000 *-------------------------------------------------------------- * Cartridge header *-------------------------------------------------------------- GRMHDR BYTE >AA,1,1,0,0,0 DATA PROG4 ; Address of last menu item BYTE 0,0,0,0,0,0,0,0 PROG4 DATA PROG3 ; Address of next menu item DATA INIT4 MSG4 BYTE 14 TEXT 'FOURTH PROGRAM' PROG3 DATA PROG2 ; Address of next menu item DATA INIT3 MSG3 BYTE 13 TEXT 'THIRD PROGRAM' PROG2 DATA PROG1 ; Address of next menu item DATA INIT2 MSG2 BYTE 14 TEXT 'SECOND PROGRAM' PROG1 DATA 0 ; No more menu items following. DATA INIT1 MSG1 BYTE 13 TEXT 'FIRST PROGRAM' EVEN *-------------------------------------------------------------- * Include required files *-------------------------------------------------------------- COPY "D:\Projekte\spectra2\tms9900\runlib.a99" *-------------------------------------------------------------- * SPECTRA2 startup options *-------------------------------------------------------------- SPVMOD EQU GRAPH1 ; Video mode. See VIDTAB for details. SPFONT EQU FNOPT7 ; Font to load. See LDFONT for details. SPFCLR EQU >F0 ; Foreground/Background color for font. SPFBCK EQU >01 ; Screen background color. *************************************************************** * Execute this before RUNLIB ********@*****@*********************@************************** INIT1 LI R0,MSG1 ; String 'First program' JMP RUNINI INIT2 LI R0,MSG2 ; String 'Second program' JMP RUNINI INIT3 LI R0,MSG3 ; String 'Third program' JMP RUNINI INIT4 LI R0,MSG4 ; String 'Fourth program' RUNINI MOV R0,@>8300 ; R0 in the SPECTRA2 workspace, not the GPL workspace (!) B @RUNLIB ; Initialize SPECTRA2 library *************************************************************** * Main ********@*****@*********************@************************** MAIN LI TMP0,>0169 ; VDP target address in PNT table (Pattern Name Table), row 11/col 9. MOVB *R0+,TMP2 ; Get string length into TMP2. SRL TMP2,8 ; Move high byte into low byte. MOV R0,TMP1 ; Address of string to display. BL @XPYM2V ; Dump string to VDP memory. B @TMGR ; Handle FCTN-QUIT key, etc. END FYI: I had to bug-fix the RUNLIB initialisation routine. This example will not work with the WIP version I sent to some of you guys yesterday. Edited November 14, 2010 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 14, 2010 Share Posted November 14, 2010 Awesome, man. =) I haven't even had a chance to LOOK at your file yet... been so busy trying to get some assembly stuff working on my Baby Steps thread and then I had a show last night. I'm having an issue on the program I'm writing over there... but I'll leave that for THAT thread. =) Can't wait to get a chance to look at your libraries. =) Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 14, 2010 Author Share Posted November 14, 2010 (edited) No rush Owen. Actually it's a very good idea to do the baby steps without using any additional libraries. That way you can get used to normal register usage, etc. Edited November 14, 2010 by retroclouds Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 28, 2010 Author Share Posted November 28, 2010 ok, here's a status update: In the last two weeks I've been writing some documentation for spectra2. Progress on that is slow, because it's soooo boring Today I did some testing. I'm converting Honeycomb Rapture to a cartridge. Progres was real good. I did struggle with a very *nasty* bug in the library code causing an 'illegal opcode' when converting numbers. Did manage to resolve, so that's one more bug gone. In the last two weeks, I've been seriously playing around with designing a basic-like language that will cross-compile into assembly language using spectra2. The "compiled" code should run on an unexpanded TI-99/4A So something in the style of batari basic, but a lot more limited (at least in the beginning). It seems as the next step really. It's kinda fun writing little code snippets in this new language and writing the matching assembly language. All of this on paper ofcourse. The idea is that I get some kind of language specification first. We'll see how it goes.... Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 28, 2010 Share Posted November 28, 2010 (edited) That's a very interesting idea... I know we've talked about it in the past, but to see it happen... that would be pretty amazing. I'd like to see a real thread array for multiple elements that need to be threaded in a game loop. Something like Thread Thread{timer} -DEC 1 PER 10 Thread{clicker} -INC 1 PER 15 Thread{score} -INC 1 PER 5 . . . Imagine this like: THREAD syntax: CALL THREAD(T,C,S)=100,-1,10""0,1,15""0,50,5 The T, C, and S represent "Timer", "Clicker", and Score. The 3 sets of numbers indicate "starting value", "modification", and "thread count". In this case, Timer starts at 100, decrements every 10 cycles. Clicker starts at 0 and increments every 10 cycles. Score starts at 0 and increases by 50 every 5 cycles. Of course I'm probably not thinking on the level of assembly speed. In BASIC, you can get REAL use out of the cycles, as they can be quite a bit slower than 1/60th of a second. I'm just thinking about what I wish TI BASIC and XB had. What I'm describing above might be much more simply accomplished in assemnbly because of its great speed advantage--- maybe I just wish TIB and XB had something like this... to make the process SIMPLE Edited November 28, 2010 by Opry99er Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 29, 2010 Author Share Posted November 29, 2010 Owen, a package exists to do multithreading in Extended Basic. I didn't try it out yet. Check out the TI Technical pages here for the gory details. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted December 16, 2010 Author Share Posted December 16, 2010 ok, currently still working on the documentation. Here's a drawing I did for describing the thread scheduler: (A) +--------------------------+ (B) ................................> | Read VDP status register | <....................... . +-------------.------------+ . . | . . VDP int flag set? . . | . . __________________|____________________ . . Y | | N . . | | . . +-------------.------------+ Speech player on? . . | Do internal housekeeping | | . F . | | +---------.---------+ . A . | * Unblock kernel thread | | Run speech player | . S . | * Unblock user hook | +---------.---------+ (*) . T . | * Update tick counter | | . . +-------------.------------+ Kernel thread unblocked/enabled? . . | | . . +---------.--------+ +--------.--------+ . . | Update slot data | <............ | Set block flag | . . | counter, etc. | . | and run | . . +---------.--------+ . | kernel thread | . . | . +--------.--------+ (*) . . Internal counter = target count in slot? . | . . | . User hook unblocked/enabled? . . +-----.-----+ . | . . | Run slot | . +-------.-------+ . . +-----.-----+ (*) . | Run user hook | . . | . +-------.-------| (*) . . Last slot done? . . . . __________________|___________ . ........>......... . Y | | N . . | | . . +-----.------+ +------.------+ . . | Reset tick | | Prepare for | . . | counter | | next slot | . . +-----.------+ +------.------+ . . . . . ....<...... ......>..... (A) = Executed once per frame (1/60th for NTSC, 1/50th for PAL) (B) = User hook repeats until blocked from user hook code. Kernel thread (sound player, keyboard scan) runs once per frame. (*) = Skipped depending on result of check EDIT: The drawing was done using Jave (Java ASCII Versatile Editor), a nice ASCII drawing program. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted December 17, 2010 Share Posted December 17, 2010 ok, here's a status update: In the last two weeks I've been writing some documentation for spectra2. Progress on that is slow, because it's soooo boring Today I did some testing. I'm converting Honeycomb Rapture to a cartridge. Progres was real good. I did struggle with a very *nasty* bug in the library code causing an 'illegal opcode' when converting numbers. Did manage to resolve, so that's one more bug gone. Maybe we could find something like Doxygen for assembly and adapt it to 9900 source? Maybe Doxygen would ignore our code if we followed the standard commenting conventions for C/C++? I would be easy enough to write a program to strip the comments prior to assembly so the assembler does not get bent out of shape with the comments. I'm very disciplined with commenting, and for C/C++ source Doxygen makes doing the documentation automatic. But yeah, documentation can be very boring. In the last two weeks, I've been seriously playing around with designing a basic-like language that will cross-compile into assembly language using spectra2. The "compiled" code should run on an unexpanded TI-99/4A So something in the style of batari basic, but a lot more limited (at least in the beginning). It seems as the next step really. I started doing the same thing, it is called GameScript (gs for short) and is still very far from being functional. As I was writing it, I started to think that is paralleled Spectra quite a bit, but more like a wrapper instead of a library. It's kinda fun writing little code snippets in this new language and writing the matching assembly language. All of this on paper of course. The idea is that I get some kind of language specification first. We'll see how it goes.... The part where you write a function to do something like an HCHAR equivalent is fun and pretty straight forward. The hard part comes when you start having to deal with variables, language constructs (IF, ELSE, WHILE, FOR, SWITCH, BREAK, CONTINUE, etc.), and expression handling. That stuff is where you don't have a 1:1 relationship between a statement and an assembly routine to implement the statement. You have to write a tokenizer, parser, build a parse tree, symbol table, etc. and either do code generation (which you subsequently assemble, or write object code directly) or write an interpreter to execute the code. I was unsure if my GameScript language was going to be compiled or interpreted. I was leaning towards compiled until I started messing with MSX1 BASIC, which is really very nice compared to TI BASIC or XB. But I don't like the line number requirement (of any BASIC), which makes doing the "immediate mode" of BASIC very hard. Matthew Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted December 17, 2010 Author Share Posted December 17, 2010 (edited) Maybe we could find something like Doxygen for assembly and adapt it to 9900 source? Maybe Doxygen would ignore our code if we followed the standard commenting conventions for C/C++? I would be easy enough to write a program to strip the comments prior to assembly so the assembler does not get bent out of shape with the comments. I'm very disciplined with commenting, and for C/C++ source Doxygen makes doing the documentation automatic. But yeah, documentation can be very boring. I try to comment my code real good. The thing is that you have to be an experienced assembly coder to understand what's going on. So this time, I'm also doing a beginner tutorial and also trying to give some tips&tricks how to make best use of it. Actually at this stage I haven't described any functions yet, more describing the library itself, memory & register usage, etc. In the last two weeks, I've been seriously playing around with designing a basic-like language that will cross-compile into assembly language using spectra2. The "compiled" code should run on an unexpanded TI-99/4A So something in the style of batari basic, but a lot more limited (at least in the beginning). It seems as the next step really. I started doing the same thing, it is called GameScript (gs for short) and is still very far from being functional. As I was writing it, I started to think that is paralleled Spectra quite a bit, but more like a wrapper instead of a library. Cool. Looking forward learning more about it. Do you have more details you can share ? The new language I'm working will be using spectra2 as the "OS" layer pretty much. It will be a restricted language though (at least in the first versions). I don't have a name for it yet. Project name will be "Io" (as the Jupiter moon) *] It will be a compiled language. No interpreter. A cross-compiler on the PC will output TMS9900 assembly language source code. In the first revisions you'll have to run the source code through winasm99. At a later stage an assembler could be included in the compiler binary. *] 4 register variables to your disposal ($A, $B, $C, $D) Will map to registers R0, R1, R2, R3 (those aren't used by spectra) *] You'll have access to scratch-pad memory locations. No private variables. It's kinda fun writing little code snippets in this new language and writing the matching assembly language. All of this on paper of course. The idea is that I get some kind of language specification first. We'll see how it goes.... The part where you write a function to do something like an HCHAR equivalent is fun and pretty straight forward. The hard part comes when you start having to deal with variables, language constructs (IF, ELSE, WHILE, FOR, SWITCH, BREAK, CONTINUE, etc.), and expression handling. That stuff is where you don't have a 1:1 relationship between a statement and an assembly routine to implement the statement. You have to write a tokenizer, parser, build a parse tree, symbol table, etc. and either do code generation (which you subsequently assemble, or write object code directly) or write an interpreter to execute the code. I was unsure if my GameScript language was going to be compiled or interpreted. I was leaning towards compiled until I started messing with MSX1 BASIC, which is really very nice compared to TI BASIC or XB. But I don't like the line number requirement (of any BASIC), which makes doing the "immediate mode" of BASIC very hard. Matthew Yes, true but that makes it also very interesting. Not starting any implementation yet. But I have a pretty clear idea on how it will have to interface with spectra2. Could image using the Gold Parser builder for doing some experiments. To seperate the two projects, I should be starting a new thread and post some sample snippets. As said, these are all still just ideas. I've heard about MSX1 BASIC, but the strange thing is that I haven't found any manual for it. Edited December 17, 2010 by retroclouds Quote Link to comment Share on other sites More sharing options...
matthew180 Posted December 19, 2010 Share Posted December 19, 2010 Cool. Looking forward learning more about it. Do you have more details you can share ? Sure. It clears the screen to green on black, loads a nice character set, and runs a function that I'm currently testing. It is really just a collection of some functions right now. I was still kicking around the idea of interpreted vs. compiled and whether there would be an "immediate mode" like traditional ROM BASIC's. I think I was leaning towards a format like current "scripting" languages like PHP or Phython (both of which have an immediate mode, but still accept a file input.) Yes, true but that makes it also very interesting. Not starting any implementation yet. But I have a pretty clear idea on how it will have to interface with spectra2. Could image using the Gold Parser builder for doing some experiments. To seperate the two projects, I should be starting a new thread and post some sample snippets. As said, these are all still just ideas. Wow, I have never seen that GOLD Parser before. Very cool program! How come every post you make you include some link to a site I have never seen? And I go looking for that kind of stuff all the time! From now on you have to post a cool site every day. I've heard about MSX1 BASIC, but the strange thing is that I haven't found any manual for it. Yeah, same here. Actually I found a Portuguese version... The MSX community is really a strange thing. It appears big and active, but when you start to get involved it seems very shallow and inactive. Maybe because there were *so* many companies making the systems... I looked high and low for an MSX1 reference and was directed to the RuMSX emulator (http://www.lexlechz.at/en/msx.html). Its help file has a reference for MSX1 and MSX2 BASIC. I compiled all the MSX1 basic commands into a text file for my own sanity which I will attach to this post. msx1_basic_quickref.txt Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted January 9, 2011 Author Share Posted January 9, 2011 Found a nasty bug in the memory-to-memory copy function. That's kinda scary as it's one of the oldest subroutines in the library. I thought I had tested it quite carefully, guess not. I need special treatment for odd source/target memory addresses. Have to add it to my test set. Other than that: I'm catching up with the reference manual. I've got the basic functionalities covered. Now I only need to describe the available subroutines. Well that's still quite a task though Quote Link to comment Share on other sites More sharing options...
Opry99er Posted January 13, 2011 Share Posted January 13, 2011 Hey Filip... if there's anything I can do to help you with this project, please let me know... Even if it's just testing parts or something... I believe this is one of the most useful software/programming projects I've seen in a long while... and while I'm not much of an assembly programmer, I have SOME ability. =) And I have plenty of source examples I could type in or copy and paste. Obviously I'm not qualified as a BETA tester for this, but I'd love to give you a hand if needed. =) Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted January 13, 2011 Author Share Posted January 13, 2011 (edited) Hey Filip... if there's anything I can do to help you with this project, please let me know... Even if it's just testing parts or something... I believe this is one of the most useful software/programming projects I've seen in a long while... and while I'm not much of an assembly programmer, I have SOME ability. =) And I have plenty of source examples I could type in or copy and paste. Obviously I'm not qualified as a BETA tester for this, but I'd love to give you a hand if needed. =) Hi Owen, thanks for asking, there are a couple of things I can think about a) Continue with the Honeycomb Rapture cartridge conversion I worked on. I mean it's almost finished, the game is playable. The only thing still missing is the UFO stage, and the sweep sound when you get killed by a bee. Would be a good way to play around with the library and get me some feedback. Idea: instead of the sweep sound you could also add a new tune. I also considered adding a high score and introducing a timer limit. Didn't follow up on that. After all it's your game I think that even in it's current shape it's almost ready for a cartridge release. Reminds me it should be listed on the Projects page b) I'd really like a native speaker to review the reference manual before releasing it. That would really help a lot. Hey, would you mind if the source code for Honeycomb Rapture is added as a "sample game" for spectra2 ? Edited January 13, 2011 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted January 13, 2011 Share Posted January 13, 2011 Filip.. anything I can do to be of assistance, yes. I would be happy to review your manual and give you some notes. I studied the English language in college pretty extensively and am an avid reader and writer. In other words, I am a pretty decent proof-reader. =) As far as Honeycomb is concerned, man do whatever you want with that game/code. I wrote that game not thinking much of it, but you've made it into something very cool. =) The source is actually yours ANYWAY... I just did a hack job in XB, made it work, and you've turned it into something actually useful!!! As far as music, yea man. I can whip up a nice little sad piece for the death screen. =) Take me 5 minutes of uninterrupted TI time though... That's rare anymore. hehe I'll do what I can to finish Honeycomb... But without seeing what all you've done and understanding at least SOMETHING about your library, I don't think I could be much help on the coding side. Assembly is a foreign language to me that I understand a little and speak a little. It would be like me travelling to Mexico and trying to finish writing a book in Spanish knowing a total of about a hundred words in Spanish. =) But your manual for the library may just be the Spanish dictionary I need!!! I'll help in any way I can. I'm just grateful to you for working so diligently on this project and on Honeycomb. It means alot to me and to the community. When Honeycomb is in cartridge form and flying off the shelves of all the major department stores (and Wal-Mart), it will be YOUR doing. =) I'll shoot for 10,000,000 sales by the end of 2012.... that's not out of line, do you think? =) Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted January 13, 2011 Author Share Posted January 13, 2011 (edited) Thanks :thumbsup: By the way, while working on the conversion I had to play it alot. The tune is very, very catchy I'll send you the latest source code for Honeycomb Rapture together with the draft of the reference manual. I added a lot of comments to the source code, so you should be able to follow. If not, just ask. I'll try to explain. First step you could do, is to get it to assemble as a cartridge binary using winasm99 Edited January 13, 2011 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted January 13, 2011 Share Posted January 13, 2011 Thanks for the compliment on the tune. I would like to think that, while my programming skills aren't incredible, that I can write some decent music. I've never used Win99asm.... I've only ever used the TI assembler in Classic99. It is very forgiving and accepts all kinds of crap that the original Ed/Asm wouldn't axcept. Tursi did a fantastic job on that one. I'll definitely give it a good look today... Don't know what kind of coding work I'll be able to do right now, but I'll do my best. thanks again, Filip. You're an inspiration!! Quote Link to comment Share on other sites More sharing options...
Opry99er Posted January 17, 2011 Share Posted January 17, 2011 Hey Filip... I'm about 20 pages into these docs. There have been a few typos and grammatical issues, but I have highlighted them and can go back and make some editor's changes if you'd like. It's very well written, man. =) Great job Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted January 17, 2011 Author Share Posted January 17, 2011 Hey Filip... I'm about 20 pages into these docs. There have been a few typos and grammatical issues, but I have highlighted them and can go back and make some editor's changes if you'd like. It's very well written, man. =) Great job Hi there Owen! Yes please, that would be so cool Thanks man! Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted January 17, 2011 Author Share Posted January 17, 2011 (edited) Haven't done any spectra2 demos in a while. So here's a short one that kinda shows the "PUTBOX" functionality. ********@*****@*********************@************************** AORG >6000 *-------------------------------------------------------------- * Cartridge header *-------------------------------------------------------------- GRMHDR BYTE >AA,1,1,0,0,0 DATA PROG BYTE 0,0,0,0,0,0,0,0 PROG DATA 0 DATA RUNLIB HW BYTE 5 TEXT 'SPIKE' *-------------------------------------------------------------- * Include required files *-------------------------------------------------------------- COPY "D:\Projekte\spectra2\tms9900\runlib.a99" *-------------------------------------------------------------- * SPECTRA2 startup options *-------------------------------------------------------------- SPVMOD EQU GRAPH1 ; Video mode. See VIDTAB for details. SPFONT EQU FNOPT7 ; Font to load. See LDFONT for details. SPFCLR EQU >F0 ; Foreground/Background color for font. SPFBCK EQU >01 ; Screen background color. *************************************************************** * Main ********@*****@*********************@************************** MAIN BL @FILV DATA >0380,>0F,16 ; Setup color table BL @CPYM2V DATA >0800,PSPIKE,47*8 ; Load patterns BL @PUTBOX DATA >0505,>0809,TSPIKE ; Row >05, Column >05, Width 8, Height 9 DATA >0F07,>0303,TARROW ; Row >0F, Column >07, Width 3, Height 3 DATA >0513,>0809,TSPIKE ; Row >04, Column >13, Width 8, Height 9 DATA >0F15,>0303,TARROW ; Row >0F, Column >15, Width 3, Height 3 DATA EOL ; End-of-List B @TMGR ; Handle FCTN-QUIT key, etc. *************************************************************** * Spike - Tiles *************************************************************** TSPIKE BYTE 9*8 BYTE >00,>01,>02,>00,>03,>00,>00,>00 BYTE >04,>05,>06,>07,>08,>09,>00,>00 BYTE >00,>0A,>0B,>0C,>0D,>0E,>00,>00 BYTE >00,>0F,>10,>11,>12,>13,>14,>15 BYTE >00,>16,>17,>18,>19,>1A,>1B,>1C BYTE >1D,>1E,>00,>1F,>20,>21,>22,>00 BYTE >00,>00,>00,>23,>24,>25,>00,>00 BYTE >00,>00,>00,>00,>26,>27,>00,>00 BYTE >00,>00,>00,>00,>00,>28,>00,>00 *************************************************************** * Arrow - Tiles *************************************************************** TARROW BYTE 3*3 BYTE >29,>05,>00 BYTE >2A,>05,>2B BYTE >2C,>2D,>2E *************************************************************** * Spike - Patterns *************************************************************** PSPIKE DATA >FFFF,>FFFF,>FFFF,>FFFF ; 00 DATA >FFFF,>FFFF,>F0C0,>8080 ; 01 DATA >FFFF,>FFFF,>1F07,>0301 ; 02 DATA >FFFF,>FFFF,>FFE7,>C381 ; 03 DATA >FFFF,>FEFE,>FEFE,>FEFF ; 04 DATA >0000,>0000,>0000,>0000 ; 05 DATA >0100,>0000,>0000,>0000 ; 06 DATA >FFFE,>FCF8,>F0E0,>C080 ; 07 DATA >0000,>0000,>183C,>7EFF ; 08 DATA >FF7F,>3F0F,>0703,>0100 ; 09 DATA >0080,>C0E0,>F8FF,>FFFF ; 0A DATA >0000,>0000,>0080,>8000 ; 0B DATA >0101,>0000,>0000,>0000 ; 0C DATA >FFFF,>FF7F,>3F1F,>0F07 ; 0D DATA >80C0,>E0F1,>FFFF,>FFFF ; 0E DATA >FFFF,>FFFF,>FEFE,>FEFE ; 0F DATA >0000,>0000,>0406,>0F0F ; 10 DATA >0000,>0000,>0000,>0080 ; 11 DATA >0301,>0000,>0000,>0000 ; 12 DATA >FFFF,>FF7F,>3F1F,>0F07 ; 13 DATA >FFFF,>FFFF,>FCF8,>F8F0 ; 14 DATA >FFFF,>FFFF,>7F3F,>3F3F ; 15 DATA >FEFC,>F8F8,>F0E0,>C080 ; 16 DATA >0F0F,>0F1F,>1F3F,>7FFF ; 17 DATA >C0E0,>F0F8,>FCFE,>FFFF ; 18 DATA >0000,>0000,>0000,>0101 ; 19 DATA >0301,>0080,>C0E0,>F0F8 ; 1A DATA >F0F0,>E060,>0000,>0001 ; 1B DATA >7F7F,>7F7F,>FFFF,>FFFF ; 1C DATA >FFFE,>FCFC,>FCFE,>FFFF ; 1D DATA >0103,>070F,>1F3F,>FFFF ; 1E DATA >FFFF,>FFFE,>FEFE,>FEFC ; 1F DATA >0103,>0303,>0707,>070F ; 20 DATA >FCFE,>FFFF,>FFFF,>FFFF ; 21 DATA >0101,>0383,>FFFF,>FFFF ; 22 DATA >FCFC,>FCFC,>FCFE,>FFFF ; 23 DATA >0F0F,>0F07,>0301,>0080 ; 24 DATA >FFFF,>FFFF,>FFFF,>FF7F ; 25 DATA >E0F0,>F8FC,>FEFF,>FFFF ; 26 DATA >3F1F,>0F07,>0301,>81C1 ; 27 DATA >E3FF,>FFFF,>FFFF,>FFFF ; 28 *************************************************************** * Arrow - Patterns *************************************************************** DATA >F8F8,>F8F8,>F8F8,>F8F8 ; 29 DATA >F8F8,>F8F8,>F800,>80C0 ; 2A DATA >FFFF,>FFFF,>FF07,>0F1F ; 2B DATA >E0F0,>F8FC,>FEFF,>FFFF ; 2C DATA >0000,>0001,>0307,>8FDF ; 2D DATA >3F7F,>FFFF,>FFFF,>FFFF ; 2E END And this is what you get: Following tools were used: Google , Microsoft Paint, Irfanview, Magellan, notepad++, spectra2, winasm, classic99 Edited January 17, 2011 by retroclouds Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted February 6, 2011 Author Share Posted February 6, 2011 (edited) ok, guess it's time for a quick status update Lately I've been mainly working on the documentation, doing some bug-fixing and adding a few missing subroutines. It's good to take a break for a while and then come back and review the code. Today, I hacked together a little demo while working on the random routine. http://www.youtube.com/watch?v=QvTGy-1K85U See the source code below: ********@*****@*********************@************************** AORG >6000 *-------------------------------------------------------------- * Cartridge header *-------------------------------------------------------------- GRMHDR BYTE >AA,1,1,0,0,0 DATA PROG BYTE 0,0,0,0,0,0,0,0 PROG DATA 0 DATA RUNLIB MSG0 BYTE 14 TEXT 'RANDOM NUMBERS' *-------------------------------------------------------------- * Include required files *-------------------------------------------------------------- COPY "D:\Projekte\spectra2\tms9900\runlib.a99" *-------------------------------------------------------------- * SPECTRA2 startup options *-------------------------------------------------------------- SPVMOD EQU GRAPH1 ; Video mode. See VIDTAB for details. SPFONT EQU FNOPT2 ; Font to load. See LDFONT for details. SPFCLR EQU >30 ; Foreground/Background color for font. SPFBCK EQU >01 ; Screen background color. *-------------------------------------------------------------- * Variables *-------------------------------------------------------------- BUFFER EQU >8340 ; Buffer for PUTNUM (5 bytes) TIMERS EQU >8370 ; Address of timer table (12 bytes) *************************************************************** * Main ********@*****@*********************@************************** MAIN BL @PUTAT DATA >000A,MSG0 ; Show "RANDOM NUMBERS" on row 0, column 10 BL @PUTAT DATA >0302,MSG1 ; Show "RANGE 0-65536...:" on row 3, column 2 BL @PUTAT DATA >0502,MSG2 ; Show "RANGE 0-100.....:" on row 5, column 2 *************************************************************** * Prepare threads ********@*****@*********************@************************** MOV @ZTITAB,@WTITAB ; Setup timer table MOVB @BD2,@BTIHI ; Set highes slot in use BL @MKSLOT ; Allocate 3 timers DATA >0001,SLOT0 ; Slot 0, run every 1 tick DATA >0120,SLOT1 ; Slot 1, run every 32 ticks DATA >0201,SLOT2,EOL ; Slot 2, run every tick B @TMGR ; Handle FCTN-QUIT key, etc. ZTITAB DATA TIMERS ; Address of timer table *************************************************************** * Thread 0 - Display random number on row 3, column 21 ********@*****@*********************@************************** SLOT0 BL @RND DATA >FFFF ; Random number in range 0-65536, returned in TMP0 BL @PUTNUM ; P3HB=>30 (ASCII Offset for 0), P3LB=>30 (left-pad with digit 0) DATA >0315,TMP0HB,BUFFER,>3030 B @SLOTOK ; Exit thread *************************************************************** * Thread 1 - Display random number on row 5, column 21 ********@*****@*********************@************************** SLOT1 BL @RND DATA 100 ; Random number in range 0-100, returned in TMP0 BL @PUTNUM ; P3HB=>30 (ASCII Offset for 0), P3LB=>20 (left-pad with white-space) DATA >0515,TMP0HB,BUFFER,>3020 B @SLOTOK ; Exit thread *************************************************************** * Thread 2 - Display random characters on lower part of screen ********@*****@*********************@************************** SLOT2 BL @RND DATA 544 AI TMP0,7*32 BL @XVPUTB ; Put character on screen B @SLOTOK ; Exit thread MSG1 BYTE 17 TEXT 'RANGE 0-65536...:' MSG2 BYTE 17 TEXT 'RANGE 0-100.....:' END Edited February 6, 2011 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted February 10, 2011 Share Posted February 10, 2011 Ha!! That's great stuff, man. I'm going to find some wifi today (somewhere in southern back woods Georgia) and send the docs back to you. . I'm very glad to see this functioning in this way. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted February 10, 2011 Author Share Posted February 10, 2011 Ha!! That's great stuff, man. I'm going to find some wifi today (somewhere in southern back woods Georgia) and send the docs back to you. . I'm very glad to see this functioning in this way. Thanks mate This week I'm locked in a hotel room. This gave me a lot of time to work on the documentation. Today I finally catched up; all 50 subroutines are documented. All what is left to do is add your comments, read through it again, do some last corrections, verify the examples one last time .... and then it can be released. I didn't expect this to become such a big project. But I'm really looking forward doing the release. ok, have to be realistic, I'm not expecting any new games coming out due to spectra2. However, the examples I've been working on, have shown that code size and speed are great. I really see this a good start for things to come. At least for the games I'll be working on 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.