MXP
June 14th, 2004, 14:17
I m a beginner i dont know where to start coding and emu what emu should i code first
refraction
June 14th, 2004, 14:35
I m a beginner i dont know where to start coding and emu what emu should i code first
hello world
http://www.cplusplus.com
they have a very good tutorial on it. when youve done that move on to windows api or MFC, can be found at these addresses
http://devcentral.iticentral.com/default.php <---MFC
http://www.winprog.net <-- API
Then learn SDL or OpenGL, they can be found here
http://www.libsdl.org <--- SDL
http://nehe.gamedev.net <---- OpenGL
Then when your satisfied with that, read the chip8 thread ;)
Alternatively you can get away with just reading the cplusplus tutorial and a document on Emulator programming (there should be some in the chip8 thread) then make a dos version of a chip8 emulator, itll be slow but itll work.
MXP
June 15th, 2004, 11:00
hello world
http://www.cplusplus.com
they have a very good tutorial on it. when youve done that move on to windows api or MFC, can be found at these addresses
http://devcentral.iticentral.com/default.php <---MFC
http://www.winprog.net <-- API
Then learn SDL or OpenGL, they can be found here
http://www.libsdl.org <--- SDL
http://nehe.gamedev.net <---- OpenGL
Then when your satisfied with that, read the chip8 thread ;)
Alternatively you can get away with just reading the cplusplus tutorial and a document on Emulator programming (there should be some in the chip8 thread) then make a dos version of a chip8 emulator, itll be slow but itll work.
i know almost every thing u named so my question still stands there what emulator is the simplest (game consoles) please reply ASAP
\
mesman00
June 17th, 2004, 19:49
i know almost every thing u named so my question still stands there what emulator is the simplest (game consoles) please reply ASAP
\
if you are a beginner then you don't know all that. so either
a: you're full of shit and *think* you know all of that, but don't.
or
b: you're not a beginner.
refraction
June 17th, 2004, 19:56
and c. he has no common sense, i didnt say look at the chip 8 thread for my health!!
chip8 is the place to start, its the easiest machine to emulate.
MXP
June 18th, 2004, 08:45
and c. he has no common sense, i didnt say look at the chip 8 thread for my health!!
chip8 is the place to start, its the easiest machine to emulate.
sorry iread that thread later and look i made an emulater just in 2 days...
how can i optimize it and what emu should i code next
(P.S. I haven't programmed controllers correctly) :evil:
aprentice
June 18th, 2004, 09:41
sorry iread that thread later and look i made an emulater just in 2 days...
how can i optimize it and what emu should i code next
(P.S. I haven't programmed controllers correctly) :evil:
dont upx compress files unless you have something to hide, such as a virus or so.
smcd
June 18th, 2004, 15:33
It doesn't look like he's hiding anything suspicious (I unpacked the file & poked around a bit). Perhaps he just uses UPX to save space, as I do?
smcd
June 18th, 2004, 15:36
On a side note, how do you run stuff in your emulator? (if indeed that is what it is ;-)) I tried "mychip8.exe pong.ch8" and it doesn't do anything, and with no documentation well that's just wonderful...
MXP
June 19th, 2004, 13:36
On a side note, how do you run stuff in your emulator? (if indeed that is what it is ;-)) I tried "mychip8.exe pong.ch8" and it doesn't do anything, and with no documentation well that's just wonderful...
Well finally i am into that sea of emulation ....
To run a ROM (of chip 8 offcourse) put it into same dir as that of :paperbag: myChip8.exe and rename it 'inv' (without commas,was acctually for testing) it will work i will soon give code as well (as soon it gets neat and under stand able)
I need some tutorials on Direct X can some one help me :alien2:
Doomulation
June 20th, 2004, 14:09
"direct3d tutorial"
I found some great tutorials this way. Believe me :)
MXP
June 22nd, 2004, 15:47
:borg: Q1:
---
I have problem in creating window via MFC take a look at my code :
//drived form CWinApp
BOOL MyApp::InitInstance() {
m_pMainWnd = new MyWindow();
if(m_pMainWnd->SetTimer(0,1,NULL) !=1 ) return FALSE;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
//drived form CFrameWnd the constructor of the class i made
MyWindow::MyWindow(){
if(!InitMemory()){
MessageBox("Memory Allocation Failed\n\
Program Now Terminates...","Memory Error");
exit(0);
}
InitCPU();
romLoaded=loadRom();
invOP=false;
Create(NULL,"Chirp",WS_SYSMENU,
CRect (20,20,350,210),NULL,"MYMENU");
}
My programme crashes whats problem .... :down:
When I debuged it showed me problem on statement of show timer...
Every thing is perfect why program crashes
:borg: Q2:
---
I need help for jump table ,... a complete refrence (for C language of course:baaa: )
Mr Dragon
June 22nd, 2004, 21:48
Ack... wouldn't touch MFC with anyone's.
You should start with standard Petzold style Windows programming.
Might want to check out aehowto.txt which explains how to write emulators from first principles. http://patpend.net/technical/arcade/aehowto.txt
Doomulation
June 22nd, 2004, 22:59
Awww, get off his back! MFC isn't that bad, really.
Unfortunaly, this project seems built on a non-dialog source, as which I really never use. If you're creating anything but editors n' stuff, a dialog app should work for you.
Btw, switch statements are automatically translated into jump tables by the ms compiler.
refraction
June 22nd, 2004, 23:43
learning how to use jump tables can be handy, i imagine the jump tables converted from switch tables arent as efficient as doing them yourself, which would explain why most emu authors still use them ;)
theres a tutorial written be a friend of mine HERE (http://www.zenogais.net/projects/tutorials/func_pointers.txt)
its not perfect, if you get any problems it may take you a while to work out but youll get there eventually :)
Mr Dragon
June 23rd, 2004, 10:41
Well I'd think that starting off with MFC isn't a great idea if you are a beginner. For an emulator you'd just want a quick window and then get straight into DirectX or OpenGL. MFC is just another hurdle that you don't need to jump, especially now MS has committed completely to .net.
To his original question though. I don't think there is an *easy* machine to emulate. Even something simple like a Nes has the headache of mappers and things like a 2600 don't have a bitmapped display. Every machine has its gotcha's.
Of course it'd be best to emulate a machine he already owns by using legal backup roms of games he owns right ? :o)
refraction
June 23rd, 2004, 11:46
well if he really wants a challenge he could try emulating a 16bit machine like snes or megadrive(genesis), but if hes still quite new to it id chose an 8bit machine to go for, maybe nes or gameboy or something like that, or ones that are very often forgotten, the ZX Spectrum and Commadore 64, i dont think they're 8bit but i can imagine it being a pain to do.
MXP
June 23rd, 2004, 13:35
Well look my emulater is ready and will be on air , I am currently facing a strange problem when I build exe in debug mode it works fine but when build exe in release mode and exetcute it ,it crashes ... I have uploaded the exe try to run it on your system and tell me wether it works fine if not that what can go wrong...
Please quick response required ,this is window version with everything you can imagine
Doomulation
June 23rd, 2004, 21:38
Nope. It crashes. Why don't you use JIT debugging?
MXP
June 25th, 2004, 09:11
First version release of my emu is ready so here it is ...
I also have question..
Which put pixel will be faster Simple MFC or DX based :party: :santa: :bunny: :icecream:
smcd
June 25th, 2004, 09:51
Well it kinda works, pong puts stuff on the screen but how do you control it now? Also, the cpu speeds could do with a bit of work. =)
refraction
June 25th, 2004, 12:21
couple of bugs there in your op codes, causing the text to mess up, heres the op codes under my old chip8 emu, the fonts work on it and most games which is a start :)
and pixel wise, i wouldnt worry which is faster, the emu works too fast as it is!! tho i imagine DX will be faster than plotting with MFC.
Note: this file is same as my new one, but i thought switch case's would be easier to understand than jump tables :) dont just copy the code tho.. understand why ive done mine like i have and check it against the technical docs so you know where you went wrong :)
MXP
June 26th, 2004, 07:59
Well it kinda works, pong puts stuff on the screen but how do you control it now? Also, the cpu speeds could do with a bit of work. =)
Use arrow keys in pong to control those babies and use cpu speed to fit my emu according to your machine :bye3:
I need some web hosting for publisihing my emu :icecream: :evil: :bouncy: :plain: :whistling :P :yucky: :bye3: :bye3: :bye3: :bye3:
refraction
June 26th, 2004, 15:20
http://www.50megs.com
:)
Doomulation
June 26th, 2004, 19:36
couple of bugs there in your op codes, causing the text to mess up, heres the op codes under my old chip8 emu, the fonts work on it and most games which is a start :)
and pixel wise, i wouldnt worry which is faster, the emu works too fast as it is!! tho i imagine DX will be faster than plotting with MFC.
Note: this file is same as my new one, but i thought switch case's would be easier to understand than jump tables :) dont just copy the code tho.. understand why ive done mine like i have and check it against the technical docs so you know where you went wrong :)
Does not. Try emulating the more complex games.
In this case MFC isn't needed, though. Go for DX. In a more complex emulator, you'll definetly need DX.
MXP
June 27th, 2004, 08:00
Hey Can Some one provide me 2600 documentation I need them with op codes(Yeah you guessed correct thats my next emu)
refraction
June 27th, 2004, 15:45
always try searching google before asking :P its amazing what you find. like this for example
http://www.io.com/~nickb/atari/docs.html
MXP
June 30th, 2004, 07:45
:yucky: Well i am having a problem with Direct X i want coordinates of DX attached with my window, How can i obtain coordinates of the window client area(drawing area) top left ,and bottom right (see image attached for details).(Or what arguments shoul i use in creating back surface for window)
Also i have attached new my emu when i run Tank on it something starnge happens what??? it will produdce a debug.txt for helping you conatining
Memory Loaction: OPcode
I can`nt figure it out lets see if u can
refraction
June 30th, 2004, 14:37
have you finished all your opcodes yet? cos im getting an invalid opcode error in tetris, but its not showing anything in the debug thats not a valid opcode....
zenogais
June 30th, 2004, 17:13
:yucky: Well i am having a problem with Direct X i want coordinates of DX attached with my window, How can i obtain coordinates of the window client area(drawing area) top left ,and bottom right (see image attached for details).(Or what arguments shoul i use in creating back surface for window)
Also i have attached new my emu when i run Tank on it something starnge happens what??? it will produdce a debug.txt for helping you conatining
Memory Loaction: OPcode
I can`nt figure it out lets see if u can
DirectX doesn't quite work like that. But basically the coordinate of the upper-left hand corner is where drawing starts and it is always (0, 0) or since I'm guessing you're using Direct3D (0, 0, 0). The bottom left depends on the size of the screen. If you were in 800x600 mode the bottom left would be (799, 599). Hope this helps.
Also for arguability, I do use MFC myself. And I find it to be much easier to whip up a simple window in MFC than using the Win32 API. Alot of people view MFC as a complex beast, I know I once did, but its actually quite simple.
This is my favorite MFC tutorial, and the one that demystified it for me: http://esprit.campus.luth.se/~humus/Articles/OpenGL_Basic_Framework/index.html
Doomulation
June 30th, 2004, 19:09
Indeed, zenogais is right.
Now, about directx. I know about d3d, if that's what you use.
When you create a device, you'll normally specify the backbuffer dimensions (height & width). If you create one at 1024x768, then 1024 is to the far right and 768 is the bottom.
You can also obtain your window size by the GetClientRect API I think...
hope that helps.
have you finished all your opcodes yet? cos im getting an invalid opcode error in tetris, but its not showing anything in the debug thats not a valid opcode....
I have implemented all opcodes of chip 8 and the warining appears due to eog(end of game).(PC goes beyond instructions)
and by the way in NEOCHIP8 emu it shows wrong memory locations i.e. PC
zenogais
July 1st, 2004, 06:32
I have implemented all opcodes of chip 8 and the warining appears due to eog(end of game).(PC goes beyond instructions)
and by the way in NEOCHIP8 emu it shows wrong memory locations i.e. PC
What game are you testing exactly? And can you post the errors or a screenshot to show exactly what you're talking about?
refraction
July 1st, 2004, 13:28
and by the way in NEOCHIP8 emu it shows wrong memory locations i.e. PC
yeh thats just the debug thats wrong, where its incramented after the op is read from memory i didnt put int "PC-2" into the debug output :P
but dont worry, it does call the right location.
Finally i got the problem :P Chip 8 Invlolve some of the SChip OPCODES so i need to correct them :yucky:
Finally i got something stupid in my emu ,,,,
the opcode 0xEXXX
Here is some code :
bool opE(){
byte id=(cpu.opcode & 0x0F00)>>8;
short keyP=(GetKeyState(key[cpu.V[id]]));
switch(cpu.opcode&0x00FF)
{
case 0x9E:
if(!keyP)
cpu.PC+=2;
break;
case 0xA1:
if(keyP)
cpu.PC+=2;
break;
default:
return false;
}
cpu.PC+=2;
return true;
}
it do not works right due to which tank and tetris like games are effected...
:P Solutions required
I only have to check the key state how can i do it
Doomulation
July 3rd, 2004, 21:25
You need to have an array with all keys. Those ops will look like this 0xEXNN. X identifies the register which will contain the key that you will check. The easiest way is, as I said, an array. Then you'd simply do this:
int key = [ (opcode & 0x0F00) >> 8 ];
case 0x9E:
if (keys[key])
PC += 4;
case 0xA1:
if (!keys[key])
PC += 4;
Get me?
What values are stored against keys in registers;
I launched the site for my emu
http://www.chirp.co.nr
refraction
July 9th, 2004, 16:02
What values are stored against keys in registers;
I launched the site for my emu
http://www.chirp.co.nr
its just the number of the key, for example the register has key E stored, the opcode will check if key E is pressed, so if you have an array of 15 places and get them to set true or false when the key is pressed, itll check position 14 to see if the condition is true, if it is itll say to the system that the key is pressed as it returns true, if its not pressed it should return false from the array. you follow?
vBulletin v3.6.2, Copyright ©2000-2010, Jelsoft Enterprises Ltd.