Dolphin, the GameCube and Wii emulator - Forums

Full Version: How do I apply my [limited] Python knowledge to the emulation scene?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Currently I am just finishing up my first programming course which was centered around Python. Although it was just an express course I loved it, but I wish I could apply it to the emulation scene. I am planning on starting to learn C# or C++ next, but I may just move my courses around so I can start earlier, but that shouldn't get in my way of learning online though. I guess for now I am going to try and emulate a Chip 8 Machine first. As advised by my Hypervisor, NaturalViolence I'm going to avoid using tutorials on how to make one, and try to do it from scratch so that I am not just copying off of someone else.

I figured I would make a thread here as I haven't been in ages, and maybe it could generate some discussion. Also I am sorry to hear about the death of RachelB she was a nice moderator around, and I enjoyed seeing her post in the past. It's sad that her life ended so short.
Why would you avoid tutorials? If you have no idea what emulation involves, how are you going to start from scratch? If things like "program counter", "CPU registers", "conditional flags", and "fetch-decode-execute" mean diddly squat to you, how are you going to jump right in? You can read all the documentation you want about a game console, but if you have no clue about the concepts behind emulation, I don't think you'll be getting very far.

A good tutorial explains to the reader "Hey, this is what it means to emulate a CPU," in general terms. They may also delve into a section that reads "This is how I would do it." Yes, you shouldn't freely copy code left and right with reckless abandon if you don't understand what that code does. But when you're beginning and you need guidance, it's a very good idea to look at other people's code. The key here is comprehension. Look at the code to say "Oh, so that's what it means when you pop values from the stack!" The code is there to show you how its done, but you should also be looking at it to better understand why it's being done. There's a difference between going in blindfolded and blindly copy+pasting random code.

Trust me, I started on Imran Nazar's GB tutorials, and that gave me the experience I needed to tackle other systems without any hand-holding. I basically jumped into GBA emulation with only GBATEK as a reference. I've only looked at VBA-M to verify some of my HLE BIOS calls (although I did recently copy their sine look-up table, clean it up, gave it some comments, and got rid of redundant type-casting).

So yes, I would start with CHIP-8 if you have absolutely no understanding on emulation, or just a little. That's something you could easily do with Python, and as long as you can draw pixels (nothing fancy, just black and white) graphics should be easy to implement. Sound is just a beep, which shouldn't be hard either. I'm going to leave this here for you. Yes, it's a tutorial, but as long as you read it to understand what CHIP-8 games are how someone needs to go about emulating them, you'll learn plenty about emulation -> http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/
On second thought I think you're right too. I guess I could follow the tutorial, and make sure to comment on stuff so I can look back, and recall what it is doing so I'm not just copying/pasting random code.

On an unrelated note I remember talking to you about your [at the time] GB emulator via PM. It seems like you've moved up to GBA, but that's to be expected since that last I talked to you was in late 2013. Also are you on Steam?

Shonumi Wrote:So yes, I would start with CHIP-8 if you have absolutely no understanding on emulation, or just a little. That's something you could easily do with Python, and as long as you can draw pixels (nothing fancy, just black and white) graphics should be easy to implement. Sound is just a beep, which shouldn't be hard either. I'm going to leave this here for you. Yes, it's a tutorial, but as long as you read it to understand what CHIP-8 games are how someone needs to go about emulating them, you'll learn plenty about emulation -> http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/

Again I only took an express course, but I should be able to find what I need if I hit a rock. I did find that the first time around, but I decided to go with scratch. However, thinking about it it actually would make more sense to try to follow a guide while understanding instead of just going into a dark bit with a match.
Nah, I'm not on Steam (lol, like I have time for games anymore...) I have an adult life now. I do adult things, like work and work some more.

I'm pretty much on a mission to emulate the the GB, GBC, GBA, and DS, so yeah, I've moved on. I skipped CHIP-8 and went straight into the GB, but I'm sure I can lend a hand too if need be. Good luck Smile
(04-30-2015, 01:23 PM)Shonumi Wrote: [ -> ]Nah, I'm not on Steam (lol, like I have time for games anymore...) I have an adult life now. I do adult things, like work and work some more.
Can I be an adult too? It's weird I've been applying for jobs, got 3 interviews (never heard back sadly), but still fishing around for one. I keep telling myself I am an adult, but sometimes I feel like I'm sort of faking it until I make it. On a less serious note I do still play some TF2 on nights when I have time, and weekends if I'm not out, but mostly I use Steam as more of a messenger of sorts nowadays. Going back to the whole adult thing... in December we got rid of a really shitty roommate, and I felt like at 20 I needed to do something with myself other than play games, and watch anime so I'm currently pursuing an AS in Computer Programming and Analysis, and down the road a BS in Computer Science.

(04-30-2015, 01:23 PM)Shonumi Wrote: [ -> ]I'm pretty much on a mission to emulate the the GB, GBC, GBA, and DS, so yeah, I've moved on. I skipped CHIP-8 and went straight into the GB, but I'm sure I can lend a hand too if need be. Good luck Smile
I'll see how well I do with Chip-8 first, and see how I comprehend it first. I kind of want to get a better handle on Python before I start learning C#, or C++ first though. Thanks for the offer I will take it up if need be. I asked about Steam, because it is a bit more convenient for messaging than the forum is.
Yeah, seriously, follow the multigesture tutorial. Just don't copy the code verbatim. Really try to understand it.
The way I went at it was to port it to a language I knew well. I'd look at his tutorial code and try to understand it.
Then write it in a language I knew, specifically once that was different enough for me to have to figure stuff out myself.
Python should be different enough, but I haven't touched it in over a year so I don't know.

Also, it will really teach you a lot about how hex and binary operations work, how programs are structured on the low level, it
will teach you a little about the stack data structure.

Also once you've succesfully written one using the tutorial, delete it(you don't have too). Then try to write one with nothing but Cowgod's chip8 manual as a guide.
Being an adult is for LOSERS

OLD LOSERS
Scootaloo -> College kid (20)
garrlker -> College kid (20-something??)
NKF98 -> Teenager! (18)
...
Shonumi -> Old timer (26) :/

Anyway, I idle on #dolphin-dev on IRC. You can usually message me around 10 P.M. to 2 A.M. CST (yeah I don't go to bed until real late...)
He acts more like a 14 y.o. than 18.
well, what did I do to rub you the wrong way? I guess I'd better grow up soon, probably going to the military in a little while
Pages: 1 2 3