|
| | Hay 45 invitados y 6 miembros en línea
Eres un usuario anónimo.
|
| |
Autor
| I need some Help
| FunkyBoy msx friend Mensajes: 6 | Publicado: Marzo 21 2005, 17:42   | Hello:
I'm new to the MSX scene, but I want to start developing. I have programmed in the past on the nintendo GameBoy and on the GameBoy Colour. They use a Z80 as the processor so I suposse that programming on MSX will be similar.
I have found some excelent documents: The MSX Red book and a lot of PDFs with the specs of the VDP and the PSG, etc...
The question is that I'm using an emulator (blueMSX, wow it's really very cool) and I think that the best way will be using an assembler and convert the binary image to rom image to be loaded. There is any tools like this? Also, it's possible to load a binary file obtained from a Z80 assembler into a disk and then load it on a MSX computer?
I want to program something for the MSXDev'05 contest (don't worry, I really don't have time to create something interesting, but i want to give me a try), or at least learn something about a cool retro computer.
What I'm looking is for info for beginners (good cross-assemblers, and tools) and a tutorial about writting a very simple application from some simple assembler code to a final disk image or ROM image.
Anyway, thank you and I hope to code something soon!!!
| | mars2000you msx master Mensajes: 1723 | Publicado: Marzo 21 2005, 17:54   | | | mars2000you msx master Mensajes: 1723 | Publicado: Marzo 21 2005, 18:00   | Quote:
| Also, it's possible to load a binary file obtained from a Z80 assembler into a disk and then load it on a MSX computer?
|
The command to save a binary file in MSX-BASIC is BSAVE "<dev>:[<filename>]",<begin address, end address>[,<starting address>]
Example : BSAVE "A:TEST.BIN",&HC000,&HEOFF,&HC020
The command to load this binary file is BLOAD "<dev>:[<filename>]"[,R][,<displacement>]
R means that the binary file will be immediately executed
| | NYYRIKKI msx master Mensajes: 1533 | Publicado: Marzo 21 2005, 18:22   |
Here is few notes about the binary formats used in MSX & MSX emulators:
ROM file is a image of game cartridge ROM. It is meant mostly for emulator users, but lately some tools & hardware has appeared, that help to load these images to real machine as well. The program is loaded to address #4000 with special header. Look Figure 5.48 from MSX2 technical handbook for more details. ( www.konamiman.com/msx/th-5b.txt) Whole book is here: http://www.konamiman.com/msx/msx-e.html
DSK files are disk images (360 or 720K) that are MS(X)-DOS formatted. To make disk game, you have multiple choices.
- make custom sector loader to boot sector (it will be loaded to address #C000 and started from C01E) rest is same as in PC. Sorry I don't remember by hart how RAM is configured in this possibility.
- make MSX-DOS game. (.COM file) If you have experience of CP/M or MS-DOS. This should be easy. Load address is #100 and you have no header. To make disk automaticly starting write "MyFile.COM" to text file and save it as AUTOEXEC.BAT and copy MSXDOS.SYS & COMMAND.COM to same disk. (Format disk on MSX to awoid PC bootcode messing up boot.) In DOS everything is RAM at start.
- Make BASIC loading game: (Usually .BIN file) Header is DB #FE, DW LOADADR, DW ENDADR, DW STARTADR. To be safe,I recommend to load somewhere between #8800-#D800. To make program to start automatically write following program: '10 BLOAD "MyFile.BIN",R' ... and save it as AUTOEXEC.BAS (Format disk on MSX to awoid PC bootcode messing up boot.) In BASIC 0-#7FFF is BIOS & BASIC routines and 8000-#FFFF is RAM. By default #8000 is place to where BASIC program is located.
As MSX uses same disk format as Windows, I recommend you to select either BIN or COM as your format. It makes developing easy as you can test the progs on real MSX by just dropping files to disk. BlueMSX also has Dir as Disk feature, so that you can load your .BIN and .COM files directly from your PC HD without puting them first to DSK file. Just give directory name instead of DSK file name and make sure there is no more than 720KB data on that directory. Read more from manual.
Sorry, if this explanation is quite a mess, but I'm a bit in a hurry. Got to go, bye...
| | AuroraMSX
 msx master Mensajes: 1278 | Publicado: Marzo 22 2005, 10:35   | Quote:
| - make custom sector loader to boot sector (it will be loaded to address #C000 and started from C01E) rest is same as in PC. Sorry I don't remember by heart how RAM is configured in this possibility.
|
RAM is present in page 0, 2 and 3 (address ranges #0000-#3FFF and #8000-#FFFF), the disk ROM is present in page 1 (#4000-#7FFF).
Note that the code from the boot sector will be called twice. First time, the carry bit is not set and no memory or other initialisation has taken place. Second time the memory config mentioned above is present and the carry bit is set.
In short: start your boot code with RET NC
[edit]To be more precise: page 3 runs up to #FFFE, since #FFFF is the secondary slot switching register  [/edit] | | FunkyBoy msx friend Mensajes: 6 | Publicado: Marzo 22 2005, 11:39   | Thankl you very mutch.
I hope to start working on the next days in this project.
It seems that there is some people active on the MSX scene, so I hope that if I'm in trouble you could help me. Very good news.
Thanks again.
| | Sonic_aka_T
 msx guru Mensajes: 2269 | Publicado: Marzo 22 2005, 15:03   | Sure, you can always drop by here if you need some help... By the way, my favorite assemblers are WB-ASS2 (excellent for 'beginners') and tniASM for cross-development.
WB-ASS2 is an environment, it has an assembler, monitor, disassembler and some handy other functions. The only downside of WB-ASS2 is that you can only make small projects with it. It only hold about 24kB's of source-data in the edit buffer, which translates *roughly* to 50kB ASCII source, depending on the source... The advantage of WB-ASS2 is that you can start coding something, assemble it, test it, and monitor that RAM and register contents immediately afterwards.
tniASM is a no-frills commandline assembler for DOS/Windows. It has no limitations concerning size, and works like a charm. Especially good for bigger projects and for developing in the DOS environment. Both assemblers are public domain.
Anyhoo, good luck  | |
| |
| |
| |