Programming the NES with a high level programming language
Moderator: Moderators
Programming the NES with a high level programming language
Hi everyone!
A few years ago, I read a blog from a former developer working at Color Dreams in the late 80s/early 90s. Unfortunately I can't find his website anymore, but I remember he mentioned the fact that they used a custom programming language similar to BASIC to write their games. This seems quite astonishing to me. Writing an NES game in C seems reasonable, but in BASIC? I assume they made simple engine in assembly, while the game logic was written in that other language but I'm not sure.
I'd like to know if other companies also used proprietary languages or other high level languages to make their game?
Thanks!
A few years ago, I read a blog from a former developer working at Color Dreams in the late 80s/early 90s. Unfortunately I can't find his website anymore, but I remember he mentioned the fact that they used a custom programming language similar to BASIC to write their games. This seems quite astonishing to me. Writing an NES game in C seems reasonable, but in BASIC? I assume they made simple engine in assembly, while the game logic was written in that other language but I'm not sure.
I'd like to know if other companies also used proprietary languages or other high level languages to make their game?
Thanks!
Re: Programming the NES with a high level programming language
C is the same as BASIC, with the english keywords replaced by punctuation marks (back then - after the 8bit era - those punctuation marks were considered to be refreshing, cool, funny, and more much innovative than BASIC keywords).
Historically, BASIC was often implemented as Interpreter language. I guess that is what you wanted to say? Which, yes, many games were using Interpreter languages (no matter if they were inspired on BASIC, C, Pascal, Forth, or whatever).
Historically, BASIC was often implemented as Interpreter language. I guess that is what you wanted to say? Which, yes, many games were using Interpreter languages (no matter if they were inspired on BASIC, C, Pascal, Forth, or whatever).
Last edited by nocash on Wed Nov 18, 2020 10:11 am, edited 1 time in total.
Re: Programming the NES with a high level programming language
Family BASIC was probably used for testing or simple prototyping by some developers.
The guys at Game Freak supposedly used it to learn with and possibly made their own tools using the Family BASIC hardware and homemade EPROM cartridges, made from cheap games.
I think some composers like Koji Kondo used Family BASIC's MML a lot to hear how the music sounds directly on the hardware. Others used a computer such as an MSX, which has a somewhat similar sound chip, to compose on.
The guys at Game Freak supposedly used it to learn with and possibly made their own tools using the Family BASIC hardware and homemade EPROM cartridges, made from cheap games.
I think some composers like Koji Kondo used Family BASIC's MML a lot to hear how the music sounds directly on the hardware. Others used a computer such as an MSX, which has a somewhat similar sound chip, to compose on.
Re: Programming the NES with a high level programming language
I wasn't referring to interpreted BASIC, but rather to BASIC code compiled into 6502 assembly code. I can't see the similarity between C and BASIC though.nocash wrote: ↑Wed Nov 18, 2020 8:21 amC is the same as BASIC, with the english keywords replaced by punctuation marks (back then - after the 8bit era - those punctuation marks were considered to be refreshing, cool, funny, and more much innovative than BASIC keywords).
Historically, BASIC was often implemented as Interpreter language. I guess that is what you wanted to say? Which, yes, many games were using Interpreter languages (no matter if they were inspired on BASIC, C, Pascal, Forth, or whatever).
Nice, I didn't know that!Pokun wrote: ↑Wed Nov 18, 2020 10:04 amFamily BASIC was probably used for testing or simple prototyping by some developers.
The guys at Game Freak supposedly used it to learn with and possibly made their own tools using the Family BASIC hardware and homemade EPROM cartridges, made from cheap games.
I think some composers like Koji Kondo used Family BASIC's MML a lot to hear how the music sounds directly on the hardware. Others used a computer such as an MSX, which has a somewhat similar sound chip, to compose on.
Re: Programming the NES with a high level programming language
Many many years ago, I found a compiler for a BASIC-like language. https://en.wikipedia.org/wiki/ASIC_programming_language
A lot - but not all - of BASIC's operations can be mapped tidily to 6502 instructions.
A lot - but not all - of BASIC's operations can be mapped tidily to 6502 instructions.
Re: Programming the NES with a high level programming language
For, if, else, while, return? Or asking the other way around: Can you see any differences between C and BASIC?
Re: Programming the NES with a high level programming language
Old BASIC from the line number era didn't have anything like a C struct. This encouraged developers to use the structure-of-arrays memory paradigm, storing each property of an entity in a separate array indexed by the entity's ID within a pool. You might notice that's exactly the memory layout that 6502 prefers. Nor did old BASIC have automatic local variables. Instead, variables were global, which corresponds well to zero page variables on a 6502, and recursion was poorly supported if at all.
QBasic had TYPE, a direct counterpart to C struct, as well as local variables. This and other QuickBASIC/QBasic concepts made their way into Visual Basic. In fact, Visual Basic version 7 rebooted the language to become C# with different syntax, even though VB6 diehards called VB7 "Visual Fred" for resembling VB6 allegedly less than Python 3 resembles Python 2.
QBasic had TYPE, a direct counterpart to C struct, as well as local variables. This and other QuickBASIC/QBasic concepts made their way into Visual Basic. In fact, Visual Basic version 7 rebooted the language to become C# with different syntax, even though VB6 diehards called VB7 "Visual Fred" for resembling VB6 allegedly less than Python 3 resembles Python 2.
Re: Programming the NES with a high level programming language
Hudson Soft had developed a high level scripting system called iv that was used by a large number of games on their console PC-Engine, especially the CD RPG games which were less speed critical.
I don't know whether this is true, but it is possible that a number of their late Famicom releases also used similar system, as they practically used the same tool chains to develop on the two systems.
(Also, they developed Family Basic.)
I don't know whether this is true, but it is possible that a number of their late Famicom releases also used similar system, as they practically used the same tool chains to develop on the two systems.
(Also, they developed Family Basic.)
-
- Posts: 1014
- Joined: Tue Feb 07, 2017 2:03 am
Re: Programming the NES with a high level programming language
There are lots of high level programming languages from that era. How similar to BASIC depends on "how you define BASIC". COMAL, COBAL, FORTRAN, PASCAL, LISP, FORTH, ADA et cetera
There are even a few modern HLL 6502s which range from "syntax sugar" to "complete language compiler"
The Kemco strategy games used some HLL and a byte code runtime as well. search this forum for details.
Basically in most games you end up making a Scripting language of some form, guess they just took it one step further.
It would be interesting to dissasemble some of their games and see if there is a common runtime of it was fully compiled.
There are even a few modern HLL 6502s which range from "syntax sugar" to "complete language compiler"
The Kemco strategy games used some HLL and a byte code runtime as well. search this forum for details.
Basically in most games you end up making a Scripting language of some form, guess they just took it one step further.
It would be interesting to dissasemble some of their games and see if there is a common runtime of it was fully compiled.
-
- Posts: 1014
- Joined: Tue Feb 07, 2017 2:03 am
Re: Programming the NES with a high level programming language
No Koei not Kemco, thanks. Not sure why I get those two mixed up, vastly different game libraries.