Jump to content

SharpBoy - A Game Boy emulator in C#


xdaniel
 Share

Recommended Posts

Palette is junk, rendering currently has the GB-side screen disabled, the screen dimensions are incorrect:

 

Posted Image

 


Posted Image

 


Getting closer...

 

Posted Image

 


And some two to three hours later...

 

Posted ImagePosted Image

Posted ImagePosted Image

 

Do note that the one important thing about the SGB - screen coloration - isn't yet emulated. Also note that what is already there, namely the SGB borders, still have some glitches as well, like a few wrong colors here and there (see Pokemon Gold). Still some more work to do, I guess...

 

Also note that system auto-detection goes GBC -> SGB -> DMG. So if a game is GBC compatible, like Pokemon G/S or Zelda 4 DX, that takes priority over the SGB and any borders the games might have. If you want borders in those games, you've got to manually set the emulator to SGB/SGB2, which will disable GBC emulation. Having both works for some games, but others really don't like it at all and appear to hang after loading the border.

Edited by xdaniel
Link to comment
Share on other sites

Posted ImagePosted ImagePosted Image

 

Too bad most other SGB-compatible games now either don't show anything, or outright crash at some point... definitely still some more work to do. Not over the weekend, tho, as I likely won't be around much.

 


Some freshly implemented commands, a default palette and fixes for stupid bugs later...

 

Posted ImagePosted ImagePosted Image

 

But that shall be it for the moment, I'll pick this up again on Monday or so.

Edited by xdaniel
  • Like 1
Link to comment
Share on other sites

SharpBoy v0.6 Debug build: http://magicstone.de...UG-29052012.rar - do NOT redistribute, kthx!

 

This is a debug build featuring SharpBoy's current state. It is NOT finished, it is NOT meant for public distribution, it is NOT a regular release build. It IS meant for everyone here who might be interested in testing it and I would really like to hear some feedback. Throw whatever ROMs you have at it, mess around with the debugger, memory editor, etc, etc. then tell me about it! What works, what doesn't (hopefully nothing), anything you like, anything that's weird.

 

Notes: This build is far slower than a release build would be, we're talking about ex. 65 FPS here vs 165 FPS usually here, so do not judge the speed. Also, there's a console window that might spit out some error messages or warning or somesuch (say, ex. "unknown RAM size 0x##"), please report any messages it prints.

 

Also, the complete changelog since the last released version:

 

Some fixes to External RAM handling in MBC emulation; Game Boy Wars 3 doesn't crash anymore and is now playable

Fixed incorrect writes to certain I/O registers; Taiyou no Tenshi Marlowe isn't crashing anymore as well and is playable

Minor improvements to timer emulation

Improved FPS limiter; now less prone to ridiculous slowdown and similar glitches

 

rewritten GUI, still missing features

new disassembler, memory editor, tile & palette viewers

improved GBC palette access during diff LCD modes (fixed Lego Racers palette glitch, certain PD ROMs)

fixed input I/O register handling (Glocal Hexcite, fixed completely broken input)

improved GBC palette conversion (moderate speedup in GBC games)

fixed 64kb external RAM handling (Pokemon Crystal JPN, fixed missing town map gfx & non-working saves)

fixed MBC3 RAM bank select (Pokemon Crystal JPN, fixed access of wrong banks after above fix)

changed CPU core opcode execution (moderate speedup)

optimized sprite evaluation and drawing (slight speedup)

