Is it possible to setup a development enviroment under windows 7 for msx with openmsx plus assembler?

Page 1/2
| 2

By nikodr

Paladin (722)

nikodr's picture

20-09-2016, 14:14

I checked this site http://zxspectrumdev.blogspot.gr/2009/01/setting-up-developm...

it has instructions how to install a text editor with syntax highlighting for z80 asm.Then you can setup pasmo assembler to create tap files for spectrum zx with a click of a button f9 and with f10 it runs an emulator and the file is loaded.

From what i see in the editor you define the executable of the assembler with the options to create a tap file.
In theory can we do the same for msx?A way to make binary files or rom files,and then with f10 to load openmsx and run the file?It is very good method indeed.

I setup this with spectrum emulator,and run many examples and machine code programs very fast and directly,and with just a button i made changes to the source and had at once my new tap file loaded.

On msx on the other side i have to get my source load an assembler under msx,in order to see something which takes so much time.

So openmsx or bluemsx do they take optional parameters to load external files if run from a shell ?And what is the best windows z80 assember that can make binary files for msx?

UPDATE: http://pasmo.speccy.org/ it seems from the documentation pasmo can create binary files for msx too.So in theory the one click button to create msx executables is possible but only for binary files i assume.

Login or register to post comments

By Manuel

Ascended (15114)

Manuel's picture

20-09-2016, 21:22

Sure! If you are creating ROM files, you can simply start up openMSX with the ROM file. If you output other binary files you could let them end up in a folder and start up openMSX with dir-as-disk to that folder and run the software (e.g. by also adding an autoexec.bas to that folder).

By nikodr

Paladin (722)

nikodr's picture

21-09-2016, 13:32

Thank you manuel. Would it be possible to change startup options of openmsx so that it automatically bloads the binary file?
In speculator the tap file is loaded and you simply do a randomize usr address to execute it.

I will try the dir option you mentioned.
I say this because it would save time if it bloaded that file at once like speculator does for tape files.

By hit9918

Prophet (2825)

hit9918's picture

21-09-2016, 15:38

under windows the ROM file is locked and then in the next turnaround the assembler cant write the file.
the windows COPY command too cant write the file.

meanwhile with dir-as-disk, with a F12 reset button script I get super turnaround times because the emu goes highspeed for some seconds, making a fast MSX boot.

I got this in the file mystuff.tcl in share/scripts :

namespace eval mystuff {
        bind F12 turnaround
        proc turnaround {} {
                after boot { set throttle off; after time 55 {set throttle on}}
                reset
        }
        namespace export turnaround
}
namespace import mystuff::*

By Manuel

Ascended (15114)

Manuel's picture

23-09-2016, 00:27

nikodr: let me know how things go and what specific help we can give you.

By syn

Paragon (1899)

syn's picture

24-09-2016, 01:03

It has been a while since I last did coding but this was my setup roughly in windows 7.

I use Textpad as editor.
In Textpad, I configured my assembler ( tniASM ) as "external tool" so that the file I worked on will be send to tniASM after pressing (if I recall correctly) ctrl+1, as if I was manually starting it in commandline. I also set up in a way that the source .asm files are saved in a /sources folder while the result goes to /compiled. In the source I can define the filename for tniasm to use.

Then, in blueMSX I bootup the correct machine in MSX-dos 2.3 (using a msx-dos disk), mount the /compiles folder as A: drive (just drag n drop the /compiled folder to blueMSX) and type the filename.com name but dont press Enter. I then press F8 to make a quick-savestate. I don't remember if .rom (or tape) can be done this way as well (by inserting old version of the project .rom to cartridge port A) or that I needed to insert it again after changes were made. I can test for you tomorrow if you like.

I primarily work with .com files, and my workflow would be
1. Code stuff in Textpad
2. Press ctrl+1 to compile to .com with tniASM + autosave source in Textpad
3. Alt-tab to blueMSX
4. Press F7 to load savestate) and then Enter
5. Test my code/game
5. Alt-tab to Textpad to code more
6. Ctrl+1
7. Etc

I think this doesnt work in openMSX because the files are locked so you need to close openMSX first (correct me if im wrong Manuel).

[edit]
Tested it, the above should work for openMSX as well.

By Manuel

Ascended (15114)

Manuel's picture

23-09-2016, 07:22

I don't know, I'm not on Windows myself and we don't explicitly tell openMSX to lock files, as far as I know. The locking is something Windows specific, which we didn't explicitly ask for.
Does someone know how to avoid it?

By kanima

Master (192)

kanima's picture

23-09-2016, 11:59

Manuel wrote:

I don't know, I'm not on Windows myself and we don't explicitly tell openMSX to lock files, as far as I know. The locking is something Windows specific, which we didn't explicitly ask for.
Does someone know how to avoid it?

When using the Windows file APIs, like File.Open in .NET, you can specify a share mode for other threads and processes.

See File.Open and FileShare.

I think this should allow you to open a file for read, but still allow read/write and even delete for other threads and processes.

By syn

Paragon (1899)

syn's picture

23-09-2016, 17:57

I am sorry, my bad, I was misremembering things.

I tested it with dirasdisk just now and updating/adding some random textfiles and things work correctly. So what I described as my workflow earlier should work in openMSX as well.

If I recall correctly my problem was that I couldnt get dirasdisk working back when I tried it (this was 4-5 years ago and my first time using openMSX) so that was why I prefered blueMSX at the time.

The locking problem I have was something else: If I have a dsk image inserted (to update the image with a newly compiled file) in either openMSX or blueMSX I can't open them in Disk-Manager (from http://www.lexlechz.at/ ), I will get an error message saying that the file (diskimage) is in use by another process (open/blue MSX).

By hit9918

Prophet (2825)

hit9918's picture

23-09-2016, 23:00

about the windows lock. well one day I looked the source and found no fopen, I couldnt understand it.
so I guess. the ROMs are memory mapped files, keeping open. that's why a different behaviour than other files. maybe it can be done in a mode without locking.

By Wolverine_nl

Paladin (1002)

Wolverine_nl's picture

24-09-2016, 11:44

i use OpenMSX, works great. just use a floppy disk image as buffer. Usage:
First open de floppy disk image with diskmanager or editdsk. Then start OpenMSX and do what you like.
Now you can always save to the disk image and read/only from it from OpenMSX.
You can also mount a FAT12 diskimage with OSFMount, but that does the same.

Page 1/2
| 2
My MSX profile