Sonic and Sega Retro Message Board: flamewing - Viewing Profile - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help

Group:
Tech Member: Tech Members
Active Posts:
832 (0.48 per day)
Most Active In:
Engineering & Reverse Engineering (687 posts)
Joined:
11-October 10
Profile Views:
12045
Last Active:
User is offline Yesterday, 08:56 PM
Currently:
Offline

My Information

Member Title:
Emerald Hunter
Age:
36 years old
Birthday:
April 19, 1979
Gender:
Male Male
Location:
Brasil
Interests:
In no order: physics, computers and computer programming, reverse engineering, Ultima, Sonic, TASes, atheism, skepticism

Contact Information

E-mail:
Private
Website:
Website  http://

Previous Fields

Project:
Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
National Flag:
br
Wiki edits:
12
SA2 Emblems:
31

Latest Visitors

Posts I've Made

  1. In Topic: Optimizing the DMA queue

    12 July 2015 - 10:36 AM

    In a record-setting quintuple post, I have an announcement and a bugfix.

    The announcement is that the improved DMA queue (and instructions for its use) can now be obtained on GitHub. I will no longer update the OP with new developments, but I will post new things in the thread.

    The bugfix: this is actually an issue only with S&K's Perform_DPLC function and 128kB-safe DMA. If you don't have the option enabled, or you are not using Perform_DPLC, then you are not affected.

    The issue is that Perform_DPLC expects the high word of d3 to be unchanged by a call to the DMA function; and this was not true in the case where the DMA was split in two if 128kB-safe option was enabled. The fix is here if you want to apply it manually.
  2. In Topic: Retro Graphics Toolkit

    09 July 2015 - 08:51 AM

    Been awaiting a release now for some time; now to play around with it.

    View Postsega16, on 09 July 2015 - 03:06 AM, said:

    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.

    You may want to look into the color selection algorithms used in this project; I had some success in converting and scaling art with it, although it does need some hand-tweaking for best results. It selects colors one color at a time, executing multiple iterations until everything converges. Another approach would be to use k-means segmentation using the color metric you already define in color_compare.cpp; here is a summary of several techniques. You probably can lift several of these from OpenCV.

    View Postsega16, on 09 July 2015 - 03:06 AM, said:

    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?

    What I would do is try rendering the tile in all rows, then use the row with the smallest total distance (= sums of the distances of all pixels) to the original tile. But that can get slow.
  3. In Topic: Sonic 1 RAM for the RAM newbie?

    08 July 2015 - 07:38 PM

    I think your best bet is to pass the word you get from the chunk table (solidity bits + flip bits + block ID) to the AI and let it learn what the each combination means on its own. The block IDs are used in indices to the collision arrays, which depend on the zone; and the solidity + flip bits will affect how the collision arrays are applied (if at all). But each block ID + solidity + flip bits will always act the same way in the same zone, meaning it can be thought of as a denser way to feed data to the AI than breaking everything up all the way down to the collision arrays. The drawback is that you will have to evolve the AI for a specific zone, and probably for a longer period of time until it learns how all relevant blocks work.

    If you do it another way, you will run the risk of the AI not being able to pass the simplest of levels because it gets stuck holding right on sloped ground where you need speed.

    Oh, and a pitfall: some chunks in the level layout in S1 have bit 7 set (that is, ID >= 128). This is a bit flag; it is used by loops to mark that the chunk with ID+1 holds the collision data when you are going through the loop. You may want to feed that bit to the AI too, if it is to have a hope of getting through GHZ1.
  4. In Topic: Sonic 1 RAM for the RAM newbie?

    08 July 2015 - 03:38 PM

    Out of curiosity, what will you be passing as inputs for the AI? The solidity bits of each 16x16 or also the 16x16 ID and maybe solidity data?
  5. In Topic: Basic Questions & Answers thread

    07 July 2015 - 03:10 PM

    It will, yes, unless you push the updates offscreen like S3&K does for Angel Island's waterline. It is one of the reasons I prefer the first option.