Jump to content
IGNORED

Silk Worm: WIP!


Philsan

Recommended Posts

All I'm talking about is something like this, though I'll describe it for one charset, though it just needs duplicating for 3 sets..

I've tried looking for the 6502 I wrote for doing this, but it's not on either desktop machine here, so it's lurking on one of the laptops somewhere..

 

In c brain dump because I'm half asleep still, but it's nothing complex at all..

int charmap1[VirtualCharacterSetSize];
int charmap2[HardwareCharacterSetSize];
int refcount[HardwareCharacterSetSize];

// Insert a character from the larger virtual character set into the actual hardware character set and return the character index it's now located in..
int insertCharacter(int character)
{
if (charmap1[character] != -1)
{
 refcount[charmap1[character]]++;
 return charmap1[character];
}
if (freecount == 0) return -1;

int dstchar = freelist[freecount]
freecount--;
refcount[dstchar]++;
charmap1[character] = dstchar;
charmap2[dstchar] = character;
memcopy(&charsetHW[dstchar*, &charsetSW[srcchar*8], ;
return destchar;
}

// Release a reference on a character in the hardware character set.. If there's no more references to it in use, then free the character..
void freeCharacter(int character)
{
refcount[character]--;
if (refcount[character]) return;

charmap1[charmap2[character]] = -1; // Clearing the 2 maps isn't important really, unless you want to debug sensibly..
charmap2[character] = -1;

freecount++;
freelist[freecount] = character;
}

 

What I like about this, is it's not expensive at all, and also allows the levels to use >256 characters rather nicely since we can support 9/10/11 bit character sets.. Hell, you can even make it appear like you have hardware XY flipping available by making 2 of the bits control that..

There's probably some mistake in the above, as I'm coffee free and running around like a loon while just brain dumping that, but the idea should be simple enough..

  • Like 1
Link to comment
Share on other sites

  • 7 years later...

as promised, the char mode example is in progress. Please bare in mind that my examples are only for the purposes of demonstrating things done via the chars method after the discussion here last week and not to slight the forthcoming actual game. In hindsight I should have chosen another similar game to do a running demonstration but anyway, sprites will be added next... titles were added just for the enjoyment of doing it.

 

This demo seems to work fine in Atari800WinPLus, but fails in Altirra. Any reason for that?

Link to comment
Share on other sites

This demo seems to work fine in Atari800WinPLus, but fails in Altirra. Any reason for that?

The DLI (and the rest) was crudely written at the time. I should have the files somewhere in the archive to go back and fix it. I remember including the joystick cotrolled heli sprite in a later demo which was a softsprite with PMG overlay. The final intended example was to include some enemy sprite patterns.

Edited by Tezz
  • Like 4
Link to comment
Share on other sites

The DLI (and the rest) was crudely written at the time. I should have the files somewhere in the archive to go back and fix it. I remember including the joystick cotrolled heli sprite in a later demo which was a softsprite with PMG overlay. The final intended example was to include some enemy sprite patterns.

 

I used to boot it up and take a look every once in a while. Even with just the title screen and game screen with scrolling background, it looked good. But then at some point in upgrading Altirra it broke.

 

I'd love to see some further examples for this. But even just a fix for the current demo would be cool and appreciated.

 

It's a neat game. I guess the author who was originally working on this gave up or lost interest.

Link to comment
Share on other sites

I used to boot it up and take a look every once in a while. Even with just the title screen and game screen with scrolling background, it looked good. But then at some point in upgrading Altirra it broke.

 

I'd love to see some further examples for this. But even just a fix for the current demo would be cool and appreciated.

ok, I found it in one of my online backups. Quick fix is attached. It should be rewritten properly however and have the sprites procedures added at some point.

silkworm_test1b.xex

  • Like 8
Link to comment
Share on other sites

ok, I found it in one of my online backups. Quick fix is attached. It should be rewritten properly however and have the sprites procedures added at some point.

 

Thanks... good to see it working in Altirra Again. I'll have to try it out on real hardware later.

 

You've plans to actually do the full game, or just a few demos?

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...