Does any sort of (user) OS or native assembler exist for MD?

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
colonthree
Interested
Posts: 18
Joined: Fri Aug 07, 2009 4:07 am

Does any sort of (user) OS or native assembler exist for MD?

Post by colonthree » Thu Mar 03, 2011 1:14 pm

I probably would have already found this by now if it did, but just incase, does anything like this exist?

I'm looking for some kind of tool to quickly edit and run code on the MD itself to save me having to rewrite ROM file to SD (Everdrive) for the sake of a couple of bytes edit. As I'm still new to this I'm running into lots of little issues and don't know the best way to go about debugging. What debugging methods are used by yourselves for H/W? Or do you just use emu's and hope it works on h/w? :s

If it doesn't exist I might have a go at writing a little something for my needs, to help with actual dev. Something which will take asm appended to ROM (or disassemble appended ROM, probably best) and allow editing for quick small changes to be tested on-the-fly.
Although I'm aware there would limitations since I'd need to share resources between the assembler and actual code, and I think edited code would really have to be assembled to run from RAM, is it feasible? (if it doesn't already exist)

Might be a stupid question/idea, maybe not?

Thanks :)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Mar 03, 2011 4:23 pm

I test on emu + real HW. If it does not work on HW i'll start deaking with idle loops and debug info displaying.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Does any sort of (user) OS or native assembler exist for

Post by Stef » Thu Mar 03, 2011 6:52 pm

colonthree wrote:I probably would have already found this by now if it did, but just incase, does anything like this exist?

I'm looking for some kind of tool to quickly edit and run code on the MD itself to save me having to rewrite ROM file to SD (Everdrive) for the sake of a couple of bytes edit. As I'm still new to this I'm running into lots of little issues and don't know the best way to go about debugging. What debugging methods are used by yourselves for H/W? Or do you just use emu's and hope it works on h/w? :s

If it doesn't exist I might have a go at writing a little something for my needs, to help with actual dev. Something which will take asm appended to ROM (or disassemble appended ROM, probably best) and allow editing for quick small changes to be tested on-the-fly.
Although I'm aware there would limitations since I'd need to share resources between the assembler and actual code, and I think edited code would really have to be assembled to run from RAM, is it feasible? (if it doesn't already exist)

Might be a stupid question/idea, maybe not?

Thanks :)
Are you going to edit your code with... a gamepad ??
Anyway i'm not sure that native assembler exist for genesis. The hardware is really too limited to have that sort of tools. No bitmap mode, pity resolution, no keyboard... well that would not be fun at all !

GManiac
Very interested
Posts: 92
Joined: Thu Jan 29, 2009 2:05 am
Location: Russia

Post by GManiac » Fri Mar 04, 2011 11:49 am

I used PC + MD + cable. MD starts "loader" in ROM, which is awaiting for commands from PC. It loads my prog from PC to RAM and jumps to it. 64k of RAM was enough to my needs.

colonthree
Interested
Posts: 18
Joined: Fri Aug 07, 2009 4:07 am

Post by colonthree » Fri Mar 04, 2011 7:38 pm

TmEE co.(TM) wrote:I test on emu + real HW. If it does not work on HW i'll start deaking with idle loops and debug info displaying.
Hmm, do you include debugging code in the ROM or use the debug features of an emu? or both?
Stef wrote:Are you going to edit your code with... a gamepad ??
Anyway i'm not sure that native assembler exist for genesis. The hardware is really too limited to have that sort of tools. No bitmap mode, pity resolution, no keyboard... well that would not be fun at all !
Well I took some of these points into consideration, thinking I could maybe use lookup tables for instructions (not manually typing out letters, prevents misspelling too!), data wouldn't take long to manipulate either (hold a+up to inc by 0x01, b+up to inc by 0x10 maybe?). Why would I need bitmap support? To display VRAM contents, etc? I didn't actually consider that - I was literally thinking just have a notepad style view used to update a section of code, then test execution. I wouldn't be writing whole programs from scratch, just modifying parts of existing code quickly.

