Retro Graphics Toolkit
Page 2 of 2

Author:  nintendo8 [ Thu Aug 07, 2014 10:34 pm ]
Post subject:  Re: Retro Graphics Toolkit

If we are talking about the same thing it already supports PPU display format. In fact I made an example using Retro Graphics Toolkit for the NES see ... es/NES/asm
As for "4-quad" attributes do you mean if so Retro Graphics Toolkit already supports that. I will look into the Mario games format and add it. I think it would be a beneficial feature to have.

Author:  Hamtaro126 [ Fri Aug 08, 2014 12:09 am ]
Post subject:  Re: Retro Graphics Toolkit

The PPU format is the format based off RLE, but also allows uncompressed 32-byte tile display

Orbit2002 explained the format here:

SMB1 (and 2j) and 3 both can use the disassemblies if you add support:

SMB3DIS is by Southbird, SMBDIS and SMB2JDIS (Lost levels) are by Doppelganger and need credit when used. (SMBDIS) (SMB2jDIS) (SMB3DIS)

By 4-Quad, The Tileset is split into 4 mini-sets representing 4 color attributes within $00-$3F, $40-$7F, $80-$BF, and so forth...
These are colored indivisually to better suit Nintendo's graphical needs.

Author:  nintendo8 [ Fri Aug 08, 2014 7:33 pm ]
Post subject:  Re: Retro Graphics Toolkit

I now understand what you mean by "4-Quad". When I implement it I will let the user choice the divisor factor in-case they don't have 256 tiles. Also I will add support for the mario games.

Author:  nintendo8 [ Thu Oct 23, 2014 8:03 pm ]
Post subject:  Re: Retro Graphics Toolkit

I apologize for the double post but I am considering the direction of the project and I realize one big issue with this project in it's current state is the static nature of what you can do in Retro Graphics Toolkit that is you can only really do what I have coded for example there was not an automated way to sort palettes by hue lightness or saturation until I coded that feature in because I needed it for myself. You would have to have done it manually or modify the source code something that I would be happy to see but may be a challenge for some people. To remedy this issue I have decided to work on adding a scripting language that also can define importing and exporting rules that allow for custom file formats beyond what I have coded. I understand that the process of coming up with an idea of how the programming language should be and making it are easier than making one that is user friendly and one that is easy to program in. So it is for this reason that I have decided to announce early before any code exists that parses this in hopes that I can get feedback on my specification see ... -scripting. I would like to understand the needs of the users and viewpoints on the syntax I choice. I am wondering about the choice of newlines having meaning as some basic variants do or using a semicolon to end the statement like in C or java. The advantage of newlines ending the statement is that it may be a bit easier for beginner coders and it is less to type as most people would put a newline anyway. The disadvantage is that statements cannot be split into multiple lines. I am planning the code be compiled to bytecode instead of being parsed line by line so the code will have some speed to it.
Here is some example code with the current syntax
# Changes the palette using hue saturation lightness
gui double shifth<Shift hue by>,shifts<Shift saturation by>,shiftl<Shift lightness by>
begin main
end main
begin loop
   double hsl[3]
   unsigned rgb[3]
func rgbtohsl(unsigned r,unsigned g,unsigned b,double*hsl)
   double R=r/255,G=g/255,B=b/255
   double cmax=max(r,max(g,b))
   double cmin=min(r,min(g,b))
   double delta=cmax-cmin
   if cmax==r
      hsl[0]=(G-B)/delta%6*60 # Yes you can do module on double
   eif cmax==g
   if delta
func hsltorgb(unsigned*rgb,double h,double l,double s)
   double C=(1-fabs(2*l-1))*s
   double X=(1-fabs(h/60%2-1))*C
   double m=l-(C/2)
   double R,G,B
   if h>=300
   eif h>=240
   eif h>=180
   eif h>=120
   eif h>=60

Here is an example of an importing/exporting script
# Sonic 1's level format based on information from the sonic retro wiki
gui bool loop # Upon running this a checkbox will be created on the level editor and for each element the boolean option loop will be stored in ram and in project files and when exporting this variable will be updated automatically storing the current element
begin main
begin headerread
begin headerwrite
begin loopread
   unsigned val=read1()
begin loopwrite

Please do tell me what you guys think about this.

Author:  tepples [ Thu Oct 23, 2014 8:32 pm ]
Post subject:  Re: Retro Graphics Toolkit

You could always embed Lua, which appears to be the go-to language for adding scripting to free software applications.

Author:  nintendo8 [ Fri Oct 24, 2014 3:36 pm ]
Post subject:  Re: Retro Graphics Toolkit

Alright lua is added now I can see why lua was suggested. As in you can now run a lua script from Retro Graphics Toolkit. Now what I will do is work on providing an api allowing access to internal Retro Graphics Toolkit data and useful functions. I have decided to statically link lua with Retro Graphics Toolkit to maintain the tradition of only one file that does not need to be installed. Adding lua did not increase executable size that much.

Author:  mikejmoffitt [ Sat Oct 25, 2014 10:02 am ]
Post subject:  Re: Retro Graphics Toolkit

I am running Debian, and when I try to build it I get:

