Page 1 of 1
Does any sort of (user) OS or native assembler exist for MD?
Posted: Thu Mar 03, 2011 1:14 pm
by colonthree
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

Posted: Thu Mar 03, 2011 4:23 pm
by TmEE co.(TM)
I test on emu + real HW. If it does not work on HW i'll start deaking with idle loops and debug info displaying.
Re: Does any sort of (user) OS or native assembler exist for
Posted: Thu Mar 03, 2011 6:52 pm
by Stef
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 !
Posted: Fri Mar 04, 2011 11:49 am
by GManiac
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.
Posted: Fri Mar 04, 2011 7:38 pm
by colonthree
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?
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!

Posted: Wed Mar 09, 2011 8:01 pm
by plee
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?
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!

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.
Posted: Thu Mar 10, 2011 11:07 pm
by powerofrecall
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.