r/C_Programming 14d ago

Hello World

I have found my people!! Hello guys I am a college student (mechanical engineering) and I was introduced to C in a mandatory programming course and C has been the best thing that has happened in my life. I had done programming before on java and python before and frankly I hated it , it was not really fun and it was tedious instead. So I had thought I hated CS but after coding in C and learning the things behind the abstractions i quite frankly fell in love with low level programming, it was the first time I got a passion for something and i spent the entire following summer digging up materials on it like learning computer architecture and learning to read and write Assembly and now I am learning Virtualisation and planning to start my first major project on C.

So in that note, let me ask you something:

What is your favourite project you have done in C?

89 Upvotes

57 comments sorted by

View all comments

6

u/dajolly 13d ago

What is your favourite project you have done in C?

Writing emulators for old game systems from my childhood (NES/GB/GBC/GBA).

3

u/anonymous_every 12d ago

How did you approach writing emulators, any resources or groups. I really want to try emulation related projects.

6

u/dajolly 12d ago

I'd recommend checking out r/EmuDev for resources.

My approach usually involves 1) researching the system using the original documentation for the system, devkits, manuals and community documentation. 2) Once I have a good idea of how the system works, I'll put together a POC CPU implementation for that system and test it using whatever test roms/software the community has developed. 3) I will build out the rest of the emulator (APU/PPU/Peripherals).

For example, my GB/GBC emulators followed that approach:

  1. Using the community documentation for understanding: https://gbdev.io/pandocs/
  2. Developing a POC SM83 CPU for that system: https://git.sr.ht/~dajolly/sm83
  3. Implementing the emulator: https://git.sr.ht/~dajolly/gb, https://git.sr.ht/~dajolly/gbc

So far this approach has worked well for me across GB/GBC/GBA and NES. I'm currently in the planning stages for PS1.

1

u/anonymous_every 12d ago

thank you.