Jump to content


The Codex

Recommended Posts

Magellan is ready and setting sail. Attached is a ZIP with the JAR file and startup scripts, plus a simple guide text. For those of you running Windows, there is an executable version included as well. You may need the latest Java (version 1.6) installed to run this, I haven't tested it with earlier versions but I suspect the repaint code may not function the same under those. Anyway, if you try it out, let me know what you think, and also if you encounter any problems.




An example file is included, plus a "default" file that contains the standard character set in Extended BASIC.


Thanks muchly!


UPDATED DOWNLOAD: Magellan (by Rasmus)


NEW RELEASE - Version 1.1


  • VDP Import
  • Character Swap/Replace
  • "About" dialog, includes version number
  • Fixed problematic map delete functionality
  • Fixed minor format error is assembler output (only affects small map sizes)




  • Swap Character Images seems to not quite work in every scenario (try it without swapping the actual chars when both chars are present in a map)
  • VDP background color setting may need some work




  • Sprite editor (possibly with data claimed from character dock OR tie the app to Charcot for sprite editing)
  • DSK format export
  • ColecoVision export
  • Map Gallery
  • Partial character set import, to add tiles to existing projects
  • Support linefeed in text typing
  • Drag-and-Drop character image between buttons
  • Proportional Rotate
  • Metadata/Code assigned to map segments
  • Undo/Redo






  • Default TI character set loaded on startup
  • Copy and paste between maps
  • Lots of bugs stomped on (metaphorically)



UPDATED - Version 0.9


  • Clone (copy/paste) region
  • Right-clicking and Right-dragging the mouse on the map canvas uses the eraser (replaces tiles with spaces)
  • Binary export (does not support Sprite data yet)
  • Magnifications up to 8x now available
  • Hex character indicator is now in uppercase and with > prefix, to help distinguish it from integer indicator
  • Fixed image import, which wasn't setting colors and chars properly with the new expanded character set



UPDATED & PATCHED - Version 0.8


  • Support for lower mem (0-31) and upper mem (144-256) characters
  • User can choose to view expanded character set or standard one in Dock (app remembers preference)
  • Import color character image (and derive colorsets from)
  • Text Cursor & toggle button (preference remembered)
  • Text Cursor wraps to next line when typing past end of current line
  • Map Counter
  • Char range definition in save file; detect when this is missing and load using the old default char range
  • Mouse grid position indicator (can toggle, setting is remembered)
  • Remembers your "Show Grid" preference for the main map area
  • Remembers your choices for character range typically exported
  • Colorsets are saved based on character range exported, so the set number is included as part of the DATA now
  • XB export only exports the colorsets that match the requested character range
  • BASIC and XB exports are restricted to the legal character sets for those languages
  • XB export has been fixed, along with some minor other issues



UPDATED - Version 0.7


  • Custom map dimensions - make map grids of any reasonable size
  • Scrolling canvas - scroll around the map when working with large layouts or high magnifications
  • Type characters directly into map
  • Change map order with "Map Backward/Map Forward" tool buttons
  • "Current Map Only" checkbox in export dialog saves full definition file but only the current map data
  • Fixed glitch where choosing a colorset button lost the current active character selection



Version 0.6

  • Each map has its own screen color now - this affects file data formats in the following ways:
    • File load/save supports per-map screen colors, current version has backwards compatibility with older saved maps
    • Assembler output adds a new line for each map in this format (color is an integer value, like 15):
      MC1 DATA 15 ;
    • XB output includes data lines and code to set the individual screen color before drawing each map, like this:
      REM MAP #1
      900 DATA 1 (this is the new color definition line)
      910 DATA 32, 32, 32, 32, ... (map data lines)

    [*]Color Dock replaces dropdowns and allows convenient "left-click sets foreground color, right-click sets background color"

    [*]Shift character grid

    [*]Border on active char in Dock

    [*]Comments in exported code (XB and Assembler) are now optional, select if you want them during export

    [*]User prefs (remembers "last used" settings, so far magnification and whether you tend to include comments in your exports)

    [*]Fixed issues with map loading & append where extraneous map duplication or other data errors could occur



