VoxelRifts
VoxelRifts
  • 12
  • 705 072
I made a language for the Nintendo DS
A lot of work and 6 months later, here's my latest project. A Custom compiler for a custom language targeting arm assembly for the Nintendo DS (and DSi). I go through syntax, typechecking and AST lowering in detail in this video.
References:
Calculator Video (For in-depth Lexing and Parsing explanation): czcams.com/video/myZcNjKcVGw/video.html
Cuik Compiler (By Negate): github.com/RealNeGate/Cuik
DS reference (GBATek Mirror, because the original website just doesn't work): mgba-emu.github.io/gbatek/
Other references I used:
Nice NDS assembly tutorial: www.chibialiens.com/arm/nds.php
Function Stack Frames: people.cs.rutgers.edu/~pxk/419/notes/frames.html
Overview of ARM assembly: coranac.com/tonc/text/asm.htm
ARM Addressing Modes: www.labs.cs.uregina.ca/301/ARM-addressing/lecture.html
ARM Instruction CheatSheet: www.chibialiens.com/arm/CheatSheet.pdf
Nintendo DS Architecture: www.copetti.org/writings/consoles/nintendo-ds/
Join the discord! discord.gg/8rtYjQkqDF
#nintendods #compiler #language
zhlédnutí: 8 850

Video

Why are if statements in shaders heavily discouraged?
zhlédnutí 5KPřed 6 měsíci
This video was sponsored by Brilliant To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/VoxelRifts . The first 200 of you will get 20% off Brilliant’s annual premium subscription. If you've done shader programming before, you might've heard people say that you shouldn't use if statements or any other conditional branching statements in shaders. However, it mi...
Restarting my game and finishing an MVP
zhlédnutí 1,8KPřed 8 měsíci
Remember those 2 terribly made devlogs I made last year? yeah me neither. But that game still bugged me, because I genuinely thought (and still think) it is a good idea for a game. So I gave myself 1 week to finish a dumbed-down mvp. (It obviously took a month lol) This video was sponsored by Brilliant To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/VoxelRi...
Making a calculator from scratch - #SoME3
zhlédnutí 29KPřed 10 měsíci
Disclaimer: This video is rather programming heavy at points. You are welcome to skip these parts, but do note you might miss some small detail somewhere. These sections have the "Code:" prefix in the timestamps. Evaluating math expressions is not an easy problem to solve, despite seeming extremely simple. This video is a step by step guide to doing so, taking you through the motivations behind...
Making a Chip-8 Emulator
zhlédnutí 11KPřed rokem
(New Discord server!) My Discord Server: discord.gg/8rtYjQkqDF I made a Chip-8 Emulator/Interpreter from scratch in C and this video showcases a few interesting tidbits from this project. Repository: github.com/PixelRifts/chip8-sim Chip-8 Technical Reference: devernay.free.fr/hacks/chip8/C8TECH10.HTM (You may have noticed the intro animation for "Byte Sized". This is technically the first video...
Compilation, Libraries and the pesky "unresolved external symbol" error
zhlédnutí 5KPřed rokem
Understanding the Compilation Process is very important for anybody trying to get into compiled languages like C, C , Rust, etc. This is a video highlighting how this process works. We start by going over the linker, symbols and object files, and using this as context for understanding different types of libraries: Static and Dynamic. Discord: discord.gg/8rtYjQkqDF Relevant Links: Just google i...
Arenas, strings and Scuffed Templates in C
zhlédnutí 78KPřed rokem
A video made to highlight some strategies and tips for making using C easier Discord: discord.gg/8rtYjQkqDF Relevant Links: Arenas: www.rfleury.com/p/untangling-lifetimes-the-arena-allocator www.gingerbill.org/article/2019/02/08/memory-allocation-strategies-002/ Base Layer Series: www.youtube.com/@Mr4thProgramming My Data Structure Implementations: (Completely standalone if you remove the stabl...
My 2 Year Journey of Learning C, in 9 minutes
zhlédnutí 553KPřed rokem
This is a short video about my journey from not understanding C in the least to being able to make a relatively large codebase. Discord: discord.gg/8rtYjQkqDF Links to Projects/Resources mentioned in the video: Crafting Interpreters craftinginterpreters.com/ My Custom Programming Language Transpiler (Rift) - V1 branch: github.com/PixelRifts/Rift/tree/v1 Tool Installer: github.com/Indie-Toolbox/...
A Quick, Easy and Extendable OpenGL Renderer in 250 LOC!
zhlédnutí 7KPřed rokem
A Video Guide to writing an easy to build, use and extend Rendering API in OpenGL. Pretty much perfect for small scale games! I'm using C, but there's pretty much 0 C-specific stuff here. You are welcome to follow along in any language. (You may need to pause at times. SORRY! I'm still new to youtube!) Discord: discord.gg/8rtYjQkqDF Links: For the Full Code written in this video, check src/rend...
A Basic Guide to Debugging OpenGL
zhlédnutí 3,7KPřed rokem
Debugging OpenGL is hard. This video outlines a few methods and tips for Debugging OpenGL. We start with The Debug Context, RenderDoc, and then some general tips for some common cases. Discord: discord.gg/8rtYjQkqDF Links: www.khronos.org/opengl/wiki/Debug_Output renderdoc.org/ Music: It Came Upon a Midnight Clear by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. cr...
Debug Rendering, Collisions and the Map --- Arena Battler / Roguelike Devlog 2
zhlédnutí 917Před rokem
Devlog 2 for the "Arena Battler / Roguelike Game based on Gems" I implement Debug Rendering, Collisions, and Entity system and a custom Map Generation algorithm #devlog #roguelike #mapgen
Planning, Rendering and Easing --- Arena Battler/ Roguelike Devlog 1
zhlédnutí 1,9KPřed rokem
Devlog 1 for an "Arena Battler / Roguelike Game based on Gems" I start planning out the ideas for this game, implement rendering and talk about easing functions #devlog #roguelike #easing

Komentáře

  • @mauvilegaming5118
    @mauvilegaming5118 Před dnem

    man..I'm auto subscribing

  • @boyudai1550
    @boyudai1550 Před dnem

    I think you just reinvented objec? 😂 If you put fucntion and data pointer in arena.dealocating would be object.destory() , routine for allocating it is creator ?

  • @king_james_official

    hey i love the video but i just have to say that the thumbnail sucks ass and it's probably what made the video simmer in my watch later playlist for two weeks

  • @MattKasdorf
    @MattKasdorf Před 6 dny

    21:00 Shout out to ChibiAkumas!

  • @MattKasdorf
    @MattKasdorf Před 6 dny

    Really nice! Was wondering if you could apply this new language to your Making a Chip-8 Emulator?

    • @voxelrifts
      @voxelrifts Před 3 dny

      Probably could! Would require a lot of figuring out though. Like the mapping of 16 inputs to 12 dsi inputs and figuring out sound without turning myself deaf first

    • @MattKasdorf
      @MattKasdorf Před 2 dny

      @@voxelrifts Actually I meant using your new language to write programs that would work on a Chip-8 Emulator. Not to write a Chip-8 Emulator for the DSI, although that would be cool too; you could use the bottom screen as input.

    • @voxelrifts
      @voxelrifts Před 2 dny

      @@MattKasdorf ah you're talking about a chip8 backend for the compiler. Yeah that'd be very different from the DS

  • @Pabloparsil
    @Pabloparsil Před 8 dny

    One metaprogramming option that I'm exploring is using python to generate the C code, and add that C code as a target to a makefile (so that every time I modify the python script, the C files get regenerated). Another option would be to use SCons as a build system, since it's already Python code it would integrate more seamlessly

  • @omaralraisi1143
    @omaralraisi1143 Před 9 dny

    We want your language's OS decorator to come to C

  • @WhyBookam
    @WhyBookam Před 10 dny

    What’s that vscode theme?

  • @kolemannix8256
    @kolemannix8256 Před 12 dny

    Fantastic video! Great work

  • @Thobewill10
    @Thobewill10 Před 14 dny

    Really nice video with clear explanations of the key algorithms. Great work!

  • @oglothenerd
    @oglothenerd Před 19 dny

    You 100% earned by subscription! I love this kind of content! :D

  • @PixelThorn
    @PixelThorn Před 19 dny

    Leave it to a C programmer to reinvent what's already implemented and solved in C++

  • @HarzhMehta
    @HarzhMehta Před 19 dny

    nice animations

  • @TimDrogin
    @TimDrogin Před 22 dny

    I followed your math parser tutorial, couldn’t make in c, ended up doing it in c++. Can’t say that the other video was bad - it gave me inspiration and motivation to find my way. This video is not different, but I really enjoyed the quality of it. I was able to follow it no problems. Great stuff you are doing.

  • @sapiosuicide1552
    @sapiosuicide1552 Před 22 dny

    Thanks for this!

  • @sapiosuicide1552
    @sapiosuicide1552 Před 22 dny

    Awesome

  • @sapiosuicide1552
    @sapiosuicide1552 Před 23 dny

    Amazing video

  • @RetroJack
    @RetroJack Před 24 dny

    Love your style - subbed!

  • @user-ot7pt9wf9d
    @user-ot7pt9wf9d Před 25 dny

    My C++ learning was stagnant. In order to learn C/C++ in depth, I turned to learning Rust. Now after watching your video, I found that these best practices are used by default in Rust community. I think This is the benefit of learning a modern language

    • @logicaestrex2278
      @logicaestrex2278 Před 16 dny

      Rust is an entire language where a linter wouldve been sufficient lol

  • @dimi144
    @dimi144 Před 25 dny

    You should keep in mind that different types in C have different alignments when allocating memory, and that even though your code will work with or without taking alignment into account, misaligned memory accesses can degrade performance. Awesome video tho

  • @airbus5717
    @airbus5717 Před 25 dny

    whhat do you use to make your videos?

  • @costelinha1867
    @costelinha1867 Před 25 dny

    And to think all I ever did was a Snake game in C for the DS... imagine being able to use something other than c or c++ for the DS...

  • @EpicNicks
    @EpicNicks Před 25 dny

    Incredibly cool stuff. Makes me want to take another crack at writing a compiler.

  • @sunnyahmed5935
    @sunnyahmed5935 Před 26 dny

    where you learn this advance hands-on project using C++. would mind to suggest me some playlist or books ?

  • @cscscscss
    @cscscscss Před 26 dny

    cool video! really like the goofy stickman guy

  • @aidennwitz
    @aidennwitz Před 26 dny

    isn't odin's syntax still c-style? not necessarily exactly like c, but still in the same c-like camp as opposed to lisps, array-based languages, stack-based languages, haskell, etc?

  • @Erros
    @Erros Před 26 dny

    Only problem I have with this video is the amount of blur added to almost everything containing letters, whether it be code snippets or the illustrations. Made me think I didn't have my glasses on, but other than that, Good video.

  • @fauxkiwi
    @fauxkiwi Před 26 dny

    This is the video I've been waiting for. Explaining compilers in such depth but in an entertaining way

  • @nitrogenez
    @nitrogenez Před 26 dny

    the same day i start working on a scriptable config language youtube recommends me this video. how convenient, google, how convenient. upd.: forgot to mention that the video is actually incredible, i love when people calmly explain things whilst not making fools of themselves or making me uninterested with a monotone voice.

  • @AbelShields
    @AbelShields Před 26 dny

    Stack machine? Porth??

  • @emilianosenega4564
    @emilianosenega4564 Před 26 dny

    Yesss please do an optimizations video, I'm having such a hard time implementing even simple register allocation and coalescing.

    • @AbelShields
      @AbelShields Před 26 dny

      You can do register allocation with graph colouring, registers are used from when a variable enters scope to when it exits, nodes representing the variables are connected to nodes where the scope overlaps, and each color represents one register

  • @sukus
    @sukus Před 26 dny

    I have been working on a project extremely similar to this over the last year. I'm still stuck in frontend-hell, because I decided I wanted generics right out of the gate. It's really cool to see someone elses take on an obscure project like this! Keep up the great content, you just earned yourself a new sub!

  • @Snailsxd
    @Snailsxd Před 26 dny

    Any particular reason why you didn't use llvm as backend infrastructure?

    • @voxelrifts
      @voxelrifts Před 26 dny

      Building a backend myself was the main reason for the project, the DS thing was just a random thing I decided to target :D

    • @Snailsxd
      @Snailsxd Před 26 dny

      @@voxelrifts fair enough

  • @Parseee
    @Parseee Před 26 dny

    i’ve finished my school “building compiler” project, so watching your video it’s cool seing other people do it better than me. our teacher purposly ignored AST, so we used some kind of RPN, i’m not sure how it’s called in English. also, for globals we used Type Identifier Trees. they’re basically pointer machines, that tracks global variables, functions and other stuff. also, your content made me want to improve my own project. thx for great video!

    • @shadamethyst1258
      @shadamethyst1258 Před 26 dny

      How can one ignore an AST? xD

    • @voxelrifts
      @voxelrifts Před 26 dny

      @@shadamethyst1258 definitely a valid thing to do and probably what I'm going to end up doing as well. Just parsing directly to a graph structure is fairly common

  • @ianmoore5502
    @ianmoore5502 Před 26 dny

    Can i port Temple OS in this

  • @omgboy4939
    @omgboy4939 Před 26 dny

    maybe now you make rocompilation tool from bin to your language?

  • @nevokrien95
    @nevokrien95 Před 26 dny

    This chanel just keeps improving. I would watch a longer video of u made 1😊

  • @irishbruse
    @irishbruse Před 27 dny

    Great video just wish you didnt use bloom on everything it killed the bitrate

  • @arjix8738
    @arjix8738 Před 27 dny

    Great video! I myself have written a few lexers and partial parsers, so I can imagine how hard it must have been!

  • @marcsfeh
    @marcsfeh Před 27 dny

    very nice, Odin/Jai declaration syntax (I know this is much older than these languages) is great, easy to parse and to read, it's a win-win

  • @doce3609
    @doce3609 Před 27 dny

    amazing video. i am excited for the next one

  • @gg1k
    @gg1k Před 27 dny

    Ah interesting. I feel you on the "Let's just turn this AST directly into the output". Currently in the middle of refactoring a compiler to have an optimization step & IR.

  • @bloom945
    @bloom945 Před 27 dny

    Great watch! Keep it up

  • @danielhooper
    @danielhooper Před 28 dny

    The "name : type = value;" syntax was first used in Jonathan Blow's Jai language, and he got the idea from Sean Barrett. Odin copied from Jai.

    • @voxelrifts
      @voxelrifts Před 27 dny

      I thought it came from a much older language actually, I only said odin here so that people can go and try it themselves. Should've mentioned jai too

    • @GingerGames
      @GingerGames Před 27 dny

      It was actually first used in Newsqueak by Rob Pike. Rob Pike beat all of us. Sean Barrett just reinvented it.

    • @voxelrifts
      @voxelrifts Před 27 dny

      @@GingerGames yeah that's what I heard too. I actually had a paragraph in the original script re newsqueak, but it was far too tangential sounding so I cut it out.

  • @krystofjakubek9376
    @krystofjakubek9376 Před 28 dny

    Very nice video! Just wish the code wouldnt get the the bloom filter as it makes it hard to read on smaller screens (phones)

    • @voxelrifts
      @voxelrifts Před 27 dny

      Ah understandable, my bad on that.

    • @krystofjakubek9376
      @krystofjakubek9376 Před 27 dny

      @@voxelrifts btw stoked for the part 2 when it comes! Compiler backeneds are complete black box for me so far. I am sure its gonna be great

  • @sachahjkl
    @sachahjkl Před 28 dny

    I don't say this lightly : one of the best compiler/isa/architecture videos I've ever seen. Congrats man

  • @ferenc_l
    @ferenc_l Před 28 dny

    The production quality is incredible for a small channel. Congrats!

  • @RichardLofty
    @RichardLofty Před 28 dny

    Odin uses similar syntax

  • @juanmacias5922
    @juanmacias5922 Před 28 dny

    Compiler go BRRRRRRRRRR!

  • @MrLuigiBean1
    @MrLuigiBean1 Před 28 dny

    Whoa, this is an incredible amount of work you put into this! Congrats!!