Homebrew Learning C/C++ but i need someone

  • Thread starter Thread starter Dontwait00
  • Start date Start date
  • Views Views 1,640
  • Replies Replies 14
  • Likes Likes 1

Dontwait00

Unknown
Member
Joined
Sep 3, 2017
Messages
272
Reaction score
81
Trophies
0
Age
33
XP
746
Country
Italy
Hey guys

So latelly im putting my effort and my free time to learn C/C++ but i would like to do something for the Wii. Like a simple game.

But im more intrested in emulation, but the problem is that i dont know where to start.
I know someone who have managed to port open source emus, like Moupen64 ( for the xbox 360 ) that was a port of Wii64 that was itself a port of Moupen64 on PC.

I would appreciate somebody who can guide me where to start something simple like a Gameboy emu or a port of DOOM.

Thanks anyway!
 
  • Like
Reactions: kaisersozeh
Hey guys

So latelly im putting my effort and my free time to learn C/C++ but i would like to do something for the Wii. Like a simple game.

But im more intrested in emulation, but the problem is that i dont know where to start.
I know someone who have managed to port open source emus, like Moupen64 ( for the xbox 360 ) that was a port of Wii64 that was itself a port of Moupen64 on PC.

I would appreciate somebody who can guide me where to start something simple like a Gameboy emu or a port of DOOM.

Thanks anyway!
Emulation is about the hardest thing you could possibly attempt. Even emulating a generation 1 pong system is going to be way beyond the skills of anybody but very experienced C/C++ developers. I myself have 5ish years of experience (mostly with C but a little C++) and I wouldn't know where to begin with such a task.

A port of doom is something more reasonable in the sense that I reckon, with a bit of help from a more senior developer, I might be able to port an existing version using devkitpro. However, it'd take a really really long time to finish.

If your learning, I would suggest creating a text-based game. Like Naughts-and-crosses, battleships or connect-4. You can probably find some open-source code to help if you get stuck.
 
Last edited by AdamFX990,
You could perhaps manage a very bad port, if the code was compatible enough and you knew some C. But I think you won't learn much from that, actually you may end up learning bad habits. I recommend against it.
Don't start by porting an Emu or Doom. Do your own things, and a simple thing at that.
The suggestion in the post above is spot on.
 
  • Like
Reactions: AdamFX990
Emulation is about the hardest thing you could possibly attempt. Even emulating a generation 1 pong system is going to be way beyond the skills of anybody but very experienced C/C++ developers. I myself have 5ish years of experience (mostly with C but a little C++) and I wouldn't know where to begin with such a task.

A port of doom is something more reasonable in the sense that I reckon, with a bit of help from a more senior developer, I might be able to port an existing version using devkitpro. However, it'd take a really really long time to finish.

If your learning, I would suggest creating a text-based game. Like Naughts-and-crosses, battleships or connect-4. You can probably find some open-source code to help if you get stuck.
Emmm...

Okk? I suppose... In the sense that i dont mind how difficult is creating emulation, but nevermind. I will go on creating something like a ship on space. Well, thanks anyway! Thats how start everything, right?
 
  • Like
Reactions: AdamFX990
Emmm...

Okk? I suppose... In the sense that i dont mind how difficult is creating emulation, but nevermind. I will go on creating something like a ship on space. Well, thanks anyway! Thats how start everything, right?
Whatever you do, be sure to learn good habits.
Otherwise you will get unmaintainable, unreadable code that happens to work now, but will be a pain in the ass later.
And the worst part, you yourself as a programmer will carry on with those bad habits for a long time, it's hard to let bad habits go, so better learn the good ones from the get go, starting from the foundations, step by step, reading good literature, and (if possible) taking classes. On line classes might do, as long as they are good ones. But I guess it may be easier/cheaper to buy or download some good book.
 
I would start by experimenting with something that already exists and is working, like learn how to compile one of the loaders then try adding something new to it. I'm not sure about CFG or WiiFlow but USB Loader GX compiles with the current devkitPPC and only requires a few external libraries.
 
I have allready a pdf book for noobies in my tablet. And thats okk, and i look on codemii.com for learning the bases for like using textures and use xml files.. Well, there is some tutorials site?
 
If you're not familiar with C/C++ starting something from scratch is probably not the way to go. You'll have to learn the language and how to work within the restrictions of a game console. There isn't any quick and easy tutorial to get you to the point of writing homebrew Wii games. It's going to take quite a bit of work.
 
If you are going to use C++ I would suggest reading a book like "Accelerated C++", and programming on a PC targeting a PC, and running all on a PC. Better yet using an easy preconfigured chain like that coming with Qt+QtCreator or Visual Studio.

