What's new

Game Boy

Dark Stalker

New member
I got some time yesterday and implemented cgb support. Most games seem to run just fine, a few end in a black screen though. I guess I've got some tweaking to look forward to. :p My palette is off by quite a bit as you might see, I'll try to find some more detailed information on how the gbc interprets colour values.


zeldadx.png
warioland3.png

dw3-2.png
pokemonsilver.png
 

Doomulation

?????????????????????????
bcrew1375 said:
Well anyway, if you want source that badly... Don't say I didn't warn you...
Oh gee, very nice! Very clean code and such.
Ah, don't worry... it will be my little reference source if I don't know how something works =)
Just one question 'bout your source, though... why do you put the definitions in the .c file?
 

aprentice

Moderator
Dark Stalker said:
I got some time yesterday and implemented cgb support. Most games seem to run just fine, a few end in a black screen though. I guess I've got some tweaking to look forward to. :p My palette is off by quite a bit as you might see, I'll try to find some more detailed information on how the gbc interprets colour values.

zeldacolor.gif


In my emu, any game that uses hdma screws up at one point or another. I dont know exactly why but it does dma's from wrong locations or bad locations sometimes.
 

Dark Stalker

New member
Hdma seems to be fine in my emu, there's something else screwing up I think. Zelda oracle games just show the very first screen, then go white. Warioland 2 just stays black, and Mega Man Xtreme shows the first screen and goes black too. I think that's all the roms that haven't worked for now, but I haven't really tested that many yet.
 
Last edited:

bcrew1375

New member
Doomulation said:
Just one question 'bout your source, though... why do you put the definitions in the .c file?

I don't know. It's just the way I've always been. I like to lump things into one file rather than splitting them up. I'm weird :p. I'm sure you'll find some parts that aren't quite so neat :p.

Oh, just to let you know, the window drawing code is broken right now, and it's not nearly as compatible as aprentice's or Dark Stalker's, but it should help you get started.
 
Last edited:

Doomulation

?????????????????????????
Hmm. Alright. But you do know that include files exist for the purpose of definitions right? It's pretty much the basic reason they exist. As for me, I hate it when files get so large =)
 

aprentice

Moderator
Doomulation said:
Hmm. Alright. But you do know that include files exist for the purpose of definitions right? It's pretty much the basic reason they exist. As for me, I hate it when files get so large =)

same here, i have have .c/cpp and header for every category, i personally find the code more maintainable
 

Kronox!

New member
i've read all the post and all that i can say is Wooooooow you guys are really great programmers...
i'm interested in emulation and programming but i don't have the skills (yet) maybe when i take a course (or two ) i will start my own emualation proyect

Keep up the good work

(as for my crappy english .... we speak spanish here ...Saludos desde Chile!! )
 

bcrew1375

New member
If you want to learn programming, I'd start with C, C++ has alot of functionality you won't need for simplistic programs. In fact, most emulators are written in C. Also, aside from punctuation, your English is just fine :p.
 

zenogais

New member
Actually, I'd recommend just the opposite, C++. C is an antiquated language, and C++ has a lot of advanced functionality which can simplify programming of just about anything, including emulators. Most people simply don't take advantage of, or are unaware of these constructs. Most colleges anymore teach C++ as it is a vast improvement over C in many areas, and the only reason "most" emulators are written in C is because that is the language their authors learned in college or feel they are most comfortable with for various reasons. Finally, if you know c++ you already know c, however if you know c you do not know c++.
 
Last edited:

Kronox!

New member
MMm Makes sense... thanks , i'm learning c but i think i'm going to learn step by step
First C
then i will advance to c++ ... cause' it's too much Info! just start with c++
i would like to know the basics first... to feel a bit more confortable with the language

Kronox
 

bcrew1375

New member
Well, after getting an FPS display implemented(thanks zenogais), I think my emu is pretty slow :p. With graphics display, I get about 80-90 FPS. Without graphics display, but with GB graphics code, I get about 400-500 FPS. With only the CPU I get 800-900 FPS. This is on a 2.4 GHz Celeron, so... yeah. :p
 

zenogais

New member
bcrew1375 said:
Well, after getting an FPS display implemented(thanks zenogais), I think my emu is pretty slow :p. With graphics display, I get about 80-90 FPS. Without graphics display, but with GB graphics code, I get about 400-500 FPS. With only the CPU I get 800-900 FPS. This is on a 2.4 GHz Celeron, so... yeah. :p

Ahem, this is one of the big quarrels most people have with FPS as a measurement system. 80-90 FPS is more than adequate, most 3D games (Half-Life 2 for instance) run quite decent at 40-60 FPS.
 

bcrew1375

New member
Yes, it runs at full speed, but it's not very optimized. That can't be a good speed for a Gameboy emu on a 2+ GHz computer. :p I wonder what the performance on slower computers would be?
 

zenogais

New member
bcrew1375 said:
Yes, it runs at full speed, but it's not very optimized. That can't be a good speed for a Gameboy emu on a 2+ GHz computer. :p I wonder what the performance on slower computers would be?

Probably equal or only slightly worse would be my guess.
 

ShizZy

Emulator Developer
Howdy. I'd like to say great job to all of you - very awesome work. I'm a C programmer as well, although I'm somewhat new to the emulation field. I'm going to give a go at a GB emulator, I've been inspired by everything that I've seen here. Hopefully it'll go smoothly! :bouncy:
 

refraction

PCSX2 Coder
ShizZie said:
Howdy. I'd like to say great job to all of you - very awesome work. I'm a C programmer as well, although I'm somewhat new to the emulation field. I'm going to give a go at a GB emulator, I've been inspired by everything that I've seen here. Hopefully it'll go smoothly! :bouncy:


if youve never made an emulator before, id really advise you do the chip8 project a go first to give you the overall idea of how it works, chip8 to GB is a big enough step, nothing to GB is even bigger.
 

bcrew1375

New member
refraction said:
if youve never made an emulator before, id really advise you do the chip8 project a go first to give you the overall idea of how it works, chip8 to GB is a big enough step, nothing to GB is even bigger.

I second that, if you've never done anything emulation related, you have no idea what you're getting yourself into. I tried doing a Gameboy emulator first, there were alot of concepts I simply couldn't grasp until I did a Chip-8 emu. If you understand assembly, registers, the stack, input/output ports, cycle counting, and the way the CPU handles instructions, then go for it.
 

Top