[ Wiki | Release Lists | Patches | J-DB ]
PocketHeaven Sponsors:
[ Jandaman | DealExtreme ]



Pocket Heaven
Pocket Emulation Discussion Boards
 
    SearchSearch   MemberlistMemberlist  RSS FeedRSS Feed  RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SMSAdvance 2.0 fork
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Pocket Heaven Forum Index -> SMSAdvance
View previous topic :: View next topic  
Author Message
kuwanger
Member


Joined: 11 Mar 2004
Posts: 278

PostPosted: Sun Sep 03, 2006 8:43 am    Post subject: SMSAdvance 2.0 fork Reply with quote

I'm currently working on a small fork of SMSAdvance 2.0. It's chiefly focused on adding partial compression support. I've currently got a rather preliminary version working. It still needs some work, though, in making "go multiboot" work correctly. And at some point, I need someone to test out the link transfer, as I haven't a second gameboy to try it out with.

In any case, this is just a preliminary header for when I make my first release. I just wanted to post now (instead of when I make my first release) because I should be able to release it rather soon (once I have the go multiboot working, I'll need beta testers).

Having said that, I am curious about one thing. Does anyone here know of END_OF_EXRAM is 0x7000 less than PCMWAV? It's not really that important (I don't plan on using more than 128KB of RAM for the decompression buffers). I'm just curious.
_________________
Kuwanger Projects Like stag beetles in tubes
Back to top
View user's profile Send private message
GoopyMonkey
Member


Joined: 19 Feb 2006
Posts: 198

PostPosted: Sun Sep 03, 2006 10:24 am    Post subject: Reply with quote

I'm looking forward to it. And by "partial compression support", do you mean that it will compress the roms (partially) to make the file size smaller? That would be excellent for all GBAMP SD users who can only use emulators under the file size limit (can't remember what it is).

I thought SMS roms could not be compressed. Confused
_________________
Titney wrote:
portable jesus anyone?

Picture yourself in a boat on a river, with tangerine trees and marmalade skies.
Back to top
View user's profile Send private message Send e-mail
kuwanger
Member


Joined: 11 Mar 2004
Posts: 278

PostPosted: Sun Sep 03, 2006 11:05 am    Post subject: Reply with quote

By partical compression, I mean only part of a ROM (well, all of a 128KB ROM) will be compressed. This won't have an effect on what ROMs are loadable as there's not enough space to store the compressed ROM and uncompressed parts of ROM in memory. And it's not that SMS files were uncompressable. It's that it's not possible to compress them in their entirety. At best, one can compress up to N banks where N is the amount of banks that would fit in RAM. Anything more and you start having to worry about paging in banks whenever there's a request for one, and that leads to worst case thrashing to load in banks. Technically, I'm sure *some* roms wouldn't thrash much, if at all, but I'm not interested in designing a compression scheme that only works well on some ROMs.
_________________
Kuwanger Projects Like stag beetles in tubes
Back to top
View user's profile Send private message
GoopyMonkey
Member


Joined: 19 Feb 2006
Posts: 198

PostPosted: Sun Sep 03, 2006 11:11 am    Post subject: Reply with quote

So if I tried to load a 129kb rom, it would give me the normal white screen error? Or would it temporarily shrink part of it to reduce it by a kilobyte or two?

Sounds good for normal users either way.
_________________
Titney wrote:
portable jesus anyone?

Picture yourself in a boat on a river, with tangerine trees and marmalade skies.
Back to top
View user's profile Send private message Send e-mail
Titney
Administrator


Joined: 05 Feb 2004
Posts: 4018
Location: Earth

PostPosted: Sun Sep 03, 2006 11:15 am    Post subject: Reply with quote

GoopyMonkey wrote:
So if I tried to load a 129kb rom, it would give me the normal white screen error? Or would it temporarily shrink part of it to reduce it by a kilobyte or two?


Sounds like the same phenomena as this:
Quote:
Ignore the misleading 257KB figure from Windows Explorer, that's from adding the 16 byte header to 256KB and rounding up.
http://wiki.pocketheaven.com/GBA_Movie_Player#SD_Version_Limitations
_________________
releases.pocketheaven.com
wiki.pocketheaven.com
Back to top
View user's profile Send private message Visit poster's website
Dwedit
Moderator


Joined: 26 Feb 2004
Posts: 2204
Location: Chicago!

PostPosted: Mon Sep 04, 2006 3:28 am    Post subject: Reply with quote

Since SMS roms have no header, why would they have trailing bytes to inflate the size beyond 128k? Something tells me that if the size of that file isn't exactly 131072 bytes, something is really wrong with it.
_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
Dwedit
Moderator


Joined: 26 Feb 2004
Posts: 2204
Location: Chicago!

PostPosted: Mon Sep 04, 2006 3:30 am    Post subject: Reply with quote

If you combine your fork with smsadvance gbamp, you might get more space to work with, since that version was designed for minimizing memory use. It also has less features though, and needs a small fix for the changes made to the cpu in savestates.

If you just use its memory map, remove the corrected BG Tile layer and stuff, you could get lots more ram to hold rom data.
_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
kuwanger
Member


Joined: 11 Mar 2004
Posts: 278

