Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Home Register Downloads FAQ Members List Calendar Arcade Mark Forums Read

WON'T YOU JOIN US?
You are not a registered member and
are viewing this site as a guest.
Registration is simple and FREE.
Join this CrowdGather community today.
Registration offers the following perks:

» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging

join

Reply
 
Thread Tools Display Modes
Old July 8th, 2011, 23:20   #441
omegadox
Code it the hard way :P
 
omegadox's Avatar
 
Join Date: Jul 2008
Posts: 1,267




I want to make a test unit some day:

- Test Math results / Binary Coded Decimal
- Test 0xF Flag on AND, OR, XOR, ADD, SUB, Collision
- Test syscalls
- Test Save/Load RPL flags
- Test Call / Jump
- Test for Vertical Wrap hack (Blitz was created on machines that didn't support vertical wrap)
- Test for normal wrapping
- Test fonts
- Super Chip8 tests
- maybe mega chip tests?


Note about hybrid games: They are special chip8 programs containing native runtime code. Some are really whole native programs that doesn't use the chip8 interpreter at all (I wouldn't call them chip8 programs or hybrid :P). The normal [real] hybrids just use syscalls to call native CDP1802 code inside the rom itself which help chip8 games access any part of memory such as the video buffer, chip8 registers, stack memory, chip8 interpreter work memory. Also can read the cdp1802 register for some info such as pointers, PCs, and interrupt info. I also think its illegal in chip8 programming to have programs call code outside the rom such as interpreter code or the HW rom.
__________________
Current Projects
Eimu - Chip8X Emulator
Super64 - N64 Emulator

Emulators are for learning, fun and success and not for demanding gamers and freeloaders.

:: I love my Monarch girl ::
omegadox is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old July 16th, 2011, 22:47   #442
BestCoder
Registered User
 
Join Date: Feb 2011
Posts: 40
The link to my testrom has been changed. The readme file is more complete now.
http://forums.ngemu.com/attachment.p...5&d=1309812602

I'll post my Chip8/SuperChip8 emu later.

Last edited by BestCoder; July 26th, 2011 at 18:52..
BestCoder is offline   Reply With Quote
Old September 10th, 2011, 18:40   #443
xampf
Registered User
 
Join Date: Sep 2011
Location: swiss
Posts: 4
thanks for that great testroom helped me quite a lot

Merci beacoup keep your good work up !

Edit: finished my Chip-8 Emulator now, its entierly written in Java.
Could upload it if someones is interested

Last edited by xampf; September 11th, 2011 at 00:18..
xampf is offline   Reply With Quote
Old September 11th, 2011, 16:53   #444
BestCoder
Registered User
 
Join Date: Feb 2011
Posts: 40
You're welcome.
BestCoder is offline   Reply With Quote
Old May 23rd, 2012, 23:58   #445
nondescript
Registered User
 
Join Date: Dec 2011
Posts: 11
confusion over SHR instruction

hi guys,

I am following cowgod's chip 8 documentation to code up my emulator in java and i am having problem understanding the following instruction

8xy6 - SHR Vx {, Vy}
Set Vx = Vx SHR 1.

If the least-significant bit of Vx is 1, then VF is set to 1, otherwise 0. Then Vx is divided by 2.

It says to shift by 1, if so, what is the use of y in the instruction 8xy6. Can anyone clarify that for me? Appreciate your help!
nondescript is offline   Reply With Quote
Old May 25th, 2012, 16:10   #446
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
there is no use for the Y, just ignore it It's probably just in there for opcode format purposes.
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline   Reply With Quote
Old May 25th, 2012, 19:06   #447
nondescript
Registered User
 
Join Date: Dec 2011
Posts: 11
Thanks! refraction,

I have another question. I am implementing the draw function. According to the specs, when writing new pixels the pixels are xored. That would mean if in a position there is a pixel written and if i write 0 then the pixel wont get cleared. Is that correct? I was assuming the sprite bits in the memory is what will be written in the screen.
nondescript is offline   Reply With Quote
Old May 26th, 2012, 12:06   #448
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
Yeah: (old ^ new = ...)
0 ^ 0 = 0
1 ^ 1 = 0
1 ^ 0 = 1
0 ^ 1 = 1

