What's new

Its all about Switching Sides!!

tbag

New member
Ok iv had my fair share of Visual Basic im switching to Microsoft Visual C++ 6.0 :cool:

Now does anyone wanna explain to me a bit about setting strings and values in C++ and calling those strings etc.. to the screen?

or

Does anyone know any good sites for starting emulation in C++?

I have about 4-6 hours free a day when i get home from school to work on Emulation :D
 
OP
tbag

tbag

New member
Thanks bjz those are some really useful sites i owe you one and people said C++ was hard its not that hard after looking at those sites tutorials etc...

In a way in some areas Visual Basic is harder especially in emulation ;) instead of writing 0x12000 or whatever in Visual Basic its &H12000 damn its so much easier not having to type in extra crap :)
 

Cyberman

Moderator
Moderator
tbag said:
Thanks bjz those are some really useful sites i owe you one and people said C++ was hard its not that hard after looking at those sites tutorials etc...

In a way in some areas Visual Basic is harder especially in emulation ;) instead of writing 0x12000 or whatever in Visual Basic its &H12000 damn its so much easier not having to type in extra crap :)
Hmmmm well anyhow.. VC++ is rather a PITA but it's still better than VB to do it in. Geesh .. now you listen to us huh? ;)

Cyb
 
OP
tbag

tbag

New member
Heh yeah say anyone know what i should emulate first?

Ive looked at a PS2 Emulator source and well GBA Emulators are more complicated then PS2 Emulators but that would be because there not fully emulated only partially ;)
 
OP
tbag

tbag

New member
Looking at NSX2 Emulator its not as advanced as Tom Happ's Cowbite Emulator but like i said PS2 Emu's only run Demos!
 

Cyberman

Moderator
Moderator
tbag said:
Heh yeah say anyone know what i should emulate first?

Ive looked at a PS2 Emulator source and well GBA Emulators are more complicated then PS2 Emulators but that would be because there not fully emulated only partially ;)
I suggest something simple first.

Like how about plugin for PSX2 memcards?

Sony uses Magic Gate encryption apparently to prevent people from doing what they did with the PSX cards. IE proliferate a bunch of dupes and edit cards and trade card images etc. (as in CBFD bunch of @$!@#! @#$@ ).

This essentially makes it impossible to have compatible cards with Sony's and them be cheaper.. why you say? Well kind of simple Magic Gate is Patented by Sony you HAVE to get a license agreement.. so if you make a memory card for the PS2 that's compatible.. you have to license it and thus you can't make money Clever huh?

As far as I can tell there is no reason for the magic gate encryption unless it's because of the network adapter etc and protecting information used on the card.. from God only knows what they think it needs protecting from.

Anyhow something simple.. STRONG RECOMENDATION. The GBA is much simpler to emulate by the way.

Why do you think they can emulate it already and it came out AFTER the PS2? :)
Cyb
 
OP
tbag

tbag

New member
Yeah ive been looking into Gameboys but im confused on the Docs i have they dont tell enough info :(

But ive got a open source GB emulator and all it contains is Build CPU with heaps of opcodes and just uses DirectDraw to draw the screen and its got barely any code and works fine...
 

bjz

New member
get your damn mind on straight boy, dont start with anything emu related, learn the language in and out first.
 
L

Lachp30

Guest
Find a emulator that has gone open source, look it over and see if you can make any sence of it. It helped me when I was first looking into emu coding.

Lockie
 
OP
tbag

tbag

New member
I have but the thing im confused about is in the Opcodes for the gameboy the emulator has noone of these opcodes.. nor any of the registers etc..??
 

Cyberman

Moderator
Moderator
tbag said:
I tend to pickup on things rather quickly
It's not possible to pick up C++ and consider yourself an intermediate programer in 3 6 9 or 12 months.. beginner yes.. no way on intermediate. It's not possible, not because you can't pick it up or any such thing, it's a very BIG language and you can do a LOT of things in it you may never use. OOP is NOT visual basic. VB is designed to be EASY and SIMPLISTIC. C++ and C are NOT, they are designed to be as low level as possible or as complex as possible depending on your need. If you didn't know VB is written in C++ that's how they have all those cool abilities to add things and add in Active X components.

C++ is OOP, which is an extension of structured programing. In C++ your program consists of messages sent between objects where the object do most if not all the work. Lets talk EMU now. Say you want to emulate a GBC, you have a number of objects you should make now. A form for the layout of the EMU, (1 objecT), menus for the EMU (several objects there), in fact a typical windows program has 100's of objects just in setting up the GUI. Next the processor (modified Z80). That's an object as well. Memory? Another object. Cartridge memory? Yet another object... Bottom line is it's not as simple as taking a bunch of lego blocks and putting them together. Fortunately with VC++ or BCB a lot of the work has been done for you. BCB would be much easier to use though. Also for graphics it's not too bad, you have to grab your 'frame buffer' created by the emulated GBC and convert it too a bitmap. I'm wondering if dynamic recompilation would improve speed a lot on emulating it.. not that one needs speed.

tbag said:
I have but the thing im confused about is in the Opcodes for the gameboy the emulator has noone of these opcodes.. nor any of the registers etc..??
It's a modified Z80?
you have 8 8 bit registers
A B C D E F H L (I forget the other threw out the z80 references I had :) )
you have an R register too for refresh control of dynamic ram.
4 16 bit registers
X Y PC S
Also register pairs
AF BC DE HL
Additionally you have alternate registers
A' F' B' C' D' E' H' L'
these are for context switching in interrupts to allow you not to have to push everything on the stack.

IO has 256 address memory 65536 unless they are supporting the segmented Z180 (which is more complicated).

I suggest making a 'CPU' that emulates the z80 as closely as possible. Then look at the particulars unique to the CPU the GBC has, and 'inherit' the Z80 into the new CPU object.

Good luck!

Cyb
 
OP
tbag

tbag

New member
Hmm thanks that helps a bit :)

Got any other Docs on the Z80 GB version as all of mine are really old and i beleive there in-accurate i know the ones of Zophar.net but the ones there that i looked at were in accurate to the emulator of the GB i have so.. uhh unless its the emulator ehehe ;)
 

Top