PostPosted: Mon Sep 04, 2006 4:55 am    Post subject: Reply with quote

Okay, I've gotten far enough that I'm willing to make a beta release. I ended up offering two compression schemes. One uses up 128KB. The other only 16KB (it should be able to use 32KB, but I'm still working out why only 32KB works)*. There has been modifications all over the place, so this needs some extensive testing, especially involving state loading/saving and sram loading/saving. Ie, USE AT YOUR OWN RISK. And it'd be a good idea to backup saves.

Anyways, here it is.

Unofficial SMSAdvance Homepage

Be sure to read the included readme.txt in the binary distribution. Also, be aware that you'll need to d/l apack and extract it into the directory to actually use the compression. You'll also need python.

Use sms.hack.py to maximize the compression on a particular ROM or sm2.py if you'd rather not have as many pauses.

One final note is, my own testing over a large-ish number of ROMs indicates that you'll be able to achieve from a 50% compression ratio (for 128KB roms) down to a 10% compression ratio (for really big roms). Using sm2.py and you'll see compression ratios half or less of that. In any case, enjoy. And feel free to make any comments/suggestions along with any bug reports.

*Edit: This should be fixed now. So, those who have downloaded already should go and redownload smsadvance. And be sure to recompress with the new sm2.py to save a bit more space.

@Dwedit: I'd rather keep all the sram features, personally. Bank truncation does cause a pretty significant improvement on space even if there's no actual RAM to decompress into.
_________________
Kuwanger Projects Like stag beetles in tubes


Last edited by kuwanger on Tue Sep 05, 2006 1:48 am; edited 1 time in total
Back to top
View user's profile Send private message
GoopyMonkey
Member


Joined: 19 Feb 2006
Posts: 198

PostPosted: Mon Sep 04, 2006 12:13 pm    Post subject: Reply with quote

OK, I have read the readme instructions, but nothing has happened when I use the DOS command. I don't get an SMH file or reduced file size, I just get the normal results (although Wonder Boy 3 (UE) + SMSAdvance is down to 256KB). I currently have no SD card to test this with, so is there supposed to be a different file appearing or something? Or will it finally fit inside of my GBAMP SD?
_________________
Titney wrote:
portable jesus anyone?

Picture yourself in a boat on a river, with tangerine trees and marmalade skies.
Back to top
View user's profile Send private message Send e-mail
kuwanger
Member


Joined: 11 Mar 2004
Posts: 278

PostPosted: Mon Sep 04, 2006 3:18 pm    Post subject: Reply with quote

@GoopyMonkey: Could you be more specific on what you mean/did/what happens? And as I explained, this won't change the ability to run files on the gbamp. If you want to effect that, you can look at Dwedit's version. This is primarily to allow people to shrink files so they can fit more files on their flash carts.
_________________
Kuwanger Projects Like stag beetles in tubes
Back to top
View user's profile Send private message
patters
Member


Joined: 09 Feb 2006
Posts: 51
Location: London

PostPosted: Mon Sep 04, 2006 5:46 pm    Post subject: Reply with quote

I've not noticed any problems on a quick test. It seems to work fine with SG-1000 and Game Gear roms too. I'll flash to hardware later and have a play.

If you want to compress a load of files in Windows, make a file called compress.bat with the following contents:

Code:
@echo off
for %%i in (*.sms) do sms.hack.py "%%i" "%%~ni.smh"
for %%i in (*.gg) do sms.hack.py "%%i" "%%~ni.ggh"
for %%i in (*.sg) do sms.hack.py "%%i" "%%~ni.sgh"


Last edited by patters on Mon Sep 04, 2006 5:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dwedit
Moderator


Joined: 26 Feb 2004
Posts: 2204
Location: Chicago!

PostPosted: Mon Sep 04, 2006 5:50 pm    Post subject: Reply with quote

One more change that could be made would be to make the emulator run from ROM instead of ewram, but it would lose all multiboot support, but would get more space in ram.
_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
patters
Member


Joined: 09 Feb 2006
Posts: 51
Location: London

PostPosted: Tue Sep 05, 2006 9:21 pm    Post subject: Reply with quote

I've noticed that Mickey Mouse crashes on game start in this version when it tries to draw the Mickey sprite. The graphics start overflowing and the rom resets. I compressed it using the smh compression.
Back to top
View user's profile Send private message
Dwedit
Moderator


Joined: 26 Feb 2004
Posts: 2204
Location: Chicago!

PostPosted: Tue Sep 05, 2006 10:56 pm    Post subject: Reply with quote

Some games need certain pages to be contiguous. If the first rom page is distant from the rest, some games will crash eventualy, like Sonic 1 in the jungle zone.
_________________
Here come the fortune cookies! Here come the fortune cookies!
They're wearing paper hats!
Back to top
View user's profile Send private message Visit poster's website
kuwanger
Member


Joined: 11 Mar 2004
Posts: 278

PostPosted: Tue Sep 05, 2006 11:31 pm    Post subject: Reply with quote

Sounds like I've got a work left to do, then. :/
_________________
Kuwanger Projects Like stag beetles in tubes
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Pocket Heaven Forum Index -> SMSAdvance All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group