Emulator in Blitzmax?
BlitzMax Forums/BlitzMax Programming/Emulator in Blitzmax?
| ||
Hi everybody, [EDIT] The emulator project is now complete! Have fun! Here's a link to the emulator project site: http://rveilleux.googlepages.com/blitzmaxarcadeemulatortutorial [/EDIT] I'm thinking of doing a tutorial-like approach to create a old arcade machine emulator in Blitzmax. The ultimate goal is educational, there is nothing as satisfying as seeing a game boot to life, running emulated code thru your own work. So my question is: would you be interested in seeing and creating your own arcade emulator* in Blitzmax? *Note: I'm planning on doing one machine in particular, not a 'multiple-arcade' like MAME or MESS which would be exponentially harder. |
| ||
I've considered emulating Space Invaders or Pacman.. but never got too excited about writing an 8080 core. But to answer your question. Yes I would be interested in your tutorial. |
| ||
Hello, That would be very interesting. |
| ||
DO IT! DO IT! ;) |
| ||
VIC-20 emulator or sega-8bit :O |
| ||
Someone did emulate a spectrum and a couple of Z80 based arcade machines in Blitz (not Max) a while back. The source for some of it was available. |
| ||
I would love my beloved Atari 8-bit emulated. |
| ||
Emulating a z80 shouldn't be the hardest part.. emulating videochips and audiochips are usually the tough part. |
| ||
Are there any systems, consoles or arcade games that haven't already been emulated by someone? How about a Cray XMP Super Computer emulator?! ;) Russell |
| ||
Russel, I agree. But what can be done? Liberty will prevail over all oppression. |
| ||
Awesome people. The project has started. I am doing like Dan suggested a 'Space Invaders' emulator, mostly because it's probably one of the easiest game to emulate and because there is so much information available on the net. The project is going well, I'll be posting the first tutorial in a couple of days. Thanks and see you soon! |
| ||
Had thought of how cool it would be to do a hardware-accelerated Amiga emulator, but obviously that's a very complicated task. |
| ||
If you have tried WinUAE, the amiga emulation is pretty good. I don't know specifically what you would like to be faster by making it hardware-accelerated: if you mean the graphic subsystem, you could maybe have the blitter doing copyrect accelerated but as you said, that would be a very complicated task. A modern PC CPU is able to emulate an entire Amiga at full speed or even faster. That said, the amiga has several processor (copper, blitter, CPU) running in parallel along with freakingly precise timing syncronisation with the video signal. And there's some DMA running also. Wow. I wonder how much work has gone into WinUAE to make it so perfect. |
| ||
Yah I know it's fast already but there's surely room for improvement. Throw in some OpenGL hardware accelerated graphics and maybe using the GPU for general computing simulation. |
| ||
I'm glad you're doing this project and I'll be following along, but Max is an odd choice -- without a pure 2d graphics mode, rendering a video buffer is going to choke your performance. There's a reason why you don't see many raycasters hereabouts :) |
| ||
Sledge, writing into a pixmap is a sort of video buffer and it's pretty fast. In fact I do have a working "wolf-3D style" raycaster in BMax and it's ultra fast. I might post it if you would be interested to see. |
| ||
If you're going to emulate just one game, it is pretty easy. To emulate a complete game console is 10x harder. |
| ||
In fact I do have a working "wolf-3D style" raycaster in BMax and it's ultra fast. I might post it if you would be interested to see. Definitely! |
| ||
Alright, there you have it: http://rveilleux.googlepages.com/blitzmaxwolf-3dstyleraycaster |
| ||
hi remz... tested your 3d app but only a window with black screen here! tested on win vista (svga geforce 8400m gs 256mb) |
| ||
That's ace, much faster than I would've expected -- are you using PixmapPixelPtr()? |
| ||
Sledge: yes, PixmapPixelPtr casted in a int ptr: The pixmap is created with PF_RGBA8888: if you use the regular "Byte Ptr" returned by PixmapPixelPtr(), you can access the components one by one (R, G, B, A). But if you cast it in a Int Ptr you can write a whole 32-bit pixel value in one shot. Gregbug: thank you! I've tried it on a Vista machine and got the same result. I've compiled a version with OpenGL instead of DirectX, works perfectly now. You can find the new version on the same page: http://rveilleux.googlepages.com/blitzmaxwolf-3dstyleraycaster |
| ||
wow! works perfectly!!! and fast! |
| ||
Alright, the first two little chapters are online and ready to be read and checked! I would be very interested in hearing feedback from you guys, and I'll be going on with the emulator as fast as I can. http://rveilleux.googlepages.com/blitzmaxarcadeemulatortutorial |
| ||
Hey Remz, That was great(and fast too) and I also bring your files size down from 295KB to 89KB :) IF you want the compress files then let me know and I will send to you. |
| ||
Part 3 please :-) |
| ||
Cool :) please more ! thanks |
| ||
nice thanks |
| ||
This seems really interested - thanks. I've also wondered how emulators actually work under-the-hood... I shall be keepings tabs on this thread... Keep up the good work! Looking forward to Part 3 and beyond... |
| ||
Are we emulating the actual hardware of the original, or re-creating the games verbatim? (ie: Emulating a Z80 running actual Z80 code, etc). Should be interesting to see what kind of performance you can manage! (I have a 166Mhz system lying around to test it on...) Imagine running a PC emulator on an emulated Amiga running on a PC. Could it work? Yes. Would it be slow? Absolutely! :) Russell |
| ||
Emulation of course :) The CPU is an Intel 8080. Performance is not the main goal of course, but my typical iBook G4 will be able to run the game at full speed in release mode. I'm wondering what kind of performance your 166Mhz is going to get, if the program boots at all :) Have you tried any Blitzmax stuff on that antique? |
| ||
I've had an interest in wanting to code an emulator (of the good ol' NES) for a long while, so I'm quite interested in this, even if it is for a non-relevant system. The main thing I could never grasp was how to set code up so it emulates hardware, and from there, knowing how to interpret rom information and then applying it to said emulated hardware.... By anychance will you be coding the entire thing in a manner that'll be adaptable to Blitz3D? Keeping my eye on this otherwise. |
| ||
thanks for all 3 parts. Much apreciated. looking forward to the rest of the tutorial. |
| ||
whew.. Part 4 is online! |
| ||
Please stick the link in your first post, so we don't have to remember (look for) it :-) |
| ||
Remz, As a user of Mame from the very start (well almost v0.05), this stuff is so interesting! Thanks for the explanation - can't wait to see the end result! I thing I could suggest, please add a link on your front page to each new chapter?? |
| ||
Excellent tutorial ! I'm following it with great interest. Thanks a lot remz. |
| ||
That's realy entertaining remz. A very pleasant reading. Keep them coming. |
| ||
@remz: Impressive. I completely agree with Koriolis |
| ||
Yes very interesting! |
| ||
I tried to figure out the next instruction, is itCase $31 setsp(FetchRomShort()) or something similar. Just wondering.:) [edit] if that is correct(long shot) than maybe the next instruction is Case $06 setB(FetchROmByte()) but I am stuck on $CD I am interested in seeing how that one works. I know that is a function call but it must store the current address in a stack and maybe push register/s. I am guessing ofcourse. |
| ||
Great tutorials, I'm really learning alot from it allready. I love the look of the website too. I'm eagerly waiting for the next chapter. :) ps. One small bug (I think), on the main page, whatever chapter I click it will allways bring me to chapter 1. |
| ||
Hi everyone and thank you very much for your interest. I have hopefully fixed the quirks on the website. Jesse, you are right, both instructions are perfect. I hope you enjoy the rest of the tutorial, parts 5 and 6 and online now! My work here is done. |
| ||
great remz. Thank you for such a great work. I have learned a lot from it. |
| ||
Brilliant! |
| ||
Remz, Great stuff mate! very informative!! so, how about pacman?? |
| ||
remz: check your tutorial text, at a few points it talks about $1ffff, $3ffff etc. and one certain 'f' in these numbers should go. :P |
| ||
@Remz: Can I suggest you post a new topic in the BlitzMax Tutorials section as I thought these tutorials were really well-written and certainly very interesting! :D |
| ||
CS_TBL: oops thanks, just fixed that! SebHoll: sure, great idea: I posted a new tutorial. I might also post a screenshot of the finished game running, on Blitz gallery. |
| ||
one of the coolest thing I've read. Thank you! |