6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Oct 05, 2024 9:57 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Koei NES bytecode
PostPosted: Wed May 17, 2017 1:31 am 
Offline

Joined: Mon May 30, 2016 12:08 am
Posts: 7
On the NESDEV forum, I've just finished a multi-part technical description based on my reverse engineering of a bytecode interpreter (effectively a virtual CPU) used by the NES ports of Koei's classic strategy simulation games--Nobunaga's Ambition, Genghis Khan, Bandit Kings of Ancient China, etc.

Based on the very close correspondence of the virtual CPU's feature set with C (C-style function calling convention, function pointers, switch tables, bitfields) and additional evidence that the games in question were written in C (strings with C-style format specifiers in the ROMs) I'm 100% certain that the bytecode is the output of some C compiler. What I'm curious about is whether that compiler and the interpreter were developed by Koei in-house, or whether they were a third-party product which Koei licensed and which other contemporary software developers may have used as well (whether for games or for other applications)

I would be interested to hear if my description rings a bell to anyone who was programming 6502 machines in C back in the day.


Top
 Profile  
Reply with quote  
 Post subject: Re: Koei NES bytecode
PostPosted: Wed May 17, 2017 6:28 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10949
Location: England
An interesting finding and a good question! I'm afraid I can't help, but please let us know if you find information elsewhere.


Top
 Profile  
Reply with quote  
 Post subject: Re: Koei NES bytecode
PostPosted: Wed May 17, 2017 6:31 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
That's really clever. I like the way that it can freely intermix native calls and interpreted calls.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: