- Group:
- Tech Member: Tech Members
- Active Posts:
- 350 (0.13 per day)
- Most Active In:
- Engineering & Reverse Engineering (220 posts)
- Joined:
- 27-November 07
- Profile Views:
- 5940
- Last Active:
Jun 30 2015 09:56 AM- Currently:
- Offline
My Information
- Member Title:
- !!!!!!!!!!!!!!!!!
- Age:
- 32 years old
- Birthday:
- October 25, 1982
- Gender:
-
Male
- Location:
- Largo, Fl
Contact Information
- E-mail:
- Click here to e-mail me
- Website:
-
http://www.youtube.com/user/Alriightyman
Previous Fields
- Project:
- 0101001101101111011011100110100101100011 00000010: 0101001100000011 01000101011001000110100101110100011010010110111101101110
- National Flag:
- us
- Wiki edits:
- 5
Latest Visitors
-
Xeal 
22 Jul 2015 - 18:55 -
MarkeyJester 
07 Jul 2015 - 00:37 -
NeoFusionBox 
29 May 2015 - 14:55 -
FuriousHedgie 
21 Apr 2015 - 20:35 -
ArtmeierCompa... 
10 Apr 2015 - 09:42 -
MichaelP 
13 Mar 2015 - 20:06 -
JoenickROS 
08 Mar 2015 - 22:31 -
TheHackStack 
09 Feb 2015 - 18:34 -
snkenjoi 
16 Nov 2014 - 17:39 -
T.Q. 
31 Oct 2014 - 20:24
Posts I've Made
-
In Topic: mid2smps
04 October 2014 - 08:26 PM
So, I wanted to look into writing music via MIDI and was wondering:
1) What MIDI sequencer do you recommend to work with the MIDI Driver and
2) How do I setup the MIDI driver?
Thanks -
In Topic: Recommend me some headphones
04 October 2014 - 08:08 PM
Sony make very good headphones. I have a pair of MDR-V500's that I bought back in 2004. I still have them and they are in superb condition. They were on sale for $80 when I bought them, but retail for normally for $129.99, which I think is out of your price range. Also, basically everything steveswede said. You can't go wrong with a pair of sony headphones.
Also, these Apple earphones are good. I hate those headphones that goes completely into your ear, and these are similar, but they are different and quite comfortable.
-
In Topic: Reading binary values C++
03 October 2014 - 09:38 PM
Thanks a lot! That helped.
I'm not worried about big-/little-endian issues for this little project, but I will keep it in mind. -
In Topic: Reading binary values C++
03 October 2014 - 12:56 PM
Thanks, but why is it writing the string representation of the float value? I thought it should write it as a 32-bit binary. -
In Topic: Basic Questions & Answers thread
30 October 2013 - 11:06 PM
Caverns 4, on 28 October 2013 - 10:46 PM, said:Oay, so I need some help from some one who knows a few things about working with Sonic 3k.
I'm trying to port Sonic 3k's level layout format into Sonic 2 for many reasons, mainly just because it's better, and conserves both ROM and RAM space, and while I have made some progress, I'm having a problem.
First off, I ported the actual level layout reading code into my hack, and made the necessary changes to have support for 3 acts:
loadLevelLayout: moveq #0,d0 move.w (Current_ZoneAndAct).w,d0 ror.b #2,d0 lsr.w #4,d0 andi.w #$FC,d0 lea (off_level).l,a0 movea.l (a0,d0.w),a0 lea (Level_layout_header).w,a1 move.w #$7FF,d2 loc_1C382: move.w (a0)+,(a1)+ dbf d2,loc_1C382 rts ; End of function loadLevelLayout
I also changed the RAM equates a bit:
Level_Layout: Level_layout_header: ds.w 4 Level_layout_main: ds.w $40 Level_Layout_End: ds.b $F78 ;Unused
I'm going to ask my first question here: are the $F78 bytes going to always be unused? From my understanding, all it will need in RAM is the 8-byte header and $40 words to function, so the other bytes would be free.
After this, I basically just used SonLvL level converter to convert a few of the level layouts to use the new format, and changed the array at Off_Level to something more like this:
Off_Level: dc.l Level_EHZ1 ; $00 ;Emerald Hill Zone dc.l Level_EHZ2
Clearly however, I missed something; the end result is this:

(Yes, I did convert this level properly).
Does anyone know what I have forgotten?
I have this working in my Sonic 2 hack. I would say it is better, it just allows larger levels. So if you are not planning to make really large levels, then I wouldn't see any reason to port it. When I ported this to Sonic 2, I also ported S3K's drawing system as well. I wouldn't recommend porting the drawing system unless you want to venture into unknown territory in which no help exists.
As for the layout format, it is quite simple. I was originally building Sonic 2 layouts by hand to S3K format.
The first 8 bytes is a header broken up like this:
1st word: number of columns for the foreground in 128x128 blocks. 2nd word: Number of columns for the background in 128x128 blocks. 3rd word: number of rows for the foreground in 128x128 blocks. 4th word: number of rows for the background in 128x128 blocks.
The next 0x40 words (0x80 bytes) is a table of addresses in RAM. Each word represents an address. The first word is the layout data for the foreground, usually starts at 8088. The second word is the layout data for the background. This pattern repeats.
Now, the layout data is set up like this:
The first word in the header is the size in bytes of the foreground data. The second word is the size in bytes of the background data.
So, if your 8 byte header looked like this:
0082 0004 000C 0002
Then the 0x80 byte table would look like this:
8088 86A0 810A 86A4 818C 0000 820E 0000 8290 0000 8312 0000 8394 0000 8416 0000 8498 0000 851A 0000 859C 0000 861E 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
Notice that there are a bunch of zeros or empty space. These are unused for this level but MUST be present. At 8088, the data is setup just like Sonic 2, but is 82 byte long. At 86A0, it is 4 bytes long.
This makes a lot more sense when you load up a Sonic 3 layout in SonEd2 or SonLVL, and open it in a hex editor at the same time.Just remember to subtract 8000 from each word in your table to find it in a hex editor. So for 8088, when opened in a hex editor, the data is at address 0088.
Also, your RAM equates should look more like:
Level_Layout: Level_layout_header: ds.w 4 Level_layout_main: ds.w $40 ds.b $F78 ; layout data Level_Layout_End:

Find My Content
Jun 30 2015 09:56 AM
Male