Follow the examples on that book to create the simplest text based programs and get used to the STL. I know YMMV, but I think that book is a good starting point for a beginner. Then move into harder topics.

Unless you have previous programming experience.
 
I understood how emulators are internally working by reading this site. http://emulator101.com/

After I played with Arduino and read the emulator101.com blogs, I was able to write my own assembler, disassembler and emulator based on my own knowledge.

The technique explained in the blog will work for older consoles such as NES, Genesis but do not expect to use the technique for a PS3 emulator for exemple.

You really need to understand how CPU are working and how it's handle the data.

You do not need to know how to write code in assembly but you need to understand how assembly work.

You really need to understand how the hardware renders things. As example, how you would display the image into the screen ? Well, the image is located in the '(v)RAM' at a specific location.

If you want to states that a button was pressed, you could either emulate a send to the CPU IRQ with the proper command or you could do it by modifying the ram value directly.


Anyway, have fun.
 
  • Like
Reactions: lucks
If you are going to use C++ I would suggest reading a book like "Accelerated C++", and programming on a PC targeting a PC, and running all on a PC. Better yet using an easy preconfigured chain like that coming with Qt+QtCreator or Visual Studio.

Follow the examples on that book to create the simplest text based programs and get used to the STL. I know YMMV, but I think that book is a good starting point for a beginner. Then move into harder topics.

Unless you have previous programming experience.
Im not very good on C++, because its a horrible language (personally).
Plus, i tryed to learn js, but really, its useless if you dont work on web pages. But i develop on html5, and i know how works languages.
I understood how emulators are internally working by reading this site. http://emulator101.com/

After I played with Arduino and read the emulator101.com blogs, I was able to write my own assembler, disassembler and emulator based on my own knowledge.

The technique explained in the blog will work for older consoles such as NES, Genesis but do not expect to use the technique for a PS3 emulator for exemple.

You really need to understand how CPU are working and how it's handle the data.

You do not need to know how to write code in assembly but you need to understand how assembly work.

You really need to understand how the hardware renders things. As example, how you would display the image into the screen ? Well, the image is located in the '(v)RAM' at a specific location.

If you want to states that a button was pressed, you could either emulate a send to the CPU IRQ with the proper command or you could do it by modifying the ram value directly.


Anyway, have fun.
Thats a nice way to start, thanks! Well, i think i need before some knowledge on C to start communicating on Assembler! ;) thanks anyway, i will use this site! And thanks to @sarkwalvein for helping me too! And i didnt forget you @AdamFX990 and @GreyWolf!!

Cheers :]
 
If you have previous coding experience, C++ is not hard to learn. Install CodeBlock and follow http://www.learncpp.com/ - http://cplusplus.com/ - https://www.tutorialspoint.com/cplusplus/index.htm

Understand something, writing code is not difficult at all. The challenge is figuring out how you implement a solution.

If you never programmed before, you can still start with C++ but as funny it sound, PHP can be a good starter to learn coding since the syntax is similar to C++. Could be bun to learn while processing data in PHP and creating web pages.
Python is great and easy to learn and you could probably write an emulator with it. However, no idea how well it would run since it is an interpreted scripting language.
 
I'm not sure if this is what you're looking for - this thread has thrown up some great stuff! - but if you're looking for somewhere smaller to start, I have a suggestion.
There is a gba emulator of a texas instruments calculator - the TI-89 series? I'd have to check - I got onto it because theres a wii homebrew that is lifted from code written for this calculator - really simple but playable game called asprin - it needs polishing but it's great fun.
Anyhow, there is a shedload of homebrew written for this calculator - a wii emulator could open a whole library of stuff to explore. Old homebrew scenes can become quite well curated too..... Lo fi, but potentially a rich seam of content of games and apps. Apparently quite simple to code for too, the calculator, so that's an interesting plus.
EDIT:
It's the TI-89 calculator
http://wiibrew.org/wiki/Aspirin
That homebrew is legendary!
Also, as there's an emu already in existence for the gba, that could provide a useful model, perhaps.
And I remembered this
http://www.codemii.com/category/wii-programming-tutorials/
 
Last edited by kaisersozeh,
  • Like
Reactions: kaisersozeh
I'd like to give another emulator tutorial, though I didn't follow it myself so I don't know how good or easy it is.
http://www.multigesture.net/articles/how-to-write-an-emulator-chip-8-interpreter/

it seems emu101 also has a chip8 part, so maybe it's complementary, or maybe it will have a different approach.

Very interesting. I'll give it a try since this one is not time consuming. 35 opcodes only, no additional chips. That give you time to focus on other functionalities such as ram viewer/editor and save state since I have little time for personal project.

Thanks Cyan
 
  • Like
Reactions: kaisersozeh

Site & Scene News

Popular threads in this forum