Version 0.5

  • Import a monochrome PNG to use as character data
  • Export monochrome & color PNG dump of the character set
  • Export color PNG image of map
  • "Smart" draw/erase mode (also removed Draw and Erase buttons, as they are now obsolete)
  • Fixed character editor flicker
  • Fixed ASM export (didn't loop through maps, removed extra padding space before commands)
  • Grid now scales and displays properly
  • Map effects (clear, fill, toggle grid) now display immediately
  • Append Maps adds saved maps to the current project (appended maps inherit the current project's charset and colorset data)
  • Addition of Append Maps means that Open Map Project now wipes the current workspace before loading a saved map project


Version 0.4


  • Multimap support (multiple maps sharing same character set in one file)
  • Assembler export
  • Smarter "look" tool stays active when mousing, switches to edit state when clicked
  • Removed "blank" character, maps now use SPACE for clear tiles
  • "New Project" menu option lets you start a new map set conveniently
  • Export options have their own menu
  • XB Exec code draws all saved maps, uses keypress to wait between draws


Version 0.3


  • "Character look" selector tool (click on the map to choose the active character for painting and editing).
  • Flip character graphic horizontally and vertically.
  • Invert character graphic.
  • Better layout code keeps interface elements in a consistent size and place.
  • Better XB output files.


Version 0.2


  • Correct XB output, with the opportunity to output all data, or only XB allowed characters (with a screen drawing wrapper included).
  • Included "default.mag" file lets you load the standard TI XB character set.
  • Minor fixes throughout.
  • No more CPU hogging, unless you've got an older system that takes a while to render images regardless of the program.
  • Like 1
Link to comment
Share on other sites

Really? Which ones? Because I tried to do it so that even the map DATA statements would always be below 140 characters (in some cases just barely). If you can post the .mag file I'll take a look at it after I export it here. Hopefully it's something I can fix quickly.

Link to comment
Share on other sites

Here's my first screen





This is what "Export to XB" gave me...






9000 CALL SCREEN(13)






9010 CALL COLOR(1,1,0)


9020 CALL COLOR(2,1,0)


9030 CALL COLOR(3,1,0)


9040 CALL COLOR(4,1,0)


9050 CALL COLOR(5,1,0)


9060 CALL COLOR(6,1,0)


9070 CALL COLOR(7,1,0)


9080 CALL COLOR(8,1,0)


9090 CALL COLOR(9,1,0)


9100 CALL COLOR(10,1,0)


9110 CALL COLOR(11,1,0)


9120 CALL COLOR(12,1,0)


9130 CALL COLOR(13,5,2)


9140 CALL COLOR(14,1,0)


9150 CALL COLOR(15,1,0)


9160 CALL COLOR(16,1,0)






9170 DATA 128,"0000607c78380000",136,"1010ff8282ff1010"






9180 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32


9190 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,128,32,32,128,32,32


9200 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,128,32,32,32,32,32,32,128


9210 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,128,32,32,32,32,32,32,128


9220 DATA 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,128,32,32,32,32,128,32


9230 DATA 32,32,32,32,136,136,136,136,136,32,32,32,32,32,32,32,136,136,136,136,136,32,32,32,32,32,128,128,128,128,32,32


9240 DATA 32,32,32,32,136,128,128,128,136,136,136,136,136,136,136,136,136,128,128,128,136,32,32,32,32,32,32,128,128,32,32,32


9250 DATA 32,32,32,32,136,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,136,32,32,32,32,32,32,32,32,32,32,32


9260 DATA 32,32,32,32,136,128,128,128,136,136,136,136,128,136,136,136,136,128,128,128,136,32,32,32,32,32,32,32,32,32,32,32


9270 DATA 32,32,32,32,136,136,136,136,136,32,32,136,128,136,32,32,136,136,136,136,136,32,32,32,32,32,32,32,32,32,32,32


9280 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32


9290 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32


9300 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136


9310 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,128,136,128,136,128,128,128,136,128,136,136,128,136,128,136,136,128


9320 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,128,136,128,136,128,136,128,136,128,128,136,128,136,128,136,128,136


9330 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,128,128,128,136,128,136,128,136,128,136,128,128,136,128,128,136,136


9340 DATA 32,32,32,32,32,32,32,32,32,32,136,136,128,136,136,128,136,128,136,128,128,128,136,128,136,136,128,136,128,136,128,136


9350 DATA 32,32,32,32,32,32,32,32,32,32,136,136,128,136,136,128,136,128,136,128,136,128,136,128,136,136,128,136,128,136,136,128


9360 DATA 32,32,32,32,32,32,32,32,32,32,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136


9370 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,128,136,128,128,128,128,128,136,128,136,128,136,136,136,136,136,136


9380 DATA 32,32,32,32,32,32,32,32,32,32,32,136,128,136,136,128,136,128,136,136,136,128,136,128,136,128,136,136,136,136,136,136


9390 DATA 32,32,32,32,32,32,32,136,136,136,136,136,128,128,128,128,136,128,136,136,136,128,136,128,136,128,136,136,136,136,136,136


9400 DATA 32,32,32,32,32,32,32,136,136,136,136,136,136,136,136,128,136,128,136,136,136,128,136,128,136,128,136,136,136,136,136,136


9410 DATA 32,32,32,32,32,32,32,136,128,128,128,128,128,128,128,128,136,128,128,128,128,128,136,128,128,128,136,136,136,136,136,136



  • Like 1
Link to comment
Share on other sites

Alright Mr. Codex--- couple more thoughts. In the above picture, I ported over all my graphics from my XB program. This took quite a while because I couldn't "paste" into the hex field below the character definition block. Perhaps there is an easier way to import graphics, maybe using a .XB file? I just did it by hand because I was having fun. :). A paste function would be great though! Also, how do I use the non-defined characters? For instance, is there a way to put text on the screen? Of course it wouldn't be hard to do it in XB once the map is exported and in XB form, but I was just wondering if it were possible---for length of text testing. BTW, this new release is amazing. So smooth!!!! Thanks again man!!

Link to comment
Share on other sites

Okay, the line overflow is an easy fix. I can change the output so that one map row becomes two DATA statements, instead of one. That should remove any overly long lines from the generated source.


As for the character editor, you should be able to paste hex strings into that. You need to hit the "Set Char" button after you do that in order to update the editor with the hex value though. I could change it so that the editor automatically picks up any changes, but this can lead to errors if you are manually typing in a hex string, as the string is incomplete until you've entered it all and the editor doesn't like that. :)


Your question on using the undefined characters gives me another idea. I will create a default map that can be loaded that contains the defined TI character set, so that you have those available right away. Then you can use them to place text and other standard BASIC characters immediately, as well as seeing how they look as you tweak them on the fly. Look for that and the other changes in the next release!

Link to comment
Share on other sites

Awesome man!! I need to figure out why I can't paste hex strings into that field... I tried to right click to paste, but no dropdown menu appeared--- it would appear in other places-- such as on the desktop... Maybe I'll try again after I restart the computer... We shall see. :) Another cool