So basically, two set pixels cancel each other out.
__________________
tchip16 (chip16 assembler) Js16 (browser chip16 emulator)
mash16 (chip16 emulator) img16 (chip16 sprite converter)
______________________________________

Desktop: i5 750 @ 3.6 Ghz, 4GB ram, GTX 570 OC | Windows 7 Pro 64
Laptop: (Thinkpad) i5 430M, 4GB ram, Intel IGP | Arch Linux, Windows 7 Pro 64
tykel is offline   Reply With Quote
Old June 14th, 2012, 23:14   #449
Stefonzo
Registered User
 
Stefonzo's Avatar
 
Join Date: Jun 2012
Location: United States
Posts: 2
Hello I'm new here and have been recently working on programming a chip-8 emulator in c++. I have split the code into three parts, chip8.h, chip8.cpp, and main.cpp. I have finished chip8.h and am working on chip8.cpp however have one question:
What memory location is 'NN' or 'NNN' referring to? Sorry if this is in the wrong section.

Thanks
Stefonzo
Stefonzo is offline   Reply With Quote
Old June 15th, 2012, 00:10   #450
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Wink

Quote:
Originally Posted by Stefonzo View Post
Hello I'm new here and have been recently working on programming a chip-8 emulator in c++. I have split the code into three parts, chip8.h, chip8.cpp, and main.cpp. I have finished chip8.h and am working on chip8.cpp however have one question:
What memory location is 'NN' or 'NNN' referring to? Sorry if this is in the wrong section.

Thanks
Stefonzo

NN literally refers to 2 numbers and 3 for NNN. So NN can be any number from 0x00 up to 0xFF and NNN can be anything from 0x000 up to 0xFFF
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline   Reply With Quote
Old June 19th, 2012, 04:32   #451
Prads
Registered User
 
Prads's Avatar
 
Join Date: Sep 2011
Location: Australia
Posts: 89
Just wanted post my dynarec chip8 emulator that I wrote in the past. Thought it might be helpful for people who wants to learn how write a dynarec cpu. I created this just for learning purpose, to teach myself about dynarec so the code isn't perfect.

And no input and sound emulation, so it just shows the first screen. :P
Link: http://www.pradsprojects.com/downloa...8%20dynarec.7z
__________________
My Programming Projects: www.pradsprojects.com
Prads is offline   Reply With Quote
Old June 19th, 2012, 12:34   #452
xampf
Registered User
 
Join Date: Sep 2011
Location: swiss
Posts: 4
I didnt look into it yet, but does it handle self-modifying code? And how did you assign the registers?
And it would be great if you would post it also over at emutalk, it looks very promising!
xampf is offline   Reply With Quote
Old June 19th, 2012, 14:59   #453
Prads
Registered User
 
Prads's Avatar
 
Join Date: Sep 2011
Location: Australia
Posts: 89
Quote:
Originally Posted by xampf View Post
I didnt look into it yet, but does it handle self-modifying code? And how did you assign the registers?
And it would be great if you would post it also over at emutalk, it looks very promising!
Nah it doesn't handle self modifying codes. I didn't want to make the code too complicated that it would scare people away. lol :P
__________________
My Programming Projects: www.pradsprojects.com

Last edited by Prads; June 19th, 2012 at 15:06..
Prads is offline   Reply With Quote
Old June 19th, 2012, 23:31   #454
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Quote:
Originally Posted by Prads View Post
Nah it doesn't handle self modifying codes. I didn't want to make the code too complicated that it would scare people away. lol :P
It doesn't make it too much more complicated. In the recompiling code area, keep an array of memory and when you "read" a bit of memory for the opcode, write to this second array the block start address of that recompiled code, then when you do a write to memory, you can check that array to see if it has a value (you can even have a .isRecd bool on it if you want just incase 0 is the address written to :P) and if it has an address, clear that address in the recompiler cache so it needs to be recompiled.

its more complicated to explain than implement >.< lol. This is what i did on my chip16 emu anyways
__________________

