How to change the gdb in DDD

Page 3/3
1 | 2 |

By k0ga

Expert (77)

k0ga's picture

05-10-2011, 09:21

Don't get me wrong, but by cross-compiling I wasn't thinking on MS-DOS until now. But I got your idea. Well, boxer can be handy in this case, I believe.

I use dosemu in linux and a bit of bash magic, so I can use it from bash command line.


How does this megarom support work? Does it makes megarom switching transparent for the programmers, as the code would be running on a CPU with a bigger direct addressing? How does this goes on the C code side?

It has support for different memory model, in the same way that older ms-dos compiler. You can compile your system for small memory model (routines and data in 64K), medium memory model (routines in 64k and address 1MB for data) and huge memory model (1MB for routines and data). It supports some mappers, but of course doesn't support MSX mappers, but it allows to the user define routines for memory switching (I have never tested it).


And what do you use to debug the code?

openmsx. Hitech supports remote symbolic debugging, andof course doesn't support any of the RS232 cartridges for MSX, but code of the monitor is supplied, so if you are very interested you can port it to MSX Tongue.

By k0ga

Expert (77)

k0ga's picture

05-10-2011, 10:48

And what do you think about this news?

Looks very good, I'll test it when it is finished.

By ARTRAG

Enlighted (6862)

ARTRAG's picture

05-10-2011, 20:30


It is said in my previous post. Hitech C (version 7.80 pl2) is a compiler for MS-DOS that it is really good (I think could be better, but is the best that exits actually). You can send a request for a demo to Hitech (it is not free), or also, you can ask for a copy to someone who has it....

Don't get me wrong, but by cross-compiling I wasn't thinking on MS-DOS until now. But I got your idea. Well, boxer can be handy in this case, I believe.

It supports CPM for .com files and can be used easily for megaroms (it just need few lines of asm to support your preferred mapper).

How does this megarom support work? Does it makes megarom switching transparent for the programmers, as the code would be running on a CPU with a bigger direct addressing? How does this goes on the C code side?

And what do you use to debug the code?

Megarom support is transaprent: the linker allocate the functions and the data across the pages at make time. At run time you can call any of function from any other.
There are some limits, as the compiler is conceived for the MMU of the z180. Even providing the code for managing your preferred mapper, you have to live with them.
E.g. data in pages of the mapper can be accessed only by "basenear" functions (i.e. functions than do not get swapped, and by "far" functions (i.e. functions that are allocated in the swapped pages) that stay in the same page of the data.

I did MOAM and VW megorms using HiTech v7.8pl2. Let me know if you need support or info

By Manuel

Ascended (18939)

Manuel's picture

05-10-2011, 22:56

the 'this news' link is dead for me... What did I miss?

By andrear1979

Expert (97)

andrear1979's picture

06-10-2011, 00:11

@Manuel: I think the page can be reached here: go to sourceforge.net/apps/trac/sdcc/wiki, then choose link "Z80 port improvement - Philipp's TODO list".

Just to complete the picture I wish to add:

- my MSX development environment: Windows + Eclipse for C + SDCC + BlueMSX asm debugger
- my personal experience with SDCC bugs: tried it in a small project; I found a bug, reported it on the bug tracker, and after some days they made a correction available
- my opinion on SDCC: not as mature as Hitech, but the basic ideas looks good: open source, runs on several platforms, integrates resonably well in my Eclipse, developers answer to bug reports

By k0ga

Expert (77)

k0ga's picture

06-10-2011, 10:59

Megarom support is transaprent: the linker allocate the functions and the data across the pages at make time. At run time you can call any of function from any other.
There are some limits, as the compiler is conceived for the MMU of the z180. Even providing the code for managing your preferred mapper, you have to live with them.
E.g. data in pages of the mapper can be accessed only by "basenear" functions (i.e. functions than do not get swapped, and by "far" functions (i.e. functions that are allocated in the swapped pages) that stay in the same page of the data.

I did MOAM and VW megorms using HiTech v7.8pl2. Let me know if you need support or info

You can always your switching routine in RAM in the page 3, so, you can access data from other rom pages (you have to jump to the RAM routine, switch to desired rom page, take the value, switch original rom page and return to original point). If you can put RAM in page 0 you can also use a rst for this purpouse. Of course this is really slow, but if you need large data structures is the only one solution (or explicity manage page switching of course).

By ARTRAG

Enlighted (6862)

ARTRAG's picture

06-10-2011, 15:02

Yes, but this is not transparent.
For transaperent support I mean you do not need to write more than 20 lines of asm for mapper support.

By ARTRAG

Enlighted (6862)

ARTRAG's picture

07-10-2011, 13:15

Yes, but this is not transparent.
For transaperent support I mean you do not need to write more than 20 lines of asm for mapper support.

Note that all programs I released come with c sources and .prj file, ready for the 'make' from hpdz. The rom version of maze 3d is a 512k scc megarom

Page 3/3
1 | 2 |