Does it still sound infeasible? I don't know :)

edit: actually I hope to make a PS/2-to-DB9 adapter to use qwerty keyboard with the MD at some point in the future, I haven't done nearly enough research about it yet though... I've done so with the original gameboy using the EXT port and cutting up a game cable, does the MD have 5v out through DB-9? What about the expansion port thing on the side?
Also, was there not an official keyboard produced for MD or did I just dream that? :roll:

GManiac wrote:I used PC + MD + cable. MD starts "loader" in ROM, which is awaiting for commands from PC. It loads my prog from PC to RAM and jumps to it. 64k of RAM was enough to my needs.
Ah, I completely forgot about this approach! I think krikzz produced a pcb/adapter to do this using the controller port, correct?
That is probably going to be the best method for me actually. I'll mostly be making use of it to test small ideas <64K to implement in larger programs anyway, so that should be fine.

Thanks for the input guys! :P

plee
Very interested
Posts: 66
Joined: Wed Nov 29, 2006 11:32 am
Location: Houston, Texas

Post by plee » Wed Mar 09, 2011 8:01 pm

colonthree wrote:
TmEE co.(TM) wrote:I test on emu + real HW. If it does not work on HW i'll start deaking with idle loops and debug info displaying.
Hmm, do you include debugging code in the ROM or use the debug features of an emu? or both?
Stef wrote:Are you going to edit your code with... a gamepad ??
Anyway i'm not sure that native assembler exist for genesis. The hardware is really too limited to have that sort of tools. No bitmap mode, pity resolution, no keyboard... well that would not be fun at all !
Well I took some of these points into consideration, thinking I could maybe use lookup tables for instructions (not manually typing out letters, prevents misspelling too!), data wouldn't take long to manipulate either (hold a+up to inc by 0x01, b+up to inc by 0x10 maybe?). Why would I need bitmap support? To display VRAM contents, etc? I didn't actually consider that - I was literally thinking just have a notepad style view used to update a section of code, then test execution. I wouldn't be writing whole programs from scratch, just modifying parts of existing code quickly.

Does it still sound infeasible? I don't know :)

edit: actually I hope to make a PS/2-to-DB9 adapter to use qwerty keyboard with the MD at some point in the future, I haven't done nearly enough research about it yet though... I've done so with the original gameboy using the EXT port and cutting up a game cable, does the MD have 5v out through DB-9? What about the expansion port thing on the side?
Also, was there not an official keyboard produced for MD or did I just dream that? :roll:

GManiac wrote:I used PC + MD + cable. MD starts "loader" in ROM, which is awaiting for commands from PC. It loads my prog from PC to RAM and jumps to it. 64k of RAM was enough to my needs.
Ah, I completely forgot about this approach! I think krikzz produced a pcb/adapter to do this using the controller port, correct?
That is probably going to be the best method for me actually. I'll mostly be making use of it to test small ideas <64K to implement in larger programs anyway, so that should be fine.

Thanks for the input guys! :P
Unless you have a hardware to do debugging at that level (which some of us have) the PC and emu is probably the best way for now. Once "debugged" then you can try it on your target/real system.

powerofrecall
Very interested
Posts: 237
Joined: Fri Apr 17, 2009 7:35 pm
Location: USA

Post by powerofrecall » Thu Mar 10, 2011 11:07 pm

It would be really cool to have a cartridge with a native assembler/environment on it. I don't know a damn thing about hardware other than how it relates to software, but would it be possible through cartridge hardware to provide such capability? On-cart RAM, for one...

That said, even if the thing was perfectly functional, it'd have to have some kind of mass storage to store stuff, maybe a built in graphics editor, probably some kind of file system to store it all.

What would be even better would be something that was like developers actually used in the days of MD, a cartridge that could interface to a PC. Something that could hook up via parallel port, serial, or USB, and PC-side software to utilize it. Imagine having a tracker, or a PCM sound editor, or a graphics or map tool that could preview on the MD, from inside the editor, without having to rebuild a binary to flash and run. I'm daydreaming now.

Post Reply