mindlord Posted May 7, 2016 Share Posted May 7, 2016 So... I've been noodling with GCC on the TI99. https://youtu.be/exMGm6_q9Uc 5 Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted May 7, 2016 Share Posted May 7, 2016 Interesting little set of experiments. I like that rotating "Y" as it would make an interesting minimalist spacecraft for a game. . . Quote Link to comment Share on other sites More sharing options...
mindlord Posted May 7, 2016 Author Share Posted May 7, 2016 My current plan is to make a game similar to Adventure for the 2600 / Legend of Zelda / Guardian Legend. Overworld Exploration with stuff to fight + Dungoens / Puzzles / minigames. That is if I can cram enough in. Tursi's LIBTI99 laid some really good groundwork, but I'm trying to extend that with some really useful routines. Software Sprites (This is the big one - because it will mean more enemies on the screen and no flicker) Per-Pixel character blitting routines Per-Pixel character scrolling Coherent noise (al-la libnoise) 8x8 and 16x16 character 90° rotation 8x8 and 16x16 character flipping linear/bilinear interpolation for acceleration/deceleration and stuff Layered sprites (A framework that takes a software sprite and layers a hardware sprite or two on top to create multi-color characters) Like this:The shadow is just normal characters that use the software sprite routine to move around and the colors are two hardware sprites on top, but they are all tied together with one STRUCT to manage position and animation frames. Just stuff that any game programmer would appreciate. Ideally some high speed routines would make it easier to cram more game in since you wouldn't have to have so much ram taken up by character data since you can quickly and easily flip and rotate stuff. I'm not an Assembly language genius or anything, and I'm sure there's plenty of room for improvement in my routines, but I think it's a good start so far.Coherent Noise can be used to seed level data and procedurally generate maps and enemy behavior instead of storing *ALL* the level data in RAM on on Disk. 4 Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 8, 2016 Share Posted May 8, 2016 As long as your routines don't break anything already in the lib and you don't mind a public domain license, I'd be happy to incorporate your additions to libti99 in the future. Quote Link to comment Share on other sites More sharing options...
mindlord Posted May 8, 2016 Author Share Posted May 8, 2016 @Tursi: So far I have made no changes to LIBTI99 and everything works in a similar fashion and uses similar naming conventions. I don't have a problem sharing. I'm very much into Open Source and like to give back when I can. Quote Link to comment Share on other sites More sharing options...
TheMole Posted May 9, 2016 Share Posted May 9, 2016 Always nice to see new gcc developers join the fold, so welcome! Quote Link to comment Share on other sites More sharing options...
cbmeeks Posted May 12, 2016 Share Posted May 12, 2016 Sorry to be dumb, but what is the LIBTI99? Quote Link to comment Share on other sites More sharing options...
mindlord Posted May 12, 2016 Author Share Posted May 12, 2016 Sorry to be dumb, but what is the LIBTI99? LIBTI99 is Turi's library of basic functions for GCC development. Together with TMS9900-GCC from Insomnia it makes developing C applications and games for real TI hardware pretty easy. Well, a lot easier than learning straight assembly. The library handles the bare metal stuff, like setting up the display and pushing bytes to and from the VDP. Surprisingly easy to get a handle on. If you are familiar with stuff like SDL or Allegro you can probably use LIBTI99 to make games or applications for the TI. 1 Quote Link to comment Share on other sites More sharing options...
Tursi Posted May 12, 2016 Share Posted May 12, 2016 (edited) It's just something I add to when I do dev myself... by making it public domain I figured I absolved myself of needing to do proper updates or support. But it's always nice to hear it's useful to someone else. I also have a port of it to the ColecoVision, in hopes that eventually my work will be portable between the two systems. libti99coleco Edited May 12, 2016 by Tursi Quote Link to comment Share on other sites More sharing options...
mindlord Posted May 17, 2016 Author Share Posted May 17, 2016 Here's the source to my LIBTI99 extensions. Header follows so you can see what's included (So far). I welcome suggestions. // VDP_help header for the TI-99/4A by Sean James aka Mindlord // 5/15/2016 // This code and library released into the Public Domain // You can copy this file and use it at will #ifndef VDP_HELP.H #define VDP_HELP.H // *** UTILITIES ------------------------------------------------------------------*** // ***reverse *** // utility function for revrese the order of bits in byte n. unsigned char reverse(unsigned char n); // *** Noise3D *** // Given 3 variables and a seed will always return the same random number with same // inputs. Close numbers tend to generate close results, but is still pretty random. unsigned long Noise3D (int x, int y, int z, int seed); // *** Noise *** // Returns a random integer from the seed number n. The same n always returns the same // result. unsigned long Noise (long n); //*** -----------------------------------------------------------------------------*** //*** Functions--------------------------------------------------------------------*** // *** char_blit *** // takes an ASCII Character buffer (a=95, "space"=32, etc..) and clears it, and the // next four characters and "blits" bytes into it at the specified xoffset and yoffset. // generally used internally for software sprites, but can also be used externally for // animation effects like opening doors. Bits that fall outside of the border of the // buffer characters are truncated automatically. void char_blit(int buffer, int xoffset, int yoffset, const unsigned char *bytes); // *** char_flip *** // Takes an ASCII Character source (a=95, "space"=32, etc..) and flips it horizontally // NOTE: I intend to extend this function to include vertical flips as well. void char_flip(int source); // *** char_pattern *** // Takes a "long long int" as a single numeric value and transforms it into a unsigned // char* for pumping into VDP memory. Totally unnecessary, but makes code a little cleaner. void char_pattern(int destination, unsigned long long bytes); // *** char_push *** // Takes an ASCII Character source (a=95, "space"=32, etc..) and pushes it offset pixels // into ASCII Character target. The dir parameter indicates the direction and type of PUSH // and accepts enumerated types of "push_dir." 0-3 "pushes" the pixels from source to target // and moves target pixels along with the offset as well, adavancing all pixels by the offset. // 4-7 "shoves" the pixels from source to target overwriting the existing pixels and the target // pixels don't move in response. void char_push(int source, int target, int dir, int offset); // *** char_rotate *** // takes an ASCII Character buffer (a=95, "space"=32, etc..) and rotates it. // the dir parameter should be 0 for counter-clockwise (left) or 1 for clockwise (right). void char_rotate(int source, int dir); // *** sprite_motion // Set a sprite's auto motion variables void sprite_motion(int n, int x, int y); // *** sprite_position // set a sprite's position variables void sprite_position(int n, int x, int y); // *** sprite_pattern // set a sprite's pattern variable void sprite_pattern(int n, int ch); // *** sprint_color // set a sprite's color void sprite_color(int n, int col); // *** get_sprite // fills the variables with the sprite information void get_sprite(int n, int *ch, int *col, int *x, int *y); #endif vdp_help.zip 4 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.