Jump to content
IGNORED

Magellan


The Codex

Recommended Posts

6 hours ago, thegeps said:

can you help with this? 

What is the format of a binary metatile map? I assume it would contain both the map and a mapping of 8x8 characters to metatiles? What would you expect Magellan to do with the imported data, would it use it to generate an expanded map of 8x8 characters?

 

Maybe you should import a map image instead of importing a character set?

 

The export to Assemble Data has an option to compress to metatiles, which will generate both the map and the mapping of 8x8 characters to metatiles, but that's not binary, of course. 

 

  • Like 1
Link to comment
Share on other sites

4x4, not 8x8 but well, the way is the same...

The binary format of tiles is simply the tiles description:

A tile is 4x4=16chars. A tileset is 256 tiles

So a 4x4 tileset is a binary (without header) where are stored sequentially the chars contained in each tiles:

16 values for fist tile

16 for the second

16 for third and so on till the last 16 values for 256th tile.

So a 4x4 tileset is 4096 bytes.

A tilemap binary file is a list of tiles that build the map (without header). So to import them you have to provide the tile dimensions 1x1,2x2, 4x4 and even 8x8 (but I doubt someone will use so big maps) and map dimensions (in tile).

Imported tileset has to make necessary screens filled with such 2x2, 4x4 or 8x8 squares so a gfx artist can do a select/copy/past to draw maps.

Tilemap could be the real challenge because due to the dimensions a scrollable windows should be implemented...

But actually I need only the tileset (easier), not the map. So the gfx artist could import tiles and see how they are compared to the C64 ones and so retouch them. The tilemap still could be worked on charpad (the artist should be able to try some tiles combinations by drag and drop from tileset screens).

As I said the tileset import has to be done with an already loaded charset (so tiles can be buold/rebulid with it)

Link to comment
Share on other sites

31 minutes ago, thegeps said:

4x4, not 8x8 but well, the way is the same...

The binary format of tiles is simply the tiles description:

A tile is 4x4=16chars. A tileset is 256 tiles

So a 4x4 tileset is a binary (without header) where are stored sequentially the chars contained in each tiles:

16 values for fist tile

16 for the second

16 for third and so on till the last 16 values for 256th tile.

So a 4x4 tileset is 4096 bytes.

A tilemap binary file is a list of tiles that build the map (without header). So to import them you have to provide the tile dimensions 1x1,2x2, 4x4 and even 8x8 (but I doubt someone will use so big maps) and map dimensions (in tile).

Imported tileset has to make necessary screens filled with such 2x2, 4x4 or 8x8 squares so a gfx artist can do a select/copy/past to draw maps.

Tilemap could be the real challenge because due to the dimensions a scrollable windows should be implemented...

But actually I need only the tileset (easier), not the map. So the gfx artist could import tiles and see how they are compared to the C64 ones and so retouch them. The tilemap still could be worked on charpad (the artist should be able to try some tiles combinations by drag and drop from tileset screens).

As I said the tileset import has to be done with an already loaded charset (so tiles can be buold/rebulid with it)

>> 4x4, not 8x8 but well, the way is the same...

I was talking about 8x8 pixels in a character, not 8x8 characters in a metatile.

 

OK, so a tileset for 4x4 metatiles is a 4096 bytes file, defining the 16 chars each of the 256 metatiles consists of. What would Magellan do after importing such a file?  

 

>> Tilemap could be the real challenge because due to the dimensions a scrollable windows should be implemented...

What do you mean by that?

 

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Asmusr said:

>> 4x4, not 8x8 but well, the way is the same...

I was talking about 8x8 pixels in a character, not 8x8 characters in a metatile.

 

OK, so a tileset for 4x4 metatiles is a 4096 bytes file, defining the 16 chars each of the 256 metatiles consists of. What would Magellan do after importing such a file?  

 

>> Tilemap could be the real challenge because due to the dimensions a scrollable windows should be implemented...

What do you mean by that?

 

 

 

After importing the tileset Magellan should build some screens containing rebuilded tiles:

Each screen will contain 48 4x4 tiles (6row of 8 tiles each) so Magellan should build 6 screen max (or is it possible to define bigger screens? Never tried to do it)

 

About tilemap challenge I mean that rebuild both tileset and then the tilemap too is a challenge. A map could be REALLY big: Turrican level1-1 map is 137x51 4x4 tiles, so 548x204 chars. I don't know if Magellan can manage it and if so if it use side snd bottom scrollbars to explore the map. I've always used Magellan for 32x24 single screen maps till now...

Edited by thegeps
Link to comment
Share on other sites

