Say a game is made for PS4 and I wanted to port it to the XBone, would I have to write the entire code for the game on the Xbone? Is the goal to just use the PS4 version of the game as a model and crunch out the entire game, one line at a time?
I know Henshin Engine is supposed to come out for PCE, but there may be a DC port. Do they have to write the whole game from scratch?
I have only minimal experience with any coding whatsoever, so please dumb it down, if possible.
It depends.
If you're talking going from one old console to another, porting assembly is sort of a pain, because each CPU architecture operates different. Some logic/code flow may have to be rewritten when moving from 6502 to Z80, and vice versa.
Then, you have to convert your libraries for graphics to talk to the new machine's video chip. and do the same for sound. That can all be a bit annoying. It really depends how well it was written the first time.
Now, if you used C, life is a little less sucky, because you can get away with just compiling for a new CPU type (6502 or z80), and then you just need to make sure your libraries are written right for each machine so the graphics/sound do what you want.
When going from old to new, it depends again.
If the game's mostly assembly, you're going to be rewriting it for Dreamcast. Not that it's a big deal since the dreamcast is way overpowered.
If you left the game in some sort of C state, you can move large chunks of code without changing anything, and again just have to worry about talking to the graphics/sound stuff.
Either way, it's work. It sucks less if you left it in a portable language.