http://www.pcsx2.net
Intel i7 920 @ 3.4Ghz, POV GTX 570 1.3Gb, 1.8Tb HD space, 6Gb OCZ Reaper PC3-14400 Triple Channel
Dont PM me for help, use the forums, thats what its for!


My Chip16 Emulator RefChip16 http://code.google.com/p/refchip16/
refraction is offline   Reply With Quote
Old June 20th, 2012, 01:06   #455
Prads
Registered User
 
Prads's Avatar
 
Join Date: Sep 2011
Location: Australia
Posts: 89
Quote:
Originally Posted by refraction View Post
It doesn't make it too much more complicated. In the recompiling code area, keep an array of memory and when you "read" a bit of memory for the opcode, write to this second array the block start address of that recompiled code, then when you do a write to memory, you can check that array to see if it has a value (you can even have a .isRecd bool on it if you want just incase 0 is the address written to :P) and if it has an address, clear that address in the recompiler cache so it needs to be recompiled.

its more complicated to explain than implement >.< lol. This is what i did on my chip16 emu anyways
Yeah that makes sense. I can use that in my current emu project. Thanks!
__________________
My Programming Projects: www.pradsprojects.com
Prads is offline   Reply With Quote
Old September 18th, 2012, 23:35   #456
KrossX
クロッスエクス
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 3,649
Because I had to give it a try too mostly to learn about video and sound output...
After quite some work, then after a ton of more work to actually get some pictures I got this!



Just to see I was reading the sprite bytes wrong and how it hangs right there...



Now that looks more decent.
Also, it requires a D3D11 GPU.

#EDIT: Ooops, forgot... timers.

#EDIT2: Yay! With a thousand FPS points!



#EDIT3: Superrrr!

__________________


Last edited by KrossX; September 26th, 2012 at 08:41..
KrossX is offline   Reply With Quote
Old September 28th, 2012, 21:59   #457
KrossX
クロッスエクス
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 3,649
Question! I gotta go, so I'll post this before that. I still haven't read the entire thread though, sorry if this has been answered.

I was checking this demo/test...


I previously simply scaled whether super8 stuff was enabled or not. If enabled, display works like at 128x64 otherwise 64x32. Buuuut! This demo calls 0x00FE on startup and at the end scrolls down 1. But, the scrolling function works at 128x64 even with Super8 disabled. It also let me know that n=0 with Super8 disabled is still a big sprite (8x16).

So ma'question is, in the MegaChip, when this super/scroll functions are used, do they work at SuperChip resolution or MegaChip resolution?
__________________

KrossX is offline   Reply With Quote
Old September 29th, 2012, 14:24   #458
Hatorijr
Emu Author
 
Hatorijr's Avatar
 
Join Date: Dec 2004
Location: North Carolina
Posts: 599
been a while since i looked into megachip, last i looked there really was not nearly enough information available to emulate it, has that since changed?
Hatorijr is offline   Reply With Quote
Old September 30th, 2012, 09:24   #459
ShendoXT
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,550
Um? What is Super8? You mean Super Chip?
And for MegaChip do you mean new extension (2007) or SuperChip?

There are three different virtual machines:
Chip8 (Original)
SuperChip (Extension)
MegaChip (Extension, but the author did not bother to release official emulator for 5 years, ignore it).
__________________
Shendo's software blog

Core i5 2400 3.1 Ghz | ASRock H67M | GTX460 768Mb | 8GB DDR3 1333 | 1500 Gb HDD
Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64

Don't PM or ask me about VMP-MCR conversions. I will ignore you if you do.
ShendoXT is offline   Reply With Quote
Old September 30th, 2012, 10:20   #460
KrossX
クロッスエクス
 
KrossX's Avatar
 
Join Date: Mar 2006
Location: Argentina
Posts: 3,649
My apologies for the terms used. When I used "super8" and "Super8" though I thought to refer to the SuperChip from the first post, I actually just refer to 0x00FE and 0x00FF of said SuperChip. When I mentioned MegaChip, I meant as the MEGAChip mentioned in the first post.

I'll refrain from making such confusing and silly questions, my apologies again.
__________________

KrossX is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 10:07.

© 2006 - 2012 Emu Forums | About Emu Forums | Advertisers | Investors | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.