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 June 7th, 2012, 21:40   #401
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
All this is looking great guys!
Once I feel better from being sick I will get back to my programming too
paul_nicholls is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old June 8th, 2012, 09:41   #402
tronix286
Registered User
 
tronix286's Avatar
 
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
New version of CHIP-16 debugger:
v0.2 alpha 09.06.2012
+ Added Step Over debugging mode
~ Update README.TXT file

New versions of CHIP-16 debugger now avalible on google code: http://code.google.com/p/chip16debugger/ Please submit any issues here.
__________________
tronix286 is offline   Reply With Quote
Old June 13th, 2012, 08:23   #403
Prads
Registered User
 
Prads's Avatar
 
Join Date: Sep 2011
Location: Australia
Posts: 89
Little progress with my chip16 compiler. Added Graphics and input capabilities.

Here's a small demo I made, it's called 'Pikachu'. :P Use your controller 1 direction button to move pikachu on screen.
Code:
Image pikachu = "pikachu.bin", 42, 46;
ConstString title = "Pikachu by Prads";
ConstString demo = "Chip16 Compiler Demo";

void main() {
	var x;
	var y;
	x = 0; 
	y = 0;

	while (1) {
		ClearScreen;

		if (GetController1 & 1) {
			y = y - 1;
		} else if (GetController1 & 2) {
			y = y + 1;
		} else if (GetController1 & 4) {
			x = x - 1;
		} else if (GetController1 & 8) {
			x = x + 1;
		}

		Print(demo, 50, 220);
		Print(title, 60, 200);
		Draw(pikachu, x, y);
		WaitScreenRefresh;
	}
}
After looking at that demo I realized that the font I created looks total CRAP! lol So, if anyone has made an 8x8 font then please send it to me.
Attached Images
File Type: jpg pikachu.jpg (40.8 KB, 26 views)
Attached Files
File Type: zip pikachu.zip (1.5 KB, 9 views)
__________________
My Programming Projects: www.pradsprojects.com
Prads is offline   Reply With Quote
Old June 13th, 2012, 08:44   #404
4p3r0
Registered User
 
Join Date: Jul 2011
Posts: 14
Some nice 8x8 fonts:

http://orangetide.com/nesdev/gamefonts/
http://bmf.wz.cz/
http://pics.pineight.com/nes/8x8s.png

4p3r0 is offline   Reply With Quote
Old June 13th, 2012, 09:03   #405
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
That's awesome! Well done! That'll make life easier
__________________

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 13th, 2012, 13:05   #406
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
Prads: Look in the "Sources" folder of the program pack... some games have "font.bin" files, just steal those (and check the source code on how to use them) :P
__________________
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 15th, 2012, 00:26   #407
Stefonzo
Registered User
 
Stefonzo's Avatar
 
Join Date: Jun 2012
Location: United States
Posts: 2
I really like the chip-16 documentation then the chip-8 one that I've been using (got about halfway finished) so I'm going to work on making this one, challenge accepted!
Stefonzo is offline   Reply With Quote
Old June 22nd, 2012, 00:18   #408
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
In my Chip16 emulator, I have a question about the instruction below:

Code:
C4 00 00 00	PUSHF 			Store flags register on stack. Increase SP by 2.
Since there are only 8 flags maximum, how come SP isn't increased by 1 (byte)?
Why is it increased by 2 bytes (word)?
paul_nicholls is offline   Reply With Quote
Old June 22nd, 2012, 00:56   #409
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Quote:
Originally Posted by paul_nicholls View Post
Since there are only 8 flags maximum, how come SP isn't increased by 1 (byte)?
Why is it increased by 2 bytes (word)?
for 16bit alignment, i would guess.
__________________

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 22nd, 2012, 08:34   #410
tronix286
Registered User
 
tronix286's Avatar
 
Join Date: Aug 2010
Location: Russia, Moscow
Posts: 48
Quote:
Originally Posted by paul_nicholls View Post
Since there are only 8 flags maximum, how come SP isn't increased by 1 (byte)?
Why is it increased by 2 bytes (word)?
Because all other registers are 16-bit. So, for example - i need check carry flag without jumps. I do:
Code:
       pushf           ; Store flags on stack.SP increase by 2
       pop r1          ; load flags from stack to register R1
       shl r1,13       
       shr r1,15
                         ; in R1 i have 1 or 0, depending on carry flag state
2all: new version of chip16 debugger avalible (ver 0.5 alpha). Some bugs fixed, added stack view panel. Added source code (delphi 7)
http://code.google.com/p/chip16debugger/
__________________
tronix286 is offline   Reply With Quote
Old June 22nd, 2012, 11:49   #411
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Thanks for the info tronix286
I will look at the new debugger version...I will find it most helpful as I am having trouble with my emulator and decoding op codes! LOL
paul_nicholls is offline   Reply With Quote
Old June 23rd, 2012, 15:23   #412
tykel
Sober coder
 
tykel's Avatar
 
Join Date: Aug 2010
Location: London, UK
Posts: 433
I have a suggestion to amend the spec:
The CLS instruction is currently supposed to reset the background colour to 0. I'm not sure this is what people want when they clear the screen... And I don't think any roms make use of this. Does anybody abide by this in their emulator?
If not, I suggest we change its behaviour to simply clear the screen with the current bgc.

Also, I will have something interesting to show quite soon!
__________________
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 23rd, 2012, 21:10   #413
ShendoXT
Moderator
 
ShendoXT's Avatar
 
Join Date: Feb 2006
Location: Croatia
Posts: 4,548
I don't know for others but my software relies on the current way the CLS is processed.

As for surprise, can't wait. You always have some cool stuff to show
__________________
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 June 25th, 2012, 07:58   #414
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Woo hoo! I finally got my Chip16 emulator to run a ROM sucessfully!!
It works on the Palette test one ATM...


That was thanks to the Chip16 debugger by tronix286

Now for the rest of the opcodes <G>

EDIT: it took me a while to realize that I needed to process twice the horizontal pixels that were passed in using the SPR command when drawing sprites!
It came out all wrong until I figured out that LOL
paul_nicholls is offline   Reply With Quote
Old June 25th, 2012, 10:06   #415
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Well done mate! glad you got it sorted!
__________________

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 26th, 2012, 07:34   #416
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Awesomesauce! I have managed to get my emulator to work on every ROM I have thrown at it now and it seems to work. The only things I haven't implemented are sound and sprite flipping
paul_nicholls is offline   Reply With Quote
Old June 26th, 2012, 10:26   #417
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Well done Paul I'm sure you'll have no problem with either of them
__________________

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 26th, 2012, 10:35   #418
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Thanks
The funny thing is that I am having trouble finding the source code for my Chip16 audio stuff that I posted here a little while back!

Would you happen to have it handy?
paul_nicholls is offline   Reply With Quote
Old June 26th, 2012, 10:46   #419
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 10,037
Afraid not, I made it up myself when I did mine
__________________

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 26th, 2012, 10:52   #420
paul_nicholls
Registered User
 
Join Date: Sep 2011
Location: Australia, Tasmania
Posts: 180
Nevermind...I just found my Chip16 SID sound source code LOL
Thanks mate
paul_nicholls 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 19:23.

© 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.