12 hours ago, thegeps said:

About tilemap challenge I mean that rebuild both tileset and then the tilemap too is a challenge. A map could be REALLY big: Turrican level1-1 map is 137x51 4x4 tiles, so 548x204 chars. I don't know if Magellan can manage it and if so if it use side snd bottom scrollbars to explore the map. I've always used Magellan for 32x24 single screen maps till now...

To work with a map that big you need to allow Magellan to allocate more ram by starting it with -J-Xmx2G as parameter, which will allow it allocate 2GB RAM. That's on Windows, I don't think it's necessary on other platforms. If you have a png image of the map (or part of the map) you can try to import it, and it will automatically deduplicate the characters.

  • Like 1
Link to comment
Share on other sites

Yep, but as I said the tilemap import isn't so necessary. It is the tileset import what is needed to try a d modify the gfx.

The tilemap image imported from charpad would have the C64 gfx constraints so it will.be adapted from Magellan but it need work to fix the character set.

Msx chars are already done (on Magellan) but he wants to import the tileset and possibly the maps that he jas already done on charpad for c64 version.

Importing the tileset will.allow him to work only on maps and before that, to improve the charset by having the tiles ready to work with.

 

About Turrican Project I don't need map import (I'm fine with binaries from charpad). Again here is the tileset what I need to fix some gfx glitches when I find some by impirting and.modifying C64 gfx

Link to comment
Share on other sites

On 2/20/2022 at 10:51 AM, thegeps said:

Yep, but as I said the tilemap import isn't so necessary. It is the tileset import what is needed to try a d modify the gfx.

The tilemap image imported from charpad would have the C64 gfx constraints so it will.be adapted from Magellan but it need work to fix the character set.

Msx chars are already done (on Magellan) but he wants to import the tileset and possibly the maps that he jas already done on charpad for c64 version.

Importing the tileset will.allow him to work only on maps and before that, to improve the charset by having the tiles ready to work with.

 

About Turrican Project I don't need map import (I'm fine with binaries from charpad). Again here is the tileset what I need to fix some gfx glitches when I find some by impirting and.modifying C64 gfx

As a minimal solution, I have added an import option for a binary map. That should allow you to import the tileset if you start by making a tall, narrow map the same width as a metatile, e.g. 4x128. After the import you can make the map wider and use the clone tool to rearrange it, if you want.

 

I think this could also be useful for other purposes more directly linked to the TI-99/4A. I would like to add full metatile support to Magellan one day, but not until I have a project of my own where I need it.  

  • Like 2
Link to comment
Share on other sites

it isn't working as expected. I've tried both 2x2 and 4x4 tiles.

 

say we have some 2x2 tiles like these:

 

 

tile1             tile2             tile3               tile4

1,2              5,6              9,10               7,3

3,4              7,8              11,12             9,1

 

after I've selected map width 512 and height 2 (256 tiles 2x2 chars) and imported map bin, the result is

 

1,2,3,4,5,6,7,8,9,10,11,12,7,3,9,1......

...........................................................

 

instead of

 

1,2,5,6,9,10,7,3...........

3,4,7,8,11,12,9,1.........

 

 

same for 4x4 tiles:    W 1024 H 4  (256 tiles 4x4 chars)

 

 

1111         2222         3333              4444

1111         2222         3333              4444

1111         2222         3333              4444

1111         2222         3333              4444

 

we have

 

1111111111111111222222222222222233333333333333334444444444444444...............

...............................................................................................................................................

...............................................................................................................................................

...............................................................................................................................................

 

instead of

 

 

1111222233334444........................

1111222233334444........................

1111222233334444........................

1111222233334444..........................

Link to comment
Share on other sites

probably I didn't explain it well:

the tileset is exported as magellan is displaying it. the chars contained in a tile are stored sequentially, but they have to be displayed as a grid so if you have a 4 chars height screen it has to display first 4 chars in the first line, then 2nd four char group in the 2nd line, 3rd group in 3rd line and the last 4 in the 4th line, then again 4 to 1st, 4 to 2nd, 4 to 3rd 4 to 4th and again and again and so on

if screen is 2 chars tall, then you have 2x2 tiles:

2 on first row

2 on 2nd row

then the next tile:

2 on first row

2 on second row

and so on

Link to comment
Share on other sites

1 hour ago, thegeps said:

probably I didn't explain it well:

the tileset is exported as magellan is displaying it. the chars contained in a tile are stored sequentially, but they have to be displayed as a grid so if you have a 4 chars height screen it has to display first 4 chars in the first line, then 2nd four char group in the 2nd line, 3rd group in 3rd line and the last 4 in the 4th line, then again 4 to 1st, 4 to 2nd, 4 to 3rd 4 to 4th and again and again and so on

