|
|
|||||||
| Home | Register | Downloads | FAQ | Members List | Calendar | Arcade | Mark Forums Read |
» Less advertising throughout
» Post and participate in discussions
» Network with other forum members
» Free private messaging
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Chip-8/Super Chip emulator PR01
It's yet another one of those...Chip-8/Super Chip-8 emulators. I got inspired by Shendo and his dedication for the same project, thus I started one just for the heck of it, also to test my skills and the performance of the language that I used. And thus born the 4th emulator ever written in Flash/ActionScript. Well, 4th, I think. Spent a week debugging, looking up documents, hex editing, disassembling, source code scanning, etc... and the likes to finally get it to this stage. Usage: just run the .exe file. Control scheme was obviously stolen from Shendo's idea: 1234 QWER ASDF ZXCV for 123C 456D 789E A0BF That said, HUGE credit goes to Shendo for thinking up this control scheme, anyone who claims that it's not Shendo's idea is going to get XOR'ed with himself 10 times. ![]() Anyway, included is the game Car (or maybe Sokoban, I don't even remember which one I included anymore). If you want to try any other game out, or test the emulator with your own codes, place the file in the same directory as the executable, and rename it to "ROM" (that's just it, no extension). If you find the beep noise I included annoying, please feel free to replace it with your own one. It'd better be in mp3 format... though some others may work as well. Experiment. (No, seriously, experiment with it, you never know)There might still be a couple of rare kinds of insects that got past my extensive bug spray and slipped into this release, so if you come across any of them, please... kindly leave a note, and maybe I'll get back to it if I can. Also, I would like to thank the following people: Shendo, for inspiring in the first place Refraction, for what he posted 3 years ago on Emutalk Cowgod, for writing an excellent document, though I admit that one did not cover quite a few... things. ;p (led to some crazy bugs that took me a whole day to trace, and I ultimately had had to resort to peeking at another coder's source code) My girlfriend, for being the reason for all other reasons. ![]() And the coders whose codes helped the debugging majorly. I looked at too many source codes to know which one was whose anymore... so... no specific names listed, sorry guys. ... Oh no, I didn't forget you. Hard core Rikki for referring me to an excellent site full of chip-8 emus. Thanks pal, those helped just as you said they would.And... that's it so far, if I left anything out, please feel free to give me a buzzer. Already got used to it anyway (got buzzed to oblivion when trying to implement the sound system). And to answer Squall-Leonhart for a question he had earlier, here's what this emu does but others don't: Low CPU and memory usage for a Flash application. ;p No wait, actually, it uses much less CPU than some other emus of the same system out there. Turn off the Bilinear Filter (Quality to Low) and it's using almost nothing to run. P.S.: This is not the same as what I posted in the Programming forums, by the way, the source code has changed drastically to allow for a lot of things to happen. Also releasing this to hopefully get more people to try it at some point, I just can't do it alone at this point. (if something doesn't run as it should, there's a sign of something being unstable, since it's not too big a system, a sign should be enough) Last edited by runawayprisoner; November 24th, 2008 at 11:19.. |
|
|
|
| Advertisement | [Remove Advertisement] | ||
|
|
|
|
#2 |
|
Ƹ̵̡Ӝ̵̨̄Ʒ 龍我雷 Ƹ̵̡Ӝ̵̨̄Ʒ
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: Oak Lawn, IL
Posts: 1,200
|
|
|
|
|
|
|
#3 | |
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2006
Location: india<<hyderabad..it rocks>>
Posts: 3,608
|
good work there......
__________________
Quote:
|
|
|
|
|
|
|
#4 |
|
Totally crazy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2005
Location: Brazil
Posts: 3,175
|
Awesome RAP. =) Congrats, really.
__________________
I do flash and photoshop... stuff. |
|
|
|
|
|
#5 | |
|
Moderator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2006
Location: Croatia
Posts: 4,372
|
Quote:
![]() (Though I set A to both Z and Y keys for different keyboard layouts...)
__________________
Shendo's software blog Core i5 2400 3.1 Ghz | ASRock H67M | HD4850 512MB | 8GB DDR3 1333 | 500 GB + 1500 GB HDD Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64 |
|
|
|
|
|
|
#6 | ||
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Quote:
Plus that thread I opened was a bout Chip-8. This is really Super Chip. ![]() Quote:
![]() I am thinking about compiling my own version of a doc since all of the ones I read omitted a few things, even Cowgod's document had some things described only partially, I think. (well, not that I mind since nocash's Gameboy document, the one I'm reading, is almost hell to figure out what is what)P.S.: TODO: Mega Chip-8 emulation!! Oh no... didn't see that coming, did ya? Mega Chip-8 was just demo'ed last year, after all. And up to 2006, there are still games being written to Chip-8, so... I think this emulator/interpreter, could turn out to be a current/next-gen emulator.
|
||
|
|
|
|
|
#7 | |
|
Moderator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2006
Location: Croatia
Posts: 4,372
|
Quote:
Unfortunately creator's site doesn't have any info about it (actually it says that specs will be posted soon...) Anyway good luck if you decide to implement Mega chip emulation. Btw: If you don't already know there is a video demonstration of Mega chip version of Blinky on Youtube.
__________________
Shendo's software blog Core i5 2400 3.1 Ghz | ASRock H67M | HD4850 512MB | 8GB DDR3 1333 | 500 GB + 1500 GB HDD Grundig VLC 7121 C (1080p) 32" | Razer DeathAdder | Logitech G110 | Windows 7 x64 Last edited by ShendoXT; November 24th, 2008 at 17:16.. |
|
|
|
|
|
|
#8 |
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Yepper. Saw that one already. Looks really promising. ![]() I'm actually a bit more interested in this one: It looks like they didn't just add color support. Guess this means more modifications to the draw command is in order. Anyway, to pass the time, I guess I'll write a Gameboy emulator next. |
|
|
|
|
|
#9 |
|
Ƹ̵̡Ӝ̵̨̄Ʒ 龍我雷 Ƹ̵̡Ӝ̵̨̄Ʒ
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2002
Location: Oak Lawn, IL
Posts: 1,200
|
my advice now, -before engaging other emus projects- would be to make dynarec instead of interpreter just for practice, since (S)Chip8 contains so limited instructions (less than 40 I guess) it's gonna be simple and good practice for other projects.. Damn I must say I am jealous, I might think making one myself.. (just curious how many Chip8 emus out there!!!?) |
|
|
|
|
|
#10 | |
|
You're already dead...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Planet Vegeta
Posts: 5,235
|
Quote:
you need a programming language that supports low-level asm. actionscript is a 'scripting language', that means it doesn't get compiled into native-code, but instead is run and interpreted by some other application. if RAP wants to get into more complex systems, i suggest he program in a real programming language (that compiles into native machine-code); unless the goal is just to see if its possible to make emu XXX with actionscript. sooner or later actionscript will reach its limits; not just in speed, but also in functionality. more complex emus are probably possible, but the code will be big and messy (because certain features are most-likely not present, i.e. structs, classes, etc..)
__________________
"It was, of course, a lie what you read about my religious convictions, a lie which is being systematically repeated. I do not believe in a personal God and I have never denied this but have expressed it clearly. If something is in me which can be called religious then it is the unbounded admiration for the structure of the world so far as our science can reveal it." - Albert Einstein check out my blog ![]() Last edited by cottonvibes; November 25th, 2008 at 04:54.. |
|
|
|
|
|
|
#11 | ||
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Quote:
![]() And you don't really need to closely follow the procedures of the machine. That was how I got this thing to run so fast to begin with. It's not really a recompiler, but it's close, I think. Best of all, Flash runs on a lot of platforms. ![]() Anyway, already gotten into Gameboy programming, already decoding opcodes (damn... almost 256 instructions this time, not a single byte left out for any reason at all). Quote:
Plus it does have a lot of features at this stage. ActionScript 3.0 ended being a scripting language and turned into something closer to C++ instead. Even the implementation is almost the same, but of course, the absence of struct (classes do exist, and you can create them) and inlining codes as well as define and a few more stuffs really does make some stuffs tedious. I'm still wondering why they won't implement '~' whereas they let '|', '&' and '^' slide... I miss '~' from C sooo much. It was useful with flags.
|
||
|
|
|
|
|
#12 |
|
You're already dead...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Planet Vegeta
Posts: 5,235
|
btw, some screenshots of the emu in action would be nice
__________________
"It was, of course, a lie what you read about my religious convictions, a lie which is being systematically repeated. I do not believe in a personal God and I have never denied this but have expressed it clearly. If something is in me which can be called religious then it is the unbounded admiration for the structure of the world so far as our science can reveal it." - Albert Einstein check out my blog ![]() |
|
|
|
|
|
#13 |
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Sure thing. Background trying to simulate a TI calculator... Obviously I'm waaayyy off.LOOPZ runs on my emu, though some other emus have troubles with it for some reason. P.S.: If you decide to grab this and try it out, you can turn off the bilinear filtering with Quality > Low in the control. ![]() Oh, and found out how to do ~ in AS3! Yay! Now my Gameboy emu can go on without having to rely on heavy string actions. ;p |
|
|
|
|
|
#14 |
|
You're already dead...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Planet Vegeta
Posts: 5,235
|
thanks for the pics. nice job. if you can make a gameboy emu in flash it would be pretty interesting.
__________________
"It was, of course, a lie what you read about my religious convictions, a lie which is being systematically repeated. I do not believe in a personal God and I have never denied this but have expressed it clearly. If something is in me which can be called religious then it is the unbounded admiration for the structure of the world so far as our science can reveal it." - Albert Einstein check out my blog ![]() |
|
|
|
|
|
#15 |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: idk
Posts: 266
|
|
|
|
|
|
|
#16 |
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Gameboy CPU instructions are currently causing troubles up and down. That's not to mention the way opcodes are interpreted by the machine, and the way memory, stack and some other stuffs are done. But I'm getting somewhere... hopefully.Anyway, hope to hear more progress from you soon, Zack. If you have any question, please don't hesitate to ask. I know there are some things that aren't covered in any document, and they could cause some troubles.
|
|
|
|
|
|
#17 | |
|
Emu author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: idk
Posts: 266
|
Quote:
Anywhoo, I started making some progress. I got rom loading/initializing working (i think ) and all the opcodes implemented. At the moment i think only about 30% or less of them are correctly done.Just fixed a huge bug where my opcode was somehow getting a 0x7810 value... xD So a few of the opcodes are working now. It is throwing some weird opcodes into my debug text file though... Going to keep working on it
|
|
|
|
|
|
|
#18 |
|
Level 9998
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2006
Location: Java
Posts: 8,267
|
Soo... any question you would like to ask? I would love to add as much information to this thread as possible... since it would help... more or less.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|