Dexter Posted May 1, 2015 Share Posted May 1, 2015 The TIFILES header is just a partial copy of the FDR from the disk. For a first game, I’d like to start with something simple. I’ve chosen the game Simon, (a thrilling high speed assembly action game). Simple enough as a game, complex enough to learn a lot, when doing it in assembly language. This should be the in game screen. Made it with Photoshop, and converted it with Convert9918. I saved it as bitmap TIFILES. Now I have two files, the color and pattern data. Stripping off those 128 byte headers leaves oly the raw date? How do I get that data into the source code? Magellan has that nice feature to export the data as assembler data lines. 2 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/ Share on other sites More sharing options...
+Schmitzi Posted May 1, 2015 Share Posted May 1, 2015 ;) SuperDuper. Insert coin please ;-) Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229393 Share on other sites More sharing options...
Asmusr Posted May 1, 2015 Share Posted May 1, 2015 I use a small Java program for converting binary files to data or byte statements. Attached here as a zipped jar file. bin2asm.zip 1 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229431 Share on other sites More sharing options...
Omega-TI Posted May 1, 2015 Share Posted May 1, 2015 ;) SuperDuper. Insert coin please ;-) Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229451 Share on other sites More sharing options...
Dexter Posted May 2, 2015 Author Share Posted May 2, 2015 I use a small Java program for converting binary files to data or byte statements. Attached here as a zipped jar file. That's exactly what I was looking for! Do you use NetBeans for that kind of things? Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229656 Share on other sites More sharing options...
Asmusr Posted May 2, 2015 Share Posted May 2, 2015 Do you use NetBeans for that kind of things? I use IntelliJ IDEA, but NetBeans is also very nice. How I wish we had something like that for TMS9900 assembly. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229678 Share on other sites More sharing options...
+mizapf Posted May 2, 2015 Share Posted May 2, 2015 I'm still an IDE-ignorant kind of guy. I wrote TIImageTool simply with a text editor (jEdit). 1 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229710 Share on other sites More sharing options...
Dexter Posted May 2, 2015 Author Share Posted May 2, 2015 I wrote TIImageTool simply with a text editor (jEdit). If you think that's hardcore? Now THAT'S hardcore coding. https://www.youtube.com/watch?v=cclQ7E-Oj78 Liked the video, but not the sound. If I'm forced to program something in C, I'd use Code::Blocks. What I don't like on IDE's are those bulky installs. It's kind of ridicules when you see how big ATMEL Studio is to program such a small binary for an AVR. Although I like IntelliSense, syntax highlighting, and different colors for variables. 1 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229773 Share on other sites More sharing options...
+mizapf Posted May 2, 2015 Share Posted May 2, 2015 (edited) Liked the video, but not the sound. Not the sound? This is the ending score of Portal! Just for that part I'd be willing to play it once more. Edit: Also, I'm not aiming at hardcore programming. The bloatedness of IDEs is what keeps me with simple tools. I've got my API documentation on one half of the screen so I can quickly look up methods and classes. I'm not hardcore enough to write programs with vim (except for those like the AND test), but jEdit proved to be very helpful with syntax highlighting and other tools, and still being quite fast. Edited May 2, 2015 by mizapf 1 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229781 Share on other sites More sharing options...
Dexter Posted May 2, 2015 Author Share Posted May 2, 2015 Edit: Also, I'm not aiming at hardcore programming. Of course not, I was just kidding. jEdit proved to be very helpful with syntax highlighting and other tools, and still being quite fast. I'm using TextPad for machine language, that’s what I’m used to. It also has syntax highlighting and can use external tools. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3229842 Share on other sites More sharing options...
+Vorticon Posted May 4, 2015 Share Posted May 4, 2015 You guys have not programmed hardcore until you've flipped switches to enter binary data. I did this with my Elf replica to create a "Cylon eyes" demo with the board LEDs. Incredibly laborious, but also incredibly satisfying. Why? Who the hell knows. I'm weird that way 2 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3231465 Share on other sites More sharing options...
+Ksarul Posted May 5, 2015 Share Posted May 5, 2015 Sort of like setting the plugs on an Enigma Machine. . . Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3231579 Share on other sites More sharing options...
Dexter Posted May 5, 2015 Author Share Posted May 5, 2015 Finally I got the Graphics II mode working on the real thing! If I understand correctly, E/A3 object file can be as big as the total amount of free memory, it first fills up HIMEM, then LOMEM. I convert the object file to E/A5 files with Classic99 by loading and running the E/A3 file, stop the program in the debugger with F1, then choose Make, Save Memory as Program. I use SLOAD, SFIRST and SLAST. Although this seem to work, is that the most convenient and correct method? DEF SFIRST,SLAST,SLOAD SFIRST EQU $ SLOAD EQU $ B @MAIN Source listing SLAST END Some object files seem to automatically start, how could that be accomplished? 2 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3231748 Share on other sites More sharing options...
Asmusr Posted May 5, 2015 Share Posted May 5, 2015 Some object files seem to automatically start, how could that be accomplished? Put a label after END, e.g. END SFIRST, and if will automatically start at that label. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3231872 Share on other sites More sharing options...
Dexter Posted May 5, 2015 Author Share Posted May 5, 2015 ALLTIGHT! Works like a charm. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3231876 Share on other sites More sharing options...
Tursi Posted May 6, 2015 Share Posted May 6, 2015 If I understand correctly, E/A3 object file can be as big as the total amount of free memory, it first fills up HIMEM, then LOMEM. Yes, but it will not split files up for you - to get them to split up between the 24k and 8k blocks you need to use multiple files or AORG directives. (Absolute Origin) I convert the object file to E/A5 files with Classic99 by loading and running the E/A3 file, stop the program in the debugger with F1, then choose Make, Save Memory as Program. I use SLOAD, SFIRST and SLAST. Classic99 doesn't require the labels, although they likely make it easier to see where you loaded the file. Nice work so far! Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3232282 Share on other sites More sharing options...
Dexter Posted May 19, 2015 Author Share Posted May 19, 2015 (edited) I’ve had fun composing the graphics for SIMON. Because of the 256 character restriction of Magellan, I managed to squeeze all the graphics I need within 256 characters. Though I’m not sure what graphic mode to use, graphics 1 mode gives me a color restriction. So graphics 2 mode is more likely. However, I have used up only 256 characters which I’d like to place on the display to my likings. I’ve watched, and mostly understood, Tursi’s video on the pattern and color masking bits. https://www.youtube.com/watch?v=XJljSJqzDR0 So if I set register 4 to "00000000", I set the VDP to use only one character set, i.e. 256 characters. Can I set the color table also to one color table? The real question here is, which graphics mode / VDP settings do I have to use for this screen layout, with the ability to show the characters for text that are on the 3th area of the screen, also to show on the second or first area of the screen. Should I use one or three pattern tables, and one or three color tables? Edited May 19, 2015 by Dexter Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240522 Share on other sites More sharing options...
Asmusr Posted May 19, 2015 Share Posted May 19, 2015 I’ve had fun composing the graphics for SIMON. Because of the 256 character restriction of Magellan, I managed to squeeze all the graphics I need within 256 characters. Though I’m not sure what graphic mode to use, graphics 1 mode gives me a color restriction. So graphics 2 mode is more likely. However, I have used up only 256 characters which I’d like to place on the display to my likings. I’ve watched, and mostly understood, Tursi’s video on the pattern and color masking bits. https://www.youtube.com/watch?v=XJljSJqzDR0 So if I set register 4 to "00000000", I set the VDP to use only one character set, i.e. 256 characters. Can I set the color table also to one color table? The real question here is, which graphics mode / VDP settings do I have to use for this screen layout, with the ability to show the characters for text that are on the 3th area of the screen, also to show on the second or first area of the screen. Should I use one or three pattern tables, and one or three color tables? graphicsS5b.png You could use two pattern tables and two color tables, see: http://www.unige.ch/medecine/nouspikel/ti99/tms9918a.htm#hybrid%20bitmap Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240558 Share on other sites More sharing options...
Dexter Posted May 19, 2015 Author Share Posted May 19, 2015 You could use two pattern tables and two color tables, see: http://www.unige.ch/medecine/nouspikel/ti99/tms9918a.htm#hybrid%20bitmap Why two, I have enough characters with one pattern table, or do you mean I could use 2/3 of the screen and the last 1/3 for text writing? It's a bit confusing, Magellan has bitmap mode (among others), but yet uses 256 characters. I suppose it is the so called half bitmap mode? Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240716 Share on other sites More sharing options...
Asmusr Posted May 19, 2015 Share Posted May 19, 2015 Why two, I have enough characters with one pattern table, or do you mean I could use 2/3 of the screen and the last 1/3 for text writing? It's a bit confusing, Magellan has bitmap mode (among others), but yet uses 256 characters. I suppose it is the so called half bitmap mode? Sorry, I thought you had used all 256 characters for the Simon logo and needed more for the text. But in that case you can just use the badly named 'half bitmap' mode (perhaps 1/3 bitmap mode would have been a better name?). Magellan has support for bitmap mode colors - but not for full bitmap mode as such. For a scrolling map, which is what Magellan is designed for, you need the same characters all over the screen. You can obtain this with half bitmap mode, but also in full bitmap if you load the same character set 3 times. Sprites above 7 do not work in half bitmap mode on the real hardware (no emulators emulate this glitch). A compromise, if you want to save VDP RAM but need to use sprites, is to have 3 pattern tables with the same content but only 1 color table. All sprites work in this special mode. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240752 Share on other sites More sharing options...
Dexter Posted May 19, 2015 Author Share Posted May 19, 2015 So I can use one pattern table and one color table. For scrolling I have to study your 2plane demo, but that’s not necessary for SIMON. In that particular demo I see tow sources included at the end of the file: COPY "tiplayer.a99" COPY "CollisionChaos.vgm.a99" For SIMON it’s probably overkill, but what are the tools to create simple music or convert existing? Sorry if this all seem random questions, but there are just so many aspects. But I guess you all know that. Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240772 Share on other sites More sharing options...
Asmusr Posted May 19, 2015 Share Posted May 19, 2015 So I can use one pattern table and one color table. For scrolling I have to study your 2plane demo, but that’s not necessary for SIMON. In that particular demo I see tow sources included at the end of the file: COPY "tiplayer.a99" COPY "CollisionChaos.vgm.a99" For SIMON it’s probably overkill, but what are the tools to create simple music or convert existing? Sorry if this all seem random questions, but there are just so many aspects. But I guess you all know that. The 2 plane demo is using F18A Enhanced Color Mode (ECM) graphics and F18A hardware scrolling. This is not graphics mode 2, but graphics mode 1 with enhanced colors, so no table masking is necessary. The music is played using Tursi's VGM compressor and player: http://www.harmlesslion.com/cgi-bin/onesoft.cgi?130 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3240804 Share on other sites More sharing options...
Dexter Posted May 20, 2015 Author Share Posted May 20, 2015 (edited) Thanks, one step further! Well, actually two, I managed to set up the half bitmap mode. The nine big colored items each have an individual color, that way I can manipulate them seperately with the F18A palette registers. The white characters are from a charset site: http://kofler.dot.at/c64/font_01.html I don't know if I need them, but I still have 5 unused chars left. The other thing is that I included music. It's more a proof of concept, and I'm not going to use that music in the game. Just a few simple sound effects and the simon tones. simon.obj source.zip It really sounds great on the real TI, hooked up on the stereo. Edited May 20, 2015 by Dexter Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3241457 Share on other sites More sharing options...
Opry99er Posted May 20, 2015 Share Posted May 20, 2015 Awesome!! Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3241460 Share on other sites More sharing options...
Dexter Posted May 20, 2015 Author Share Posted May 20, 2015 Thanks, I wish I could let hear it, I made a video with my phone, but it turned out crappy, and I couldn't upload it. I'm amazed about the VGM player and tracker! 1 Quote Link to comment https://forums.atariage.com/topic/237815-simon-game-in-assembly-language/#findComment-3241464 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.