if screen is 2 chars tall, then you have 2x2 tiles:

2 on first row

2 on 2nd row

then the next tile:

2 on first row

2 on second row

and so on

I suggested to use a map with a width of 2, not a height of 2.

Link to comment
Share on other sites

  • 2 months later...

I have released a new version with two new tools:

  • Load Overlay Image allows you to load an image that will be displayed semi-transparently on top of your maps (stretched to fit). I used it to place objects on pinball maps based on images from other games. The overlay is not saved as part of your project, so next time you need it you will have to load it again. 
  • Show Number of Sprites per Line displays a bar next to the map indicating with colors how many sprites you have used on each line. Again something I used for pinball maps, because counting the number of sprites can be difficult when they partially overlap.

https://magellan.js99er.net

  

  • Like 16
Link to comment
Share on other sites

  • 4 weeks later...

In the "Characters" tab, the ASCII number is displayed as well the equivalent HEX value above the 8x8 pixels character block between the rotate and shift up buttons. It's very practical. But  in a future version could you also add the initial TI ASCII character (non modified) maybe under the 8x8 block, between the flip and shift down buttons. It would be very useful too. 

Magellan is a great and essential tool, thank you for your great work.

 

Edited by fabrice montupet
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 4 months later...

Just a question. is it possible to select several chars at time (maybe a block of contiguous ones) and copy them everywhere in the charset?

I have 128 defined chars (0-127). I need to copy them all also to 128-255 so I can flip them vertically... (it could be useful also a "flip all horizontal/vertical" function on selected chars)

Link to comment
Share on other sites

1 hour ago, thegeps said:

is it possible to select several chars at time (maybe a block of contiguous ones) and copy them everywhere in the charset?

No but you can open the mag file in a text editor and copy the relevant CH lines to the right place. Just be careful not to introduce any extra lines.

  • Like 3
Link to comment
Share on other sites

  • 1 month later...

Hello all, I'm using this amazing tool for a new project I'm developing. Loving it, such an amazing productivity booster!

 

Question, I'm using XB256 as my dev target and I feel like my project would benefit from having the ability to export the map data via a RLE compression scheme.  Is this feature available anywhere in the tool? Has anyone implemented such a thing on the TI, maybe using a nice assembly routine to decompress the data?

 

If not, I may pursue adding this myself if that sort of contribution is welcomed.

 

  • Like 1
Link to comment
Share on other sites

18 minutes ago, retrodroid said:

Hello all, I'm using this amazing tool for a new project I'm developing. Loving it, such an amazing productivity booster!

 

Question, I'm using XB256 as my dev target and I feel like my project would benefit from having the ability to export the map data via a RLE compression scheme.  Is this feature available anywhere in the tool? Has anyone implemented such a thing on the TI, maybe using a nice assembly routine to decompress the data?

 

If not, I may pursue adding this myself if that sort of contribution is welcomed.

 

RLE is currently only available for assembly data export. Anyone is welcome to contribute. 

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I've been playing around with a few character definitions in Magellan.  Is there a way to copy and paste more than one character definition at a time?   For example, I want to copy the 16 characters in "15 and 16" to "U1 and U2", so that I can modify/manipulate them.   The image screen to the right allows for copy/paste of multiple patterns, so I'm hopeful there is an easy answer to my question.  Thank you.

image.png.778450b3fd69adfec462f97bb5f93e42.png

  • Thanks 1
Link to comment
Share on other sites

I gave it a whirl.  Editing the .mag file in Notepad didn't work well (for me) to manipulate smaller chunks of character definitions.  I spent a lot of time trying to locate the right patterns and determine where to copy them in the list to show up as the right pattern block, often unsuccessfully.  I eventually returned to the GUI, where I individually copied/pasted each pattern.  I am thinking that I could create a single set of characters and duplicate it in VDP via my program, though this limits how well I can portray the screens in Magellan.   (The "duplicate" characters allow me to place the same pattern with a different fore/background color.)

Link to comment
Share on other sites

I had no problem in copying chars when I tried. Did you pay attention to not introduce extra lines?

If you copy and paste 16 characters (without selecting, before, the 16 chars to change) then you need to delete 16 chars (just to say)

Anyway, if you generate a screen you can take a screenshot from an emulatotor (if it can generate the exact resolution screenshoots) and then import the image on Magellan. It will automatically extract all the characters from the image

  • Like 3
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...