make: *** No rule to make target 'lua/lapi.o', needed by 'RetroGraphicsToolkit'.  Stop.

I have installed the lua development packages, but there is no change. Is there anything specific I ought to be doing here? Some other dependencies I need?

Author:  nintendo8 [ Sat Oct 25, 2014 4:35 pm ]
Post subject:  Re: Retro Graphics Toolkit

I just pushed a commit that alters the build process. Lua is built locally in order to not mess with your distribution of choice's instillation of Lua. Please read and follow ... er/INSTALL note that the term 'INSTALL' is a bit misleading instead it should be called Compile however INSTALL is a recognized convention for how to compile the program. You do not need to install Retro Graphics Toolkit it is a portable program. I hope this helps if not please tell me if you get any other errors and I will address them. Also thank you for trying to build it it does help getting these kind of replies as I want this to work on a wide verity of systems.

Author:  nintendo8 [ Thu Jul 09, 2015 12:55 am ]
Post subject:  Re: Retro Graphics Toolkit

Today is a good day for Retro Graphics Toolkit and its users. I have decided to do a new release.

Introducing Retro Graphics Toolkit v0.8 RC1:

Previous versions of Retro Graphics Toolkit were missing two important features:
  • Flexibility
  • Level Editing
Flexibility is gained via Lua scripting with an extensive binding for FLTK, zlib, kens and Retro Graphics Toolkit itself. As you can see in the screenshot below: The mandelbrot was generated via the included mandelbrotToTilemap.lua example.


As it turns the second is made possible by the first. The level editor GUI was implemented entirely in Lua. This shows the power of the Lua bindings.

Also Retro Graphics Toolkit only supported the Sega Genesis and the NES. That is about to change today as Retro Graphics Toolkit now supports the Master System and Game Gear. It also has partial support for the TMS9118.

This is a release candidate because I still need to finish TMS9118 and some of the Lua bindings need a bit of work and need to be more complete especially the metasprite binding. However I wanted to do a release because many bugs were fixed. So even if you have all the features you need in 0.7 you should still upgrade.

TMS9118 support is lacking in the two modes in which for every eight tiles the foreground and background color of the tile is selected. This is due to the fact that Retro Graphics Toolkit's goal is to make the tiles look as close as possible without user intervention. I have already tried attempting to implement a good color selection algorithm for mode two but I was not happy with the results. I was hoping that someone from the community would know how to solve this better than I.

Also on the topic of algorithms I am interested in a better method for selecting which tile uses what row. Does anyone have any experience with that?
As always let me know if you have any bug reports, feature requests, patches and pull requests.

The download link has not changed it is still: (for windows users)
The source is located here:

Author:  nintendo8 [ Sun Nov 15, 2015 2:31 pm ]
Post subject:  Re: Retro Graphics Toolkit

I have released a minor update: V0.8 RC1.2.

Previously you had a choice for saving as either a binary file, a C header, an assembly file or a BEX file however you could only load a binary file. I added support for loading these text based files. The parser for this does support multiple "arrays" and you will be prompted to selected which one to load if there are multiple "arrays" in the file you are loading.

For assembly the syntax that Retro Graphics Toolkit currently accepts is as follows:
Comments use a semicolon
dc.b = 8 bit
dc.w = 16 bit
dc.l = 32 bit
A US dollar sign ($) in front of a number means that the number is hexadecimal.

If you use an assembler with a different syntax you will need to modify filereader.lua.

Also the offline manual has been improved by replacing some links which used to link to the Github wiki with references to other sections of the offline manual and some minor text changes which also affect the online wiki.

I also tested compiling Retro Graphics Toolkit with Clang and made a few minor source code changes so that it can build with both Clang and GCC.

I also did a previously unannounced release. In that release some bugs were fixed and PNGs were exported with a 256 color palette. Also you can now selected which palette table is used for the Sega Genesis.

Author:  nintendo8 [ Tue May 31, 2016 5:42 pm ]
Post subject:  Re: Retro Graphics Toolkit

Want a command line tool to convert images using multiple palette rows? Read this post to find out how.

i just added a new headless mode, fixed a bug, and improved the UI for the palette generation frame.

The headless mode means that the Retro Graphics Toolkit window is not created. Instead what happens is a Lua script is executed. This opens up a world of possibilities such as using Retro Graphics Toolkit with your Makefiles.

To use the new headless mode do:
RetroGraphicsToolkit --headless scriptName.lua

Any arguments following the script name will be passed to the Lua script.
You can also run scripts in the headlessExamples directory regardless of where Retro Graphics Toolkit was invoked by using --headless-examples

I wrote a command line image converter which is invoked as such:
RetroGraphicsToolkit --headless-examples imageConverter.lua

To learn how to use it do:
RetroGraphicsToolkit --headless-examples imageConverter.lua --help

Also you can convert as many images as you want by specifying multiple images as arguments. I make use of the chdir() function so that relative paths will work as expected (as in if there is a file in the directory you are in you can read it as ./file regardless of where you are in relation to Retro Graphics Toolkit).

Windows users will need to re-download to take advantage of these features:

Page 2 of 2 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group