addition I mentioned before would e a separate screen where you could load multiple .mag files or screen representations to have the ability to draw a world map. I'm doing it manually right now, and it's not bad. But it would be cool to be able to pull up your whole map. :). Love this program... one more question...how are you "drawing" the screens in XB? Looking at the output source, I don't see DISPLAY AT or CALL HCHARs.. I haven't been able to successfully run an output listing so I'm very curious. Great job man!!!

Link to comment
Share on other sites

Looking forward seeing how this further develops. Tried it with my company computer (which has an older java runtime) and can confirm that it doesn't work there. Will try with my home computer, I mean my PC at home :D


As far as the export function is concerned; You might want to add an option for generating the DATA statement for

inclusion in assembly language source. If this turns into a real map editor, we could perhaps work out a format for easily

drawing the generated screens in assembly language? I would be interested in adding such routines to my SPECTRA library ;)

Link to comment
Share on other sites

Sure thing Filip, it's easy to implement new export formats into the program. I tinkered with the idea of creating a compressor for XB output as well (turning the character values in the map DATA into hex pairs, for example), but that would be later down the line. Any kind of export format you like can be implemented sooner, I just need a rundown of the format syntax.


And Owen, I'll add another version of the XB exporter that includes some lines to make the map executable, so that it can be run immediately. This code will also provide an easy framework for loading the maps in XB in a more general sense.

