Willsy Posted October 24, 2010 Share Posted October 24, 2010 HA HA HA HA HA!!!!!! Spectra 2 just rocked my world! Awesome job! Quote Link to comment Share on other sites More sharing options...
rocky007 Posted October 24, 2010 Share Posted October 24, 2010 Here's a little speech demo I did. I recorded my own voice using Audacity and then followed Marks' instructions to generate the required LPC data with QBOX. Didn't spend too much time on it and it sounds rather rough Then spectra2 was used for playing the speech sample. ********@*****@*********************@************************** 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 12 TEXT 'HELLO WORLD!' *-------------------------------------------------------------- * Include required files *-------------------------------------------------------------- COPY "D:\Projekte\spectra2\tms9900\runlib.a99" *************************************************************** * Main ********@*****@*********************@************************** MAIN BL @FILV DATA >0380,>F0,16 ; Set color table BL @LDFONT DATA >900 ; Load title screen font LI R0,>8370 MOV R0,@WTITAB ; Our timer table BL @MKSLOT DATA >000F,BLINK,0 ; Run thread every 15 ticks BL @SPPREP ; DATA ROCK,SPOPT1 ; Speech player on / Speak external MOVB @BDIG1,@>8369 B @TMGR ; Run scheduler *************************************************************** * Thread ********@*****@*********************@************************** BLINK MOV R11,R0 ; Save NEG @>8368 JLT BLIN2 BLIN1 BL @PUTYX DATA >0A0A,HW ; Show "Hello World!" message JMP BLIN3 BLIN2 BL @HCHAR BYTE >0A,>0A,32,12 ; white space x BLIN3 B *R0 ; Exit ROCK BYTE TALKON BYTE >00,>E0,>80,>E2,>3B,>13,>50,>DC,>64,>00,>AA,>E9,>3C,>69 BYTE >53,>1B,>EE,>9E,>F8,>E4,>55,>4D,>BA,>75,>9A,>53,>54,>DD BYTE >65,>5E,>AD,>0F,>90,>6C,>45,>01,>AA,>CE,>08,>40,>15,>1D BYTE >01,>68,>AA,>3C,>00,>55,>97,>17,>20,>F9,>D6,>63,>67,>3B BYTE >61,>39,>49,>4F,>5A,>75,>65,>45,>66,>3D,>40,>B6,>ED,>0B BYTE >C8,>BA,>35,>01,>D9,>8C,>25,>A0,>9A,>F6,>00,>64,>37,>91 BYTE >80,>18,>46,>8E,>9B,>5D,>87,>E5,>64,>39,>4E,>D1,>D5,>EE BYTE >DD,>EE,>00,>D9,>B5,>0F,>A0,>E8,>8A,>04,>14,>53,>11,>80 BYTE >6A,>3A,>1C,>50,>7C,>FB,>F1,>8B,>99,>34,>EF,>24,>C7,>2D BYTE >B6,>53,>B3,>DB,>1C,>A7,>AA,>CA,>CA,>6C,>77,>80,>EC,>27 BYTE >1A,>90,>6D,>67,>02,>B2,>9F,>74,>40,>89,>1B,>06,>C8,>6E BYTE >FC,>84,>55,>77,>99,>76,>9D,>E3,>57,>DD,>ED,>52,>75,>4E BYTE >55,>EC,>94,>79,>D5,>3E,>76,>53,>53,>A1,>13,>E7,>D8,>4D BYTE >F5,>B8,>55,>EA,>00,>54,>3D,>61,>80,>6C,>27,>15,>50,>54 BYTE >B7,>00,>8A,>EE,>2A,>66,>13,>5D,>A9,>55,>FB,>D8,>55,>F7 BYTE >98,>76,>DD,>63,>57,>55,>1D,>52,>55,>8E,>D9,>D4,>A6,>EB BYTE >34,>69,>40,>51,>13,>0E,>A8,>62,>CA,>00,>55,>6D,>08,>A0 BYTE >C9,>CD,>14,>2C,>55,>BD,>EA,>49,>47,>52,>E5,>94,>47,>26 BYTE >39,>6E,>D3,>D3,>E6,>59,>F7,>98,>55,>6F,>69,>54,>DD,>63 BYTE >57,>37,>29,>D1,>71,>8F,>DD,>F5,>B4,>C9,>26,>59,>79,>57 BYTE >DB,>E1,>D1,>7A,>F4,>5D,>4F,>9B,>D6,>92,>92,>2F,>E3,>5D BYTE >16,>6D,>92,>35,>64,>75,>49,>36,>71,>E6,>54,>39,>6D,>DE BYTE >B4,>99,>C5,>4E,>4A,>56,>9C,>63,>56,>33,>25,>D1,>4D,>8E BYTE >5B,>F4,>B4,>E4,>C4,>39,>5E,>D1,>D3,>E6,>5D,>E7,>78,>5D BYTE >4E,>05,>77,>5D,>07,>54,>31,>A1,>80,>AA,>36,>05,>50,>F9 BYTE >25,>03,>AA,>E8,>20,>40,>91,>E5,>02,>88,>A9,>E4,>78,>55 BYTE >4F,>99,>55,>DD,>E3,>35,>D5,>ED,>5A,>75,>8F,>57,>4D,>B7 BYTE >FA,>D4,>3D,>5E,>55,>57,>1A,>1D,>F5,>B8,>55,>6D,>B9,>55 BYTE >D5,>E3,>56,>33,>6D,>3A,>75,>8F,>5B,>ED,>94,>69,>D5,>3D BYTE >6E,>71,>53,>6A,>5D,>F7,>B8,>D5,>4C,>9B,>76,>D5,>E3,>55 BYTE >3D,>ED,>56,>55,>8F,>57,>75,>77,>68,>57,>3D,>5E,>31,>53 BYTE >61,>53,>F5,>78,>55,>75,>A7,>F6,>94,>E3,>55,>5D,>1B,>3A BYTE >55,>8F,>DB,>55,>76,>69,>35,>3D,>6E,>55,>35,>A1,>35,>E7 BYTE >B8,>4D,>E5,>86,>D6,>94,>E3,>36,>95,>93,>9A,>53,>8E,>57 BYTE >75,>4D,>58,>4D,>39,>5E,>D5,>DD,>EE,>3D,>FB,>78,>45,>4F BYTE >BB,>F7,>EC,>E3,>17,>B3,>65,>D1,>73,>8E,>5F,>CD,>B4,>E9 BYTE >D4,>3D,>41,>B5,>DB,>66,>55,>F7,>04,>D5,>6D,>A9,>55,>DD BYTE >13,>56,>BB,>AD,>DE,>49,>4F,>58,>ED,>B4,>5A,>27,>3D,>51 BYTE >D5,>5B,>E6,>5D,>F7,>C4,>D5,>6C,>69,>74,>D3,>93,>54,>73 BYTE >A9,>5E,>4D,>4F,>52,>D5,>96,>7A,>27,>3D,>49,>D5,>97,>9A BYTE >95,>F4,>24,>D5,>6C,>9A,>67,>93,>93,>56,>B3,>69,>5E,>4D BYTE >4E,>5A,>DC,>B9,>45,>D5,>39,>59,>71,>E7,>1A,>D9,>E4,>E4 BYTE >C5,>5C,>B8,>67,>9D,>93,>57,>79,>6E,>51,>95,>03,>90,>DC BYTE >8A,>00,>22,>2F,>21,>80,>93,>05,>CE,>1C,>72,>3C,>C5,>6C BYTE >07,>73,>E9,>4D,>0F,>95,>55,>CC,>A5,>B7,>DD,>DD,>8E,>01 BYTE >2A,>75,>32,>C0,>E4,>29,>06,>18,>7A,>D4,>00,>53,>B7,>3B BYTE >60,>E8,>76,>07,>4C,>5D,>E9,>80,>A9,>32,>0C,>30,>55,>98 BYTE >01,>96,>CE,>54,>C0,>70,>6D,>02,>E8,>C2,>99,>00,>95,>3B BYTE >11,>20,>51,>23,>50,>40,>57,>E1,>01,>98,>2A,>A2,>01,>53 BYTE >67,>2C,>60,>69,>CF,>05,>6C,>1D,>35,>80,>25,>CB,>03,>B0 BYTE >58,>B8,>03,>A6,>CC,>50,>C0,>10,>65,>02,>18,>C4,>EC,>04 BYTE >CD,>A7,>9B,>6B,>97,>53,>34,>9F,>1A,>E6,>6D,>4E,>D6,>63 BYTE >8B,>66,>26,>39,>7E,>8F,>45,>96,>B9,>BA,>01,>59,>9B,>06 BYTE >20,>3B,>66,>03,>14,>C3,>A4,>80,>6A,>8D,>19,>50,>9D,>53 BYTE >02,>6E,>F0,>68,>C0,>B2,>E5,>C7,>5C,>71,>C2,>CC,>64,>1F BYTE >6B,>E8,>54,>33,>53,>7C,>CC,>12,>43,>C3,>D9,>DD,>31,>4B BYTE >34,>F7,>E0,>2E,>27,>28,>29,>D3,>C5,>D7,>9E,>B0,>E8,>09 BYTE >77,>DF,>7A,>CC,>A6,>26,>CC,>A3,>ED,>31,>9B,>E8,>90,>CA BYTE >35,>C7,>1C,>3A,>4B,>D5,>1A,>2F,>7B,>CA,>08,>57,>69,>D2 BYTE >EC,>65,>B2,>CA,>C5,>4D,>B2,>86,>AA,>08,>F1,>B5,>C1,>EC BYTE >66,>3A,>4C,>9B,>86,>B0,>E9,>2E,>57,>6D,>5B,>80,>2D,>32 BYTE >07,>30,>54,>DB,>29,>46,>E9,>30,>65,>37,>27,>EF,>2D,>C3 BYTE >8D,>35,>9F,>AC,>F9,>08,>0D,>51,>7B,>B2,>66,>3D,>AD,>58 BYTE >CB,>49,>9B,>F6,>D6,>24,>2F,>27,>AB,>D2,>DB,>92,>93,>9C BYTE >AC,>28,>EB,>2C,>AC,>75,>F2,>62,>64,>C7,>C1,>F5,>CA,>93 BYTE >A9,>8D,>04,>2F,>AB,>88,>A6,>37,>0A,>62,>0F,>33,>29,>9F BYTE >18,>72,>B8,>CC,>68,>B2,>35,>25,>CF,>31,>53,>B0,>94,>90 BYTE >3E,>C7,>AA,>51,>9D,>4B,>DA,>1F,>AB,>7B,>75,>49,>6D,>7B BYTE >AC,>E9,>25,>AC,>B4,>ED,>B1,>86,>D6,>96,>B4,>B5,>C7,>EA BYTE >CA,>5A,>22,>56,>1F,>BB,>0B,>1F,>55,>EF,>7A,>9C,>26,>A3 BYTE >5D,>AC,>DB,>71,>9B,>F0,>0E,>D6,>AC,>C7,>2B,>3A,>5B,>44 BYTE >BA,>9C,>A0,>9A,>4C,>31,>D5,>BA,>C2,>62,>23,>38,>C4,>E9 BYTE >0A,>8B,>89,>A0,>52,>A7,>C7,>2F,>3E,>82,>8A,>DC,>1E,>B7 BYTE >7A,>73,>6F,>EC,>72,>AC,>64,>33,>A2,>B4,>EF,>31,>BB,>9A BYTE >CA,>D0,>34,>C7,>EC,>6A,>C6,>C2,>B6,>1E,>AF,>CB,>6D,>8D BYTE >58,>7A,>8A,>A6,>A6,>34,>72,>E9,>C9,>AA,>99,>96,>A8,>75 BYTE >C7,>AE,>A6,>46,>B2,>B7,>9E,>A4,>84,>0E,>A9,>68,>7D,>BC BYTE >1A,>36,>38,>22,>ED,>B0,>9A,>EC,>F6,>CA,>36,>CD,>EE,>BA BYTE >3A,>2C,>DA,>06,>A0,>71,>F5,>04,>4C,>AD,>56,>80,>E9,>3A BYTE >8F,>B9,>53,>47,>8A,>4A,>3E,>E6,>4A,>1D,>0A,>DA,>E4,>98 BYTE >A3,>76,>20,>79,>E2,>63,>8E,>D6,>46,>1A,>69,>4F,>D0,>9B BYTE >AB,>78,>6C,>3D,>7E,>B5,>66,>1E,>BE,>F5,>78,>D5,>94,>07 BYTE >5B,>DF,>93,>16,>51,>99,>21,>6B,>8F,>5B,>79,>95,>A6,>AC BYTE >3B,>49,>15,>93,>1A,>BA,>EE,>D8,>55,>6F,>9A,>C9,>BA,>63 BYTE >17,>3B,>E9,>A2,>DB,>4E,>5C,>DC,>A6,>A9,>AE,>3B,>49,>55 BYTE >93,>66,>DA,>EE,>24,>59,>4C,>AA,>FB,>BA,>93,>67,>DA,>93 BYTE >C9,>4B,>56,>91,>D9,>B4,>85,>4E,>19,>76,>61,>55,>66,>52 BYTE >67,>D8,>59,>54,>85,>71,>94,>65,>67,>51,>55,>8E,>75,>8E BYTE >99,>45,>55,>18,>2D,>3D,>45,>91,>D3,>1E,>34,>FB,>14,>55 BYTE >74,>4B,>DA,>EC,>93,>4D,>1E,>23,>29,>4B,>4E,>DA,>55,>64 BYTE >26,>AD,>3E,>69,>37,>99,>E9,>B4,>EA,>64,>5D,>4E,>4B,>CA BYTE >E2,>93,>37,>BD,>C3,>E1,>AB,>4F,>DE,>D4,>B4,>BA,>2D,>3E BYTE >79,>93,>DD,>EA,>B6,>EA,>64,>43,>D4,>48,>E8,>A2,>93,>77 BYTE >51,>ED,>A1,>8B,>4E,>3E,>58,>8F,>BA,>CF,>39,>C5,>E4,>31 BYTE >11,>7C,>FB,>94,>55,>4D,>9B,>FA,>AB,>53,>65,>3B,>AD,>92 BYTE >8F,>4E,>9D,>C2,>16,>6B,>3D,>3E,>66,>76,>DB,>2C,>F9,>E4 BYTE >98,>D1,>4F,>89,>F6,>9B,>63,>26,>33,>2D,>52,>CF,>8E,>9D BYTE >F4,>8C,>6A,>BC,>3B,>6E,>52,>33,>CA,>B9,>EE,>78,>49,>CD BYTE >28,>FB,>FA,>E3,>67,>DE,>6B,>64,>EB,>4E,>98,>F9,>AE,>A2 BYTE >2D,>3D,>71,>E6,>BB,>8A,>B6,>F4,>C4,>99,>EF,>18,>DA,>DA BYTE >93,>64,>B1,>23,>18,>4B,>4E,>D2,>50,>4C,>09,>B7,>1D,>69 BYTE >21,>DD,>01,>BE,>65,>64,>15,>4D,>06,>C4,>E6,>96,>55,>1A BYTE >95,>E0,>AB,>47,>DE,>85,>94,>73,>38,>6E,>45,>63,>E6,>26 BYTE >6E,>37,>14,>89,>A6,>2B,>47,>DB,>96,>6D,>15,>2A,>EA,>B6 BYTE >57,>BA,>54,>9A,>8A,>DB,>1B,>69,>95,>A5,>2E,>B5,>64,>A4 BYTE >55,>86,>05,>D7,>92,>96,>35,>51,>1A,>1C,>8B,>5A,>3E,>79 BYTE >58,>91,>37,>2A,>E5,>10,>A5,>89,>9E,>28,>E5,>43,>8E,>3A BYTE >79,>A2,>90,>4D,>19,>D2,>EC,>B6,>5C,>32,>54,>9A,>A3,>3B BYTE >22,>80,>A1,>EE,>00,>00,>00,>00,>00,>00,>00,>00,>00,>00 BYTE >00,>00,>00,>00,>00,>00,>00,>F0 BYTE TALKOF END Here's the ROM image for classic99 and MESS. Again this comes without warranties. It was tested on classic99 and on a real TI-99/4A with speech synth. hw.zip i made nightare with this devilish voice Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted October 25, 2010 Author Share Posted October 25, 2010 Here's the latest update on what I've been working on lately: * Introduction of a 'kernel' thread. It does things like reading the keyboard & running the sound player. Can be turned of by setting a flag. * Introduction of a user hook that runs after kernel thread, also controleable by a flag * Exit code and FCTN-QUIT support for returning to TI title screen (also in regards to discussion in Y! group) * vchar, hchar and some low-level utilities * virual keyboard with support for 2nd joystick * Speech splayer implemented * Code for testing if PAL or NTSC. * Automatically adjusting of timer scheduler based on PAL/NTSC flag. I want to have the initial relase out in 2010. Really want to get back to game development. What is currently missing is: * Random function, I think there was a discussion about random functions on Atariage just a while ago. Have to check on that. * code for turning memory word into string of digits (e.g. for displaying score) * bank-switching code (but that's real easy) * A few more graphic routines (display string in box, fill box) * Keyboard scan routine (typewriter style) * Speech player enhancement for using resident voice Dunno if I'll have all this in the initial release. Some of it might appear in a 1.1 release. All in all, I'm quite pleased with the way things have turned out, especially in terms of memory requirement & register usage. Still have a lot of documentation to do. But I really want to start using spectra2 for doing actual game development 1 Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 1, 2010 Author Share Posted November 1, 2010 (edited) Time for an update: Memory and register usage has finally stabilized since the last two weeks. I did a few more tweaks to the config register. Basically I use state flags in some of the subroutines. * Equates for CONFIG register *-------------------------------------------------------------- * Configuration flags * =================== * * ; 15 Sound player: tune source 1=ROM/RAM 0=VDP MEMORY * ; 14 Sound player: loop tune 1=yes 0=no * ; 13 Sound player: on 1=yes 0=no (or pause) * ; 12 Keyboard: mode 1=real 0=virtual * ; 11 Keyboard: ANY key pressed 1=yes 0=no * ; 10 Keyboard: <<reserved>> 1=yes 0=no * ; 09 Timer: Kernel thread enabled 1=yes 0=no * ; 08 Timer: Block kernel thread 1=yes 0=no * ; 07 Timer: User hook enabled 1=yes 0=no * ; 06 Timer: Block user hook 1=yes 0=no * ; 05 speech player: external voice 1=yes 0=no * ; 04 Speech player: busy 1=yes 0=no * ; 03 Speech player: on 1=yes 0=no * ; 02 VDP9918 PAL version 1=yes(50) 0=no(60) * ; 01 Subroutine state flag 1 1=on 0=off * ; 00 Subroutine state flag 0 1=on 0=off ********@*****@*********************@************************** PALON EQU >2000 ; bit 2=1 (VDP9918 PAL version) ENUSR EQU >0100 ; bit 7=1 (Enable user hook) ENKNL EQU >0040 ; bit 9=1 (Enable kernel thread) It's good to see that the pieces do actually fit together. I'm heading for a 1.0 release by the end of November. The last few days I've been working on some VDP tile functions I really want to have in place. The library code size is now at 1841 bytes. That's good because the goal is that library size is max. 2000 bytes for the 1.0 release. That leaves 6000 bytes of game code in an 8K rom and due to the available functionality, game code will get a lot shorter. As usual, the documentation currently is way behind, so I really have to do something about that Edited November 1, 2010 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 1, 2010 Share Posted November 1, 2010 Great stuff man!! I'm pretty excited. This looks VERY slick, and I'm positive it will make coding in assembly a breeze and a blast for many of us who dabble but haven't yet completed any projects in TMS9900. Thanks again!! Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 9, 2010 Author Share Posted November 9, 2010 Work on spectra2 is coming along nicely. I did plenty of updates in the last week. I completed the work on the runtime library initialisation and on most of the graphic routines. It's now feature complete for the initial release. Still not sure if the remaining features on my list will be implemented. Guess it'll depend on the feedback and how I move along with further game development. Today I started the work on the manual, pickung up the pieces where a left off with the initial spectra release. Most likely I'll be doing a few tutorials to bring the ideas accross. Here's my latest try on the "Hello World!" program. ********@*****@*********************@************************** 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 12 TEXT 'HELLO WORLD!' *-------------------------------------------------------------- * 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 >08 ; Screen background color. *************************************************************** * Main ********@*****@*********************@************************** MAIN BL @PUTYX DATA >0B0A,HW ; Show "Hello World!" message on row >0B, column >0A B @TMGR ; Handle FCTN-QUIT key, etc. END It might not be a big deal, but I'm pretty pleased with how short the actual assembly program is There's actually quite a few things going on in the background upon program startup. Looking at the cartridge header you see the label "RUNLIB". That's the address of the routine that gets executed when option 2 is selected from the TI menu screen. RUNLIB does the below steps: Clear scratch-pad memory (256 bytes) Determine if VDP is a PAL or NTSC Copy some machine code into scratchpad Determine TI-99/4A operating system version Setup video (load video table, clear 16K of VRAM, load color table, load specified font from GROM) Initialize registers, set some flags Jump to MAIN (start of our program) Here's what it looks like: EDIT: Looking at the screenshot you'll notice the different font used for the "HELLO WORLD!" message. There is no font included in spectra2, it's the "FAT" special effect applied to the default TI font. This is handled by the LDFONT subroutine that is called during the library initialisation. I didn't plan on including any special effects, however sometimes99er's idea is just so plain brilliant that I had to give it a shot. The nice thing is that it allows for a different font look and basically only requires 3 additional assembly instructions. Great job sometimes99er! Here are the equates valid for SPFONT (see SPECTRA2 startup options) FNOPT1 EQU >0000 ; LDFONT => Load TI title screen font FNOPT2 EQU >0006 ; LDFONT => Load upper case font FNOPT3 EQU >000C ; LDFONT => Load upper/lower case font FNOPT4 EQU >0012 ; LDFONT => Load lower case font FNOPT5 EQU >8000 ; LDFONT => Load TI title screen font & make fat FNOPT6 EQU >8006 ; LDFONT => Load upper case font & make fat FNOPT7 EQU >800C ; LDFONT => Load upper/lower case font & make fat FNOPT8 EQU >8012 ; LDFONT => Load lower case font & make fat 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted November 9, 2010 Share Posted November 9, 2010 Work on spectra2 is coming along nicely. I did plenty of updates in the last week. I completed the work on the runtime library initialisation and on most of the graphic routines. It's now feature complete for the initial release. Still not sure if the remaining features on my list will be implemented. Guess it'll depend on the feedback and how I move along with further game development. Excellent work! Are you going to make available a complete finalized package with documentation? Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 9, 2010 Share Posted November 9, 2010 Hehe, very nice. At first I thought it impossible to make any new or modify font with just a few instructions like that. Then I suddenly had a few ideas. Some dotted versions using also only 3 instructions in the loop (MOVB, SZCB and SWPB). Some shaky fonts. And some with something like wind traces. They were all more or less recognizable as fonts, not quite readable, and a few characters here and there really went belly up. Here's an example Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 9, 2010 Share Posted November 9, 2010 Man am I impressed!!!! Wow! You guys are really talented!!! Filip, I still don't know how to run cartridge ROMs in Classic99... Could you give a detailed instruction set for how to make this happen? Quote Link to comment Share on other sites More sharing options...
Tursi Posted November 10, 2010 Share Posted November 10, 2010 Owen, just two steps: 1) Make sure that the file(s) end with either C.BIN, D.BIN, or G.BIN (or any combination of that depending on how many files are in the cartridge). If they are in a zip file, unzip them. 2) Select Cartridge->User->Open, and select any of the files in the group. Classic99 will automatically find and load the rest of them. If you have a different extension then you need a little more effort... the above naming convention is for V9T9 style ROMs. MESS now uses the RPK format, which you can rename to .ZIP and then extract the files from. If the file is a bank switched ROM then there's no default extension for that, so this approach doesn't work, and you have to add the cartridge to the INI file. But it would be easier to give a solid example of that, as you have to know exactly what the cartridge is to do it. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 10, 2010 Share Posted November 10, 2010 Thanks Tursi!! I'll try it out today. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 10, 2010 Author Share Posted November 10, 2010 Work on spectra2 is coming along nicely. I did plenty of updates in the last week. I completed the work on the runtime library initialisation and on most of the graphic routines. It's now feature complete for the initial release. Still not sure if the remaining features on my list will be implemented. Guess it'll depend on the feedback and how I move along with further game development. Excellent work! Are you going to make available a complete finalized package with documentation? Yes, that's the plan. To get a rough idea you might want to check the documentation on my previous version of the library. http://spectra99.sourceforge.net/SPECTRA_reference_manual.pdf Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 12, 2010 Author Share Posted November 12, 2010 ok, here's another spectra2 example program. This time we want to control a sprite using the keyboard or joystick 1. http://www.youtube.com/watch?v=Ui1RFtNqBOs Here's the code: ********@*****@*********************@************************** 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 MSG BYTE 15 TEXT 'MOVE THE SPRITE' *-------------------------------------------------------------- * 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 >A0 ; Foreground/Background color for font. SPFBCK EQU >01 ; Screen background color. *-------------------------------------------------------------- * Our constans and variables in scratchpad memory *-------------------------------------------------------------- RAMSAT EQU >8340 ; Copy of mini-SAT in RAM memory (6 bytes) RAMTAB EQU >8346 ; Timer table (4 bytes) *************************************************************** * Main ********@*****@*********************@************************** MAIN BL @CPYM2M DATA SPRITE,RAMSAT,6 ; Copy 6 bytes from ROM into scratchpad RAM BL @CPYM2V DATA >1000,PAT1,8 ; Dump sprite pattern BL @PUTBOX DATA >1503,>1A02,MSG1,EOL ; Show text in box on row >15, col >03 with width >1A, height >02. MOV @MYTAB,@WTITAB ; Setup address of timer table BL @MKSLOT DATA >0002,MVBOX,EOL ; Create new timer slot B @TMGR ; Handle FCTN-QUIT key, timers, etc. *************************************************************** * Move sprite: This routine is called as timer slot from TMGR ********@*****@*********************@************************** MVBOX MOV R11,R0 ; Save R11 in R0 COC @WBIT11,CONFIG ; ANY key pressed ? JNE MVBOX5 ; No, so exit MOV @WVRTKB,R1 ; Get keyboard flags MVBOX1 COC @KEY1,R1 ; Left ? JNE MVBOX2 SB @BD2,@RAMSAT+1 ; X=X-2 MVBOX2 COC @KEY2,R1 ; Right ? JNE MVBOX3 AB @BD2,@RAMSAT+1 ; X=X+2 MVBOX3 COC @KEY3,R1 ; Up ? JNE MVBOX4 SB @BD2,@RAMSAT ; Y=Y-2 MVBOX4 COC @KEY4,R1 ; Down JNE MVBOX5 AB @BD2,@RAMSAT ; Y=Y+2 MVBOX5 BL @CPYM2V ; Dump copy of SAT to VDP SAT DATA >0300,RAMSAT,6 ; ... R11 is overwritten B *R0 ; ... so return using copy in R0 KEY1 DATA K1LF ; Left KEY2 DATA K1RG ; Right KEY3 DATA K1UP ; Up KEY4 DATA K1DN ; Down *************************************************************** * Our constants ********@*****@*********************@************************** MYTAB DATA RAMTAB ; Location of timer table in scratchpad memory SPRITE DATA >2020,>000F ; Row >20, col >20, pattern >00, color white DATA >0D00 ; No more sprites PAT1 DATA >FF81,>8181,>8181,>81FF MSG1 BYTE 52 TEXT 'Use joystick 1 or keys E,S,D,X for moving sprite' END After the library has initialized the TI-99/4A (memory, VDP registers, etc), it automatically branches to MAIN. This is what happens when MAIN is entered: 1) Copy 6 bytes from ROM into scratchpad memory location >8340. This is our work copy of the SAT (Sprite Attribute Table), the table that keeps the sprite information. 2) Dump the sprite pattern from ROM to VDP RAM >1000. That is where the Sprite Pattern Table is located. 3) Put the message 'Use joystick 1 or keys ...' on screen 4) Setup a timer table in scratchpad memory at @>8346 and allocate timer slot >00 by using the MKSLOT routine. The routine MVBOX should be called by the timer manager on every second tick. (That is 30 times per second on NTSC, 25 times per second on PAL). 5) Branch to TMGR, the thread scheduler. Once the thread scheduler has taken over, it will continiously do the below steps: 1) Call the "kernel" thread that is responsible for keyboard scanning, running sound player, etc. FYI: All options of the kernel thread can be controlled by various bits in the CONFIG register (R12). 2) Call our thread (MVBOX) in slot 0 on every second tick. The MVBOX thread itself is really quite simple: * It first checks if any key was pressed at all. It does that by checking a certain bit in the CONFIG register (R12). If no key was pressed, then it just dumps the work copy of the SAT table to the real SAT table in VDP memory and exits. * If a key was pressed, it verifies if it's one of the known keys (ESDX), if it matches, it updates the Y & X positions in the SAT work copy and then dumps the work copy into the real SAT table in VDP memory. Note: In spectra2 the joysticks automatically map to the corresponding keys. That is why we don't need any extra logic for scanning joysticks. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 12, 2010 Share Posted November 12, 2010 Wow!! . Nice video Filip!!! This is so freaking cool. Can't wait to get my hands on this package. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 12, 2010 Share Posted November 12, 2010 Question--- is this the entire source code for this program? It looks like a custom font and I didn't see any new fonts designed in the source. Is "runlib" a set of routines outside this source code--- perhaps used during the assembly process.... Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 13, 2010 Share Posted November 13, 2010 It looks like a custom font and I didn't see any new fonts designed in the source. SPFONT EQU FNOPT7 ; Font to load. See LDFONT for details. See post #56 (at the bottom). Is "runlib" a set of routines outside this source code--- perhaps used during the assembly process.... COPY "D:\Projekte\spectra2\tms9900\runlib.a99" Yep. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 13, 2010 Share Posted November 13, 2010 Super exciting stuff. what will the TI world do when a floodgate of cart games comes streaming out of Spectra2?? Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 13, 2010 Author Share Posted November 13, 2010 (edited) Super exciting stuff. what will the TI world do when a floodgate of cart games comes streaming out of Spectra2?? Thanks, glad you like it If I'm honest I don't expect that many new cart games to appear though. Then again, you never know Who could have dreamed the many great things that happened this year ?? The library is basically just providing a framework. You still have to do the actual game implementation, but yes it does show that writing ROM based games running from scratchpad memory is not that difficult. Currently I'm only bug-fixing the library. I could put it in the wild but I also realize that a lot of the excitement depends on the quality of the manual and the tutorials. There is still a lot of work needed for that. So, what do you guys think? Should spectra2 be released after documentation is ready or would you guys prefer a work-in-progress version, without a proper documentation ? I still have many plans for spectra2. It would be cool if some kind of higher-level language could be used for writing the actual game code. The current memory requirements leave enough space in scratchpad for making this possible. Thinking about Strawberry here, hint hint. I've also been toying with the idea for writing a small interpreter myself, just for the fun of it. But I have way too many stuff going and not enough time. ok, enough rambling for now. Trying to take one step at a time EDIT: Thinking about the manual. Perhaps for starters it's enough to describe memory, register usage, startup flags, etc. and give some examples. For an assembler coder, the routines itself shouldn't be that hard to understand. I tried to comment as good as I can Edited November 13, 2010 by retroclouds Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 13, 2010 Share Posted November 13, 2010 I'd like to get a working BETA copy--- whatever docs you have. I'd love to just get familiar with your layout and libraries. . Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 13, 2010 Share Posted November 13, 2010 (edited) Super exciting stuff. what will the TI world do when a floodgate of cart games comes streaming out of Spectra2?? As I see, and I may be wrong, but no hardware or software has ever opened any floodgate of games on the TI since they left it in 1984. Sometimes I too get caught up in a dream about more colors, more sprites, more RAM, faster CPU etc., but then I already got all that on later (Amiga) or present machine (PC), and more importantly - it wouldn't be the TI-99/4A format/config I once knew/fell in love with. Edited November 13, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 13, 2010 Share Posted November 13, 2010 I still have many plans for spectra2. It would be cool if some kind of higher-level language could be used for writing the actual game code. The current memory requirements leave enough space in scratchpad for making this possible. Thinking about Strawberry here, hint hint. I would like Strawberry to do the compile process automatically. Does WinAsm99 allow for that ? Right now I'm almost coding and wiring 9900 routines by hand. There's a smell of spaghetti bolognese. Quote Link to comment Share on other sites More sharing options...
+retroclouds Posted November 13, 2010 Author Share Posted November 13, 2010 I still have many plans for spectra2. It would be cool if some kind of higher-level language could be used for writing the actual game code. The current memory requirements leave enough space in scratchpad for making this possible. Thinking about Strawberry here, hint hint. I would like Strawberry to do the compile process automatically. Does WinAsm99 allow for that ? Right now I'm almost coding and wiring 9900 routines by hand. There's a smell of spaghetti bolognese. Yeah, that's what I'd like to see too. In that case you would need an assembler working in the background as part of Strawberry. Don't think that Winasm99 takes command line parameters. I seem to recall that Tursi built an executable file for simulating a click on the assemble button. But I could be mistaking... However you could work in small steps. An in-between version of Strawberry that generates assembler source code. In a later revision you could then include your own assembler. Writing an assembler is a bigger task, but it's not impossible. I started working on an assembler written in Perl (see the "booster" thread). I Already got pretty far, but then I got distracted again with Tutankham, Spectra2 and a million other things. That's actually a project I want to pickup again. Dunno if I would do the final version in Perl, but it's great for hacking. oh, you also might want to take a look at the AS macro assembler. It also targets the TMS9900 Check here: http://john.ccac.rwth-aachen.de:8000/as/as_EN.html Quote Link to comment Share on other sites More sharing options...
Opry99er Posted November 13, 2010 Share Posted November 13, 2010 Well, as long as you're only using symbolic addressing, wouldn't it be possible to just add AORG >6000 to the top of your source code to make it cartridge-compatible? That's way over-simplifying, I'm sure... Just curious. Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 13, 2010 Share Posted November 13, 2010 (edited) oh, you also might want to take a look at the AS macro assembler. It also targets the TMS9900 Check here: http://john.ccac.rwth-aachen.de:8000/as/as_EN.html Forgot all about it. Thanks for reminding me ! Edited November 13, 2010 by sometimes99er Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted November 13, 2010 Share Posted November 13, 2010 Well, as long as you're only using symbolic addressing, wouldn't it be possible to just add AORG >6000 to the top of your source code to make it cartridge-compatible? That's way over-simplifying, I'm sure... Just curious. I'm not sure what you're commenting. Besides AORG >6000, there has to be a cartridge header. 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.