It is currently Tue Mar 19, 2019 4:41 pm

All times are UTC - 7 hours

Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Mar 06, 2019 7:11 pm 

Joined: Wed Mar 06, 2019 6:00 pm
Posts: 3
Problem is compiler ABIs. The ABIs optimize the target processor hardware so the code fits that model. Added optimization which mostly end up as jump tables and symbols that may or be used as static placeholders for a given bit range. A decompiler that actually maps data relatively accurate such as IDA seems to be the best way for me to quickly analyze and modify code which will actually work.

I use C because that is "portable assembler". Also C++ takes quite the toll on embedded devices such as the NintendoDS since it goes through a vtable through Name mangled functions that will actually resemble an ABI. That way you are allowed to overload functions or overload operators, or be able to handle the object through C++ standard ABI rather than hardcoding something that isn't portable. For instance the ARM ABI offers a debugging-stack library that allows for hardware exceptions to be caught in a try{} catch{} block. While it doesn't get the speed and bare-metal logic the code has, it actually allows to debug your code from withing your code if something fails. (nothing like supervisor mode of a hardware exception mode can't do, but you get a "map" of your objects rather than just bits that do god knows what (if say, the cpu just corrupted stack data or something like that)

I think someone should just apply a reverse-model the way the hardware vendor API compiler generates assembled code, to actually generate readable code. Problem is optimization removes further sensitive data the HLL has.

Last edited by coto on Sun Mar 10, 2019 9:37 am, edited 1 time in total.

PostPosted: Fri Mar 08, 2019 10:53 am 

Joined: Tue Oct 16, 2018 5:46 am
Posts: 68
Location: Gothenburg, Sweden
tepples wrote:
Just speculating, but another advantage of transpiling assembly language to HLL is that it might help get a proposal for a port of a retro game to a modern console past the console maker's concept approval department. I haven't seen a modern console's devkit or NDA myself, but I imagine some console makers have become more skittish about using an emulator so as not to leave open the possibility of anything like ROM injection on Nintendo's Virtual Console and Popstation on PSP.
I think emulation is already heavily used on consoles for things like digital releases of classic retro games, so that shouldn't be an issue.

This topic might be a bit too advanced for me but it sound like what you are suggesting would be better for when you actually want to add platform specific features or content rather than just having a carbon copy port as if you're playing on an emulator. Or if you want to port the code to a platform that's on an equal level horse power as the source platform.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours

Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB® Forum Software © phpBB Group