(S)CHIP 8 Emulator 1.3

Share your advanced PureBasic knowledge/code with the community.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

(S)CHIP 8 Emulator 1.3

Post by Heathen »

...
Last edited by Heathen on Thu May 07, 2009 10:32 am, edited 48 times in total.
I love Purebasic.
KarLKoX
Enthusiast
Enthusiast
Posts: 681
Joined: Mon Oct 06, 2003 7:13 pm
Location: France
Contact:

Post by KarLKoX »

Great job ! Image
"Qui baise trop bouffe un poil." P. Desproges

http://karlkox.blogspot.com/
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Thanks :)


Here's some public domain roms (not all work yet)

http://www.zophar.net/roms.phtml?op=show&type=chip8


Btw anyone can use this code however you want (help is more than welcome also), PB needs a good and solid open source chip8 emulator for everyone to learn from.

Here's a bit of info if anyone is interested

- There are 16 registers from 0-15 register(X)
- Register(15) is the cary register and collision flag
- I is another register mostly for memory access
- chip8 mode is 64 x 32 while schip8 mode is 128 x 64 (scaled to the window)
- The stacksize only allows for 16 subroutine calls
- All graphics are XORed onto the screen
- I do not use wrapping (as the documentation suggests) since only 1 game uses it (that I know of) and it causes problems in some games. Most games that that need it, handle it themselves.
- The rom starts at $200 since the first 512 bytes is reserved for the interpreter.
Last edited by Heathen on Thu Jan 18, 2007 2:47 pm, edited 3 times in total.
I love Purebasic.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

works fine here
Image
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Added the gui and updated to 0.2.. Unfortunately, not much in the way of bugs have been fixed (just some small things)
I love Purebasic.
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post by techjunkie »

Really great! and nice looking code, almost beautiful... :wink:
Last edited by techjunkie on Fri Jan 19, 2007 4:17 pm, edited 1 time in total.
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

thanks :) I just updated to 0.3 lots of changes.


Edit:
Updated to 0.4. This fixed MANY games.
I love Purebasic.
zikitrake
Addict
Addict
Posts: 875
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Post by zikitrake »

:shock: :D Really nice!!!
PB 6.21 beta, PureVision User
Pantcho!!
Enthusiast
Enthusiast
Posts: 538
Joined: Tue Feb 24, 2004 3:43 am
Location: Israel
Contact:

Post by Pantcho!! »

Awesome!!!

really great!!

what is next ? gameboy ? :lol:
DarkDragon
Addict
Addict
Posts: 2345
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Pantcho!! wrote:Awesome!!!

really great!!

what is next ? gameboy ? :lol:
Already done by balrog(part of it), but nobody has the source anymore.
bye,
Daniel
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Yup, gameboy is next for sure. will probably take a very long time since the z80 processor has faaar more instructions than chip8. Anyone interested in helping?

Ps: updated to 1.0, almost every game works now.
I love Purebasic.
Brice Manuel

Post by Brice Manuel »

Already done by balrog(part of it), but nobody has the source anymore.
If you want, I can check my PB code archives. I am pretty sure that is on one of my CDs in the Balrog section. I also have the code for an open source GameBoy emulator written in VB.
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Here is his gameboy emulator

Very incomplete though.

Now that this emulator is almost done, does anyone want to help me with writing a gameboy emulator?

Im probably going to start mapping the z80 instructions today

Edit:
Updated to 1.1, almost perfect compatibility now. Even more games work perfectly like joust. Check the changelog.
I love Purebasic.
DarkDragon
Addict
Addict
Posts: 2345
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Nice to see the sources again :D .
bye,
Daniel
Heathen
Enthusiast
Enthusiast
Posts: 498
Joined: Tue Sep 27, 2005 6:54 pm
Location: At my pc coding..

Post by Heathen »

Well guys, I probably wont be updating this much more (except for some visual changes or if some wierd bug creeps up).

I have started work on my z80/gameboy emulator. If someone wants to join me that would be more than great. :)
I love Purebasic.
Post Reply