Jump to content
IGNORED

Sprite sheets?


Boschloo

Recommended Posts

Does the TI-99/4A handle any sort of bitmap sprite sheets? I'm guessing there's no .PCX or .BMP readable by the computer, or anything like that. Must all sprites be hardware sprites, hand coded?

I'm thinking of doing a game on the TI, and apparently there are C compilers for it. C sounds attractive for this project as I'm not really looking forward to reading those 500 pages of TI-99/4a Editor/Assembler manual. Unless I have to, of course.

Link to comment
Share on other sites

You're going to have to learn the VDP and sound chip at the hardware level to do any kind of game on the TI, whether you use C or assembly. There's not much for safe comfortable wrappers, even BASIC requires you to get down into the weeds with hex patterns.

 

The sound chip is simple and you can learn it in a few minutes. The VDP will take a little more time.

 

There are no sprite sheets. However, you can use Magellan to draw background maps and sprites and export the data in a format that can be imported into your source code. That's probably as close as it's going to get. 

 

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Boschloo said:

Does the TI-99/4A handle any sort of bitmap sprite sheets? I'm guessing there's no .PCX or .BMP readable by the computer, or anything like that. Must all sprites be hardware sprites, hand coded?

I'm thinking of doing a game on the TI, and apparently there are C compilers for it. C sounds attractive for this project as I'm not really looking forward to reading those 500 pages of TI-99/4a Editor/Assembler manual. Unless I have to, of course.

 

 

2 hours ago, Tursi said:

You're going to have to learn the VDP and sound chip at the hardware level to do any kind of game on the TI, whether you use C or assembly. There's not much for safe comfortable wrappers, even BASIC requires you to get down into the weeds with hex patterns.

 

The sound chip is simple and you can learn it in a few minutes. The VDP will take a little more time.

 

There are no sprite sheets. However, you can use Magellan to draw background maps and sprites and export the data in a format that can be imported into your source code. That's probably as close as it's going to get. 

 

 

  • Haha 1
Link to comment
Share on other sites

On 10/27/2023 at 11:40 AM, Tursi said:

You're going to have to learn the VDP and sound chip at the hardware level to do any kind of game on the TI, whether you use C or assembly. There's not much for safe comfortable wrappers, even BASIC requires you to get down into the weeds with hex patterns.

 

The sound chip is simple and you can learn it in a few minutes. The VDP will take a little more time.

 

There are no sprite sheets. However, you can use Magellan to draw background maps and sprites and export the data in a format that can be imported into your source code. That's probably as close as it's going to get. 

 

 

Is this how that other fellow was porting GHOSTBUSTERS to the TI-99/4A?

Link to comment
Share on other sites

On 10/30/2023 at 8:54 AM, Boschloo said:

Is this how that other fellow was porting GHOSTBUSTERS to the TI-99/4A?

We all have our own workflows (and custom built tools) based on the above principles, I think.

 

I generally prepare my artwork in Gimp, not because Gimp is the best program for this, but because it's the one I'm the most comfortable with. For Ghostbusters, this was a combination of reworking SMS screenshots and creating my own art from scratch with some of the originals (mostly C64) as inspiration, with the limitations of the VDP taken into account. The main spite sheet for Ghostbusters looks like this (note the separation of different colors into different sprites, this is a must for the TI):

main_spritesheet.png.a1068db28ce034898d9b28713a58a74a.png

 

I then export these images as 16 color indexed pngs (using the correct 16 color palette matching the native tms9918a palette) and run them through a bunch of command line tools that I've developed over time. These tools verify once more that all the constraints are met, convert the images into something that the VDP can understand and spits out raw binary files (I use a .dat extension for those). This is why Tursi talks about learning how the VDP works: it expects data to be provided in a very specific set of formats that in no way resemble how images are stored on modern computers, knowing the ins and outs of this is instrumental to writing great looking games on the TI (and any other computer of the era, really). Anyway, an example tool might be invoked as such:

./9918patterns -f main_sheet.png -s -o main_sprites

 

This will spit out a file called main_sprites.dat

 

Eventually, my custom build system uses the gcc linker to include these .dat files in the rom, and I generate a .h include file with a bunch of #defines that point to the right place in the rom image for each file. I have created two functions that you can call to move data from rom to ram or vram. Loading sprite patterins into VRAM might look something like this:

rom_to_vram(main_sprites_bank, main_sprites_offset, main_sprites_length, SDT * 0x800);

 

Where the main_sprites_* tokens are the #defines I was talking about before (indicate in which rom bank the file starts, at which offset within the bank, and how many bytes it contains), and the "SDT * 0x800" is the location in VRAM where the patterns will be uploaded to.

 

Then, ultimately, to show the sprite in the screen, you'll need to write some code that again puts the right bytes into vram to give it a color and position on the screen. This can be done using Tursi's libti99

 

I do work on a more user-friendly tool, on an on-and-off basis, that let's you do this using a proper UI, but that's far from being done and is really focused on side scrolling platformers only:

 

And as Tursi mentioned, Magellan is an awesome tool as well, that is actually available and used widely throughout the community. I even have a custom tool to convert .mgb files from Magellan into those .dat files that I always use myself :). I would highly recommend that you start with that, with some learning and persistence, it should get you a long way.

 

Good luck!

 

 

 

 

  • Like 10
Link to comment
Share on other sites

you can make some decent games on the TI99 using compiled XB256. You will, of course, have to work around the limitations of the machine as well as the limitations of XB256. I use Magellan to create my sprite and background character definitions - I used to do it by hand back in the day.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Cheung said:

you can make some decent games on the TI99 using compiled XB256. You will, of course, have to work around the limitations of the machine as well as the limitations of XB256. I use Magellan to create my sprite and background character definitions - I used to do it by hand back in the day.

Very true, Magellan does support exporting to BASIC data statements, so there are tools around that you can use to convert a .png into the appropriate data format.

Edited by TheMole
Link to comment
Share on other sites

On my PC, I like using GraphiCV, a tool developed in Java by @unhuman. It lets you do not only sprites but layer up to four of them on top of each other. You can also do bitmap graphics.

 

 

For RoA, I rolled my own sprite editor on the TI itself that loaded and saved data from and to the binary file directly, so I could make quick edits as needed.

 

  • Like 4
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...