Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
Hi everyone,
since C is driving me crazy and I don't like to write large programs in assembler, I'm thinking about writing an own language just for gameboy development.
For now I'm planning a mixup of go, c and a little bit pascal. It should provide "inline assembler" so that you could write some parts of a function in assembler or even the whole function body. I'm also planning a easy way to decide if a function call should be inlined while compiling or be "called" (it can be set either on invocation of the function or within the signature)
Please tell me what you guys think and if any of you has an idea for a great feature let me know.
Offline
Do Visual Basic .Net
Offline
Great minds think alike
I've been working on my own assembler in my free time and hope to eventually make a new Gameboy-focused language (+ compiler and IDE)
I'm looking forward to seeing what you come up with!
Offline
Since I started with Lexer / Parser (and currently working on some AST reduction) I can share what I currently plan. The source should look like this:
type Pos word; // declare Pos to be 16 unsigned int type Point struct { X Pos; Y Pos; } type Player struct { Position Point; Health byte; } func _add(x byte; y byte) byte { // the underscore set "add" to always inline if possible return x + y } func _haltNop() { asm { // Inline Assembler halt nop } } func moveRight(pt *Point) { pt.X += add(7, 0x03); } var player Player; program { while true { _moveRight(@player.Position); // the underscore set "moveRight" to be inlined haltNop(); } }
Offline