Autor
| Development tools for msx/msx2 platform
|
nikodr msx addict Mensajes: 453 | Publicado: Junio 20 2007, 13:21   |
Hello!I have been trying to learn to write programs for my msx/msx2.
I want to get away from the concept of basic programs and want to move to z80 machine code for speed.I know it is not easy.However i cant find much books or info for msx.
On the other hand for zx spectrum platform that has a z80 i have found tons of pdf books that deal with it,books for the complete beginner as well as for the more experianced programer.
So my question is what programs should i use for my msx?Are there any cross assemblers for pc that could compile code and binaries specificaly for the msx?Could i find the complete libraries and include files for msx?
I am not asking for illegal links or programs to be posted.All i want is to tell me the name of a good monitor/dissasembler and a good assembler.
The other method i could use is to introduce machine code through data statements in basic by poking the memory addresses with the hex data.However this would be difficult for me now.
Also is there a way to port zx spectrum machine code to msx ?I know machines have different memory design but for small programs since the 2 machines have the same processor i think it could be theoritically be done.
Thank you!
Looking forward for some answers
|
|
kabish msx friend Mensajes: 5 | Publicado: Junio 20 2007, 13:53   |
I use asmsx as cross compiler assembler tool, and Textpad with z80 highlights. In a real msx I use compass.
You can download asmsx from karoshi's forum, Textpad from their internet site and z80 plugin from MRC.
Good luck!.
 |
|
Tanni msx addict Mensajes: 302 | Publicado: Junio 20 2007, 15:06   |
If you want to write programs for MSX, but not in BASIC, then I recomment Turbo Pascal. It is very fast and very convenient compared to BASIC. It is possible to have Inline Hex Code with easy access to variables and routines from TP.
Here some links about Turbo Pascal, Assembler and MC-Programming:
www.hansotten.com/
www.tni.nl/products/tniasm.html
map.tni.nl/
On the Hans Otten Page, check out the links to Pascal Compilers and MSX Info Sites. |
|
Huey msx professional Mensajes: 582 | Publicado: Junio 20 2007, 15:34   |
C programming is also an option. I use hi-tech C as a crossdevelopment compiler.
|
|
gargamel msx user Mensajes: 42 | Publicado: Junio 20 2007, 17:13   |
|
|
pitpan msx master Mensajes: 1368 | Publicado: Junio 20 2007, 17:36   |
You forgot to mention the "copyleft" status of all these documents  |
|
norakomi msx professional Mensajes: 861 | Publicado: Junio 21 2007, 10:59   |
nikodr:
hi !!
are you familiar with IRC ?
it's comparable to MSN messenger, but uses channels where people with similar interests come together.
It's worth checking out.
If you feel like it, download mIRC, then connect with the RIZON server,
and visit channel
#MSXDEV
there you find programers that can help you getting started.
the advantage is that you don't have to post a comment here every time you have a question.
And believe me, with the right support it's very easy to learn machine language (assembly)
|
|
nikodr msx addict Mensajes: 453 | Publicado: Junio 21 2007, 12:22   |
Norakomi thank you for this!Of course i am familiar with irc and the channels  .I will connect to the rizon server soon and join the channel you mentioned.I hope to have a good start with the valuable help of the more experianced people there!
Best regards |
|
PingPong msx professional Mensajes: 882 | Publicado: Junio 22 2007, 09:11   |
@nicodr, About porting zx code to z80 code, the main differences are:
gfx- the msx uses a dedicated chip (referred as vdp) to handle display video, the zx uses ula. the main difference is the msx cpu does not have direct access to the videoram because the vram is phisically not connected to the cpu bus. to clarify, if you want to write a byte in a vram location with zx you can do:
ld a,1
ld hl, my addr
ld (hl),a
with msx you must out put to a port the value you need to write.
; code to set the vram address pointer
ld hl, myaddr (MUST BE in A 16KRANGE!)
ld a,l
out(0x99),a
ld a,h
or 0x40
out (0x99),a
;code to write the byte
ld a,1
out (0x98),a
the msx also have the PSG in all models, instead of the zx buzzer, because however the PSG is the same on speccy+ and msx, there is almost no difference, only a matter of address port to write to
|
|
pitpan msx master Mensajes: 1368 | Publicado: Junio 22 2007, 09:22   |
Almost no difference: PSG access, VDP, VRAM, PPI, memory handling, BIOS, etc.
Let's rephrase it: Z80 is the only link between both machines  |
|
PingPong msx professional Mensajes: 882 | Publicado: Junio 22 2007, 12:42   |
I do not agree: there is no much difference when we convert some existing sw from zx. this is proved by the huge number of speccy games converted from zx in less than 1 month in 80's
Sure, if you want to get the max from the machine you need to know more and more detail...  |
|
nikodr msx addict Mensajes: 453 | Publicado: Junio 22 2007, 15:14   |
Spectrum only has 6144 bytes for pixel information, with one byte representing a row of eight pixels, and 768 bytes used for the colour attributes so it means the max video ram accesible to the programmer is in a way only 6912 bytes at at time.
While most msx computers have easily 128kbytes of video ram most of the times.Now converting 6912bytes of screen data to msx is easy.
On the contrary converting msx games to spectrum is not always possible i think because of the mentioned limitation of spectrum.
Is this correct?
|
|
Phantom msx friend Mensajes: 15 | Publicado: Junio 22 2007, 15:52   |
|
|
PingPong msx professional Mensajes: 882 | Publicado: Junio 22 2007, 17:52   |
Quote:
| Spectrum only has 6144 bytes for pixel information, with one byte representing a row of eight pixels, and 768 bytes used for the colour attributes so it means the max video ram accesible to the programmer is in a way only 6912 bytes at at time.
While most msx computers have easily 128kbytes of video ram most of the times.Now converting 6912bytes of screen data to msx is easy.
On the contrary converting msx games to spectrum is not always possible i think because of the mentioned limitation of spectrum.
Is this correct?
|
msx1 have only 16k of vram. For msx2, screen size depend on screen mode...
the most similar mode to zx is screen 2
that has the same color limitations of a spectrum +3, so 2 color per 8x1 pixels
|
|
nikodr msx addict Mensajes: 453 | Publicado: Junio 23 2007, 14:38   |
UPDATE:I have been experimenting with some z80 instructions like ld ,add etc.
My first program was actually a program in the following form.(It feels great for someone who has never used machine code to take his first step to z80 asm.)
1 for t=&hc800 to &hc809 : read a$ : poke t,val("&h"+a$) : next t:defusr=&hc800 : print usr(0)
2 data 3e,f0,47,3e,05,80,32,00,d0,c9
I used WB-ASS2 to create my machine code program,then got the hex output as data and used it in basic (in the data section)
Basically my machine code program is this
ORG &HC800
LD A,&HF0
LD B,A
LD A,&H05
ADD A,B
(RESULT) : EQU &HD000
LD (RESULT),A
RET
So i store a numerical value on A,save the contents of A to B,load another value to A,then i add A and B and store the result on adress &hd000.
If i execute this program then memory address hd000 if i use print peek(&hd000) gives result 245 (&hf0+&h05)
Well i know a crude program but served my purposes of adding 2 numerical values and storing the result in an address.
What i would like to do now is print text on screen using machine code.
Right now i simply go to basic and print peek the addresses that i store the results.
Instead how can i do this without basic?In what address are the bios call to print something on screen? (eg i would like to create a program that would ask me for 2 values,it would do the operations i would want and i would want to print on screen the results).
Thank you!
|
|
|
|
|