changed HALT opcode behavior (fixes blargg cpu_instrs test, -shouldn't- break anything)

partial Super Game Boy emulation (borders and coloring)

changed RETI opcode behavior (Megaman V, fixed game hanging after selecting stage)

Edited by xdaniel
  • Like 1
Link to comment
Share on other sites

This sounds bad, but is this the longest project you have stuck to? You have made excellent progress.

This is not meant to be negative, just a general observation.

 

I could argue that what culminated in SayakaGL's Ucode interpreter was a long time in the making as well, from the first OZMAV, over OZMAV2, into libbadRDP, to Sayaka. But yeah, the single project I stuck with the longest probably is SharpBoy, disregarding the GUI rewrite. I dunno, I guess I just love the old GBs, and even moreso than the N64? :P

Link to comment
Share on other sites

I'm with you man. My fav console is not the n64. Not bashing it, just saying. I tend to come back to a custom frontend I wrote for my wife. It encompasses all of the emulators I use with custom graphics etc. I just keep coming back and improving it so I totally know where you are coming from.

Link to comment
Share on other sites

  • 4 weeks later...

Nah, I'm not going to rival VBA anytime soon with this, SharpBoy doesn't even have sound and is somewhat slower, for example :P As for GBA support, that's a whole different beast compared to the GB/GBC - a different processor architecture for one (8-bit GB-Z80 vs GBA's 32-bit ARM7). I gotta admit it would be cool to try, but I really don't think that'll happen anytime soon, if at all.

 

You should be able to extract the RAR archives I post SharpBoy in with pretty much any archiver out there, like 7-Zip, WinZip or of course WinRAR, so I don't really see the point in providing ZIP archives of it. What archiver are you using that you can't extract it?

Link to comment
Share on other sites

  • 3 months later...

With G2Map finally out, I'm kinda in the mood to look at other, older projects again... one of them being SharpBoy - well, otherwise I wouldn't post in SharpBoy's thread, wouldn't I?

 

There's not much to say so far, but I might have finally found a more or less reliable way of producing sound in C# via FMOD Ex. It works well in my PC Engine emulator (or at least as well as possible, as my sound generation code is awful) so I might try and get some sound emulation going in SharpBoy one of these days. And even if I'll fail with this yet again, a new release is long overdue anyway, meaning you can probably expect a new, proper build over the next one or two weeks :)

 

EDIT: Okay, sound is still difficult to do, despite FMOD working... so have a "photographed" Kyouko Sakura! :D

 

Posted Image

Edited by xdaniel
  • Like 1
Link to comment
Share on other sites

What's the counterpart to the GB Camera? Anyone? That's right, it's the GB Printer!

 

Posted Image

 

And unlike other features, like the Camera, this has been done without a working implementation in another emulator as a reference, only some French (Google translated into English) documentation :D Still need to add it to the GUI and such, but that should be easy compared to the work before :P

  • Like 4
Link to comment
Share on other sites

Alright, compatibility assessment:

 

Game Boy Camera, printing photos? Works.

 

Posted Image

 

Pokemon Crystal, Pokedex entries? Works. Note how they're split into two; the game sends what is Page 2 in-game separately.

 

Posted Image

Posted Image

 

Pokemon Pinball, the hi-score tables? Works.

 

Posted ImagePosted Image

 

Pokemon Trading Card Game, Pokemon cards? Works. Note here that at least part of this image sequence is RLE compressed (probably the illustration; luckily RLE's really simple). Also, again, the card is split into separate images.

 

Posted Image

Posted Image

Posted Image

 

Haven't tested anything else yet (ex. Pokemon TCG's deck printing, etc.)

 

EDIT: Contrast modification as offered by Pokemon TCG is implemented, so have a dark and a light Bulbasaur:

 

Posted ImagePosted Image

http://i.imgur.com/No8rM.png http://i.imgur.com/uuT0s.png

http://i.imgur.com/dgVl8.png http://i.imgur.com/uywKs.png

Edited by xdaniel
  • Like 2
Link to comment
Share on other sites

Finally added to the GUI. Was actually a bit more work than I had assumed, ex. regarding the enumeration of emulated serial devices, storage of the selected device type in the configuration, etc...

 

Posted Image

 

...yet the resulting GUI is awfully simple. The "Configure" button doesn't even do anything yet, because the printer doesn't need any configuration! :P

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.