Link to comment
Share on other sites

Well... there actually seems to be two limits for line length in TI Basic. The first one is the "hard limit" of 140 characters which you can enter... the system just won't take any more. Actually, this limit is not as hard as it seems. There are some places where a space will be inserted if you didn't put it there yourself, for instance, before and after each !! and after each comma delimiting function parameters or data items. So you might enter a line which is just below 140 characters long, and then the actual result takes up more than 5 lines on screen. If you edit that, the additional spaces stay there, and as a result you will get to edit a line which is longer than 5 lines on screen. And if it's now 5 lines and a half, you get to fill that 6th line entirely, so the limit now has moved up to 168 characters! In fact, you are allowed to do this several times... until you hit the 2nd limit.


The 2nd limit seems to have to do with the internal representation of the lines entered. This is what gives you a "line too long" message if it's exceeded. I guess the limit here is about 160 characters. Now if you use commands like "Call", those get shortened to 1 byte in memory. However, commas delimiting values actually get blown up to 3 bytes in memory (don't know what these are used for, but they are there). Therefore, if you have a data statement with 32 numeric values, each of those will be delimited by 3 bytes, so that a three-digit number ends up consuming 6 bytes. And as there's a line length limit of 160 bytes, only 26 of those numbers will be allowed in a DATA statement, while 32 of them will yield "Line too long".


On the other hand, you might compress several CALL COLOR statements to one as it's allowed to color in multiple things at once. So instead of writing:


9010 CALL COLOR(1,1,0)


9020 CALL COLOR(2,1,0)


9030 CALL COLOR(3,1,0)


You might write:


9010 CALL COLOR(1,1,0, 2,1,0, 3,1,0)


(the space between each character set isn't required, it's only there to make the line more readable)




Really? Which ones? Because I tried to do it so that even the map DATA statements would always be below 140 characters (in some cases just barely). If you can post the .mag file I'll take a look at it after I export it here. Hopefully it's something I can fix quickly.

Link to comment
Share on other sites

Thanks for the info Kurt, that helps explain the limits. I realise the color sets could be compressed, but I left them at one per line in case the user wants to delete ones which are default values, or change them manually later.


A bigger change I might implement down the line is configurable map sizes. Right now it's always fullscreen dimensions, but there's no reason it couldn't handle smaller ones. That's something I'll look at during the multi-map changes.

Link to comment
Share on other sites

Okay Codex. Here's a short lil' routine to draw (slowly) a screen using your DATA statements.



105 ROW=1 :: COLUMN=1


111 NEXT C

120 GOTO 120






I haven't done it/tried it yet because I don't have 768 characters in data statements, but that would draw the screen... Just add that in to the XB output. =)


Hope it works.

Edited by Opry99er
Link to comment
Share on other sites

Screens look great man! I've got some XB rendering code in the export now. You can export either XB Data or XB Exec, the latter has the added command lines but makes some other changes too. Namely, it comments out the CALL COLOR lines that are not available in XB (color sets 15 and 16), and it excludes characters above 143 (which are also not available in XB). In the map DATA statements it replaces these disallowed characters with spaces. So if you are designing for XB, don't use any characters above set 14.


If anyone knows how to make these higher character and color sets available in XB, please let me know and I'll amend the export process to implement this change. In the meantime, if you want to get all your data, export using XB Data. This doesn't exclude anything, but it means that there are likely to be some disallowed lines in there should you choose to move it into XB without modifying it first.


I will post this new version soon. There are other fixes in this release as well. I hope to bring down the CPU hammering at some point too.

Link to comment
Share on other sites

Almost anything is possible.


The XB layout in VDP should be as follows. The space for character patterns are >400 thru >780. The sprite motion table can’t be relocated (I believe it’s hardcoded in the ISR/kernel). But if you wouldn’t use auto sprite motion etc.


>780 - >400 = >380 bytes

>380 / 8 = >70 characters

>70 / 8 = >E = 14 sets





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.

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.

  • Recently Browsing   0 members

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