Jump to content
IGNORED

WUDSN IDE: The free integrated Atari 8-bit development plugin for Eclipse


Recommended Posts

Just to confirm: find bug was apparently user error ("Whole word" was checked when searching for part strings). :)

LOL - I do that at least once a week at work. Usually starts with me cursing out VS2010, then feeling dumb and cursing the dummy behind the keyboard.

Link to comment
Share on other sites

As a test I attempted to type in the sample program on page 161 of the Atari Operating Systems User Manual.

I didn't get very far. I was able to compile and run the example.asm file provided on the WUSDN website so I know at least that much works. However when I attempted to compile this I get an error.

The error is "Unknown symbol 'MEMLO boot.asm /ATASM line 11 Problem" My initial guess is I need to add some include path in WUDSN that pulls up the Atari specific labels for OS routines?

 

 


[indent]; This is a sample boot application
PST = $0700		; Program Start Address (PST)
*= PST			; Not sure what this means

; Diskette boot control code follows
.BYTE 0			;
.BYTE PND-PST+127/128	;	Number of records for floppy disk
.WORD PST				; Memory address to start load
.WORD PINIT				;	Program initialization
LDA #PND				;	Low memory limit
STA MEMLO
STA APPMHI
LDA #PND/256
STA MEMLO+1
STA APPMHI+1

LDA #RESTRT
STA DOSVEC
LDA #RESTRT/256
STA DOSVEC+1

CLC
RTS

PINIT RTS
RESTRT=*

PND=	*
	.END 
[/indent]

Link to comment
Share on other sites

My initial guess is I need to add some include path in WUDSN that pulls up the Atari specific labels for OS routines?

Your guess is correct. I have created an include file in ATASM format with all definitions according to http://evilbill.org/old/orig/Atari/8-Bit/Refman/appendixB.html.

 

But: The code sample is a boot code. To run it you would have to put it into sector 1 of a disk using a disk editor and boot the disk. While this is technically possible, I recommend to use normal executable files like those ATASM creates by default and which can be loaded from any DOS.

 

 

Also: The source uses some syntax which is not valid for ATASM.

LDA #RESTRT
STA DOSVEC
LDA #RESTRT/256
STA DOSVEC+1

 

must be changed to

 

LDA #<RESTRT ;Low byte
STA DOSVEC
LDA #>RESTRT ;High byte
STA DOSVEC+1

SystemEquates.zip

Link to comment
Share on other sites

Check this site out http://www.richard-jackman.de/Atari_XL/index.htm

Richard finaly made a Atari 6502 cross-macroassembler for PC The Atmas-II macro assembler for Atari 8-bit computers.

Maybe you can use it for wudsn ide very nice program.

 

Hi Marco!

Thanks for the hint. But supporting yet another assembler would mean too much work for me. I started with ATAMAS on my real Atari (and still use it there). But ATASM and MADS are much better and more flexible, so I don't see the need to add ATASM. I started to use ."PROC" in MADS last week and I immediately became addicted (structured ASM code, after 20 years ;-) )

Link to comment
Share on other sites

I have created an include file in ATASM format with all definitions according to http://evilbill.org/...appendixB.html.

Ta very much! :)

 

"PROC" in MADS last week and I immediately became addicted (structured ASM code, after 20 years icon_winking.gif )

I'm a MADS convert too. I didn't like the idisyncratic syntax at first, but after writing a couple of big relocatable SDX programs, I've realized what a superb assembler it is. I started using STRUCTs the other week and I've never seen such readable assembler code. I'd like to convert The Last Word from ATASM to MADS, but it would be a huge undertaking.

Link to comment
Share on other sites

Peter,

Firstly, thank you for a wonderful tool. Second thanks for the additions. You guessed correctly that I am attempting to write boot sector code. I am fooling around and wanted to write my own OS. Really I just want to write an Atari version of the unix command of ls . I hate the command dir.

Edited by rchennau
Link to comment
Share on other sites

I am fooling around and wanted to write my own OS. Really I just want to write an Atari version of the unix command of ls . I hate the command dir.

Do you mean "D"OS? Which DOS are you using?

Link to comment
Share on other sites

But: The code sample is a boot code. To run it you would have to put it into sector 1 of a disk using a disk editor and boot the disk. While this is technically possible, I recommend to use normal executable files like those ATASM creates by default and which can be loaded from any DOS.

Actually creating a bootable ATR is very simple in ATasm, I use it quite a lot :-)

Here's the adapted source code:

        PST = $0700             ; Program Start Address (PST)

; ATR header
       * = PST - 16

       .WORD $0296             ; magic
       .WORD [PEND-PST+15]/16  ; size of ATR in 16-byte blocks
       .WORD 128
       .WORD 0,0,0,0,0

       .include "SystemEquates.asm"

; Diskette boot control code follows
       .BYTE 0                 ;
       .BYTE [PEND-PST+127]/128 ;       Number of records for floppy disk
       .WORD PST               ; Memory address to start load
       .WORD PINIT             ;       Program initialization

       LDA #<PND               ;       Low memory limit
       STA MEMLO
       STA APPMHI
       LDA #>PND
       STA MEMLO+1
       STA APPMHI+1

       LDA #<RESTRT
       STA DOSVEC
       LDA #>RESTRT
       STA DOSVEC+1

       CLC
       RTS

PINIT   RTS
RESTRT=*

PND=    *

; pad to full 128-byte sector size, only works for code starting at a 128-byte boundary
       .IF (*&127)<>0
       .DC (128-(*&127)) 0
       .ENDIF

PEND    = *

Note the ATR header at the beginning and the "padding to sector size" block at the end of the code. Also note that I put brackets in the "[PEND-PST+127]/128" statement, otherwise this means "[PEND-PST] + [127/128]", i.e. "[PEND-PST] + 0" - certainly not what it's intended to mean :-)

 

You can then assemble the code to an ATR file using these ATasm options:

atasm -r -oboot.atr boot.asm

so long,

 

Hias

Link to comment
Share on other sites

I could but that wouldn't really teach me much about programming in assembly or writing raw binary files to sector 0 of a floppy disk. ;)

I mean assembly programming and boot sector writing are must have skill in in the 8-bit word and thus far I can barely spell 'c' in programming terms.

 

Regards,

 

Really I just want to write an Atari version of the unix command of ls . I hate the command dir.

Just use an alias in SDX...

Link to comment
Share on other sites

Question: Please forgive me for being dense but exactly how do I configure WUSDN (Eclipse) to read this file into my project so ATASM may compile without error?

 

Answer: add the following line at the beginning of your assembler code

	.include "SystemEquates.asm"

 

My initial guess is I need to add some include path in WUDSN that pulls up the Atari specific labels for OS routines?

Your guess is correct. I have created an include file in ATASM format with all definitions according to http://evilbill.org/...appendixB.html.

 

But: The code sample is a boot code. To run it you would have to put it into sector 1 of a disk using a disk editor and boot the disk. While this is technically possible, I recommend to use normal executable files like those ATASM creates by default and which can be loaded from any DOS.

 

 

Also: The source uses some syntax which is not valid for ATASM.

LDA #RESTRT
STA DOSVEC
LDA #RESTRT/256
STA DOSVEC+1

 

must be changed to

 

LDA #<RESTRT ;Low byte
STA DOSVEC
LDA #>RESTRT ;High byte
STA DOSVEC+1

Edited by rchennau
Link to comment
Share on other sites

  • 3 weeks later...

Peter,

 

Is it possible to include a list of words for syntax coloring? It would be nice to see register names like COLPF0, DMACTL, etc.. in a different color.

 

-Bry

 

Hi Bry,

I have to impove serveral other things first to make something like this possible (esp. the identifier parsing) but then this is just a special case of content assist for different types of identifiers. That means you will have separate colors for system/user labels/equates/procedures/macros plus content assist (CTRL-Space) for them. I.e. you type "COLP" and the IDE suggests "COLPF0/1/2/3" including their description. That's a very long way to go, but it is possible,so I put it on the todo list. Note: Even in the first version of WUDSN IDE I had forseen the coloring for macros until I realized that it takes much more to work ;-)

Link to comment
Share on other sites

  • 2 weeks later...

Hi Peter,

 

I tried several times to use eclipse and your ide with my win7 64 bit configuration.

 

No chance to try it out, since I didn´t find any way to run even eclipse. There is a problem that causes eclipse not to find the java here :( Even copying the whole jre6 directory to eclipse dir (as the error message tell´s that jre is not found there) won´t work.

Link to comment
Share on other sites

Thanks to a pm Peter sent me, I took a look above this problem again and finaly got that:

 

Don´t know why, but Java is an 32 bit application here - installed it many times, always the same result.

My Eclipse was 64 bit - I always try 64 bit applications at my 64 bit OS.

 

Now I tried the 32 bit version of Eclipse and it runs without problems :roll:

Link to comment
Share on other sites

Hi there.

Yesterday I played around a bit an tried to add detection for the different types of identifiers and for numbers. Now I'd like to know if you thinks that this is overkill or .. well great.

post-17404-12924400308_thumb.png

 

Regarding Bryan request, I implemented also that you can specify the color for an indentifier in the comment using "@style=(r,b,g,r,g,b,bold/italic)". This way you could specify the styles for the system labels simply in the "SystemEquates.asm".

 

post-17404-129244004086_thumb.png

 

Note: The code sample is from a MADS source. Due to its name nesting, the coloring is not always 100% correct, esp. if a name is used twice (here: fader for .local and .proc). Once it works in general I'll think about how to handle all that nesting stuff (which I great, but really complex to handle for the IDE).

Link to comment
Share on other sites

(what? you are working instead of doing your next demo? can we have everything?? :D )
Yes, Peter, just sit down and do something for NYD ;)

 

I like the numbers, as you often have a hint that on line numer xx is something wrong - then you are counting or searching for a long time.

Link to comment
Share on other sites

I like the numbers, as you often have a hint that on line numer xx is something wrong - then you are counting or searching for a long time.

I'm not referring to the line number on the left (they are a basic feature, nothing special in WUDSN IDE), but to the syntax highlighting for numbers.

Link to comment
Share on other sites

I like the numbers, as you often have a hint that on line numer xx is something wrong - then you are counting or searching for a long time.

I'm not referring to the line number on the left (they are a basic feature, nothing special in WUDSN IDE), but to the syntax highlighting for numbers.

Oh sorry, I surely have not looked to deep into all that eclipse and your ide :o

 

Thought that you meant the numbers on the left :roll:

 

But in near future I have more time to get a "profession" with your nice thing. It is for sure better than using the editor of win and the Salamander (NC-clone) for creating new software ;)

Link to comment
Share on other sites

  • 1 month later...

Hi, just a short teaser ;)

 

When I coded Silly Things, I really had some trouble with converting images and graphics to various Atari formats. Now I found the time to clean up all my hacks and after many years I see a solution at the horizion. I have extended the Graphics Editor in the following ways:

 

- The easy part: The converter from (Atari) file to image now supports almost everything that is also supported by Fail (incl. HIP, APAC, ...) with good heuristics to guess the file type

- the ard part: The converter from PC Image to (Atari) files has come to life finally. I have included the Rhino JavaScript engine and it is great. No need to install the Java SDK, no need for compiling - just edit and run. Now you can simply write a few lines for the conversion as part of the conversion file. You can create up to 10 different Atari files from the image. You can use loop in the code to arrange the bytes in the files just as you like. Here's the sample for converting a PC picture to a Graphics 8 picture. The image size is taken 1:1 in this case.

 

post-17404-12955256186_thumb.png

function convertToFileData(data) {
var bpsl = (data.getImageDataWidth() + 7) / 8;
var bytes = []
var offset = 0;
for (var y = 0; y < data.getImageDataHeight(); y++) {
    for (var x = 0; x < data.getImageDataWidth(); x = x +  {
	var b = 0;
	for (var p = 0; p < 8; p++) {
	    var color;
	    color = data.getPixel(x + p, y);
	    if (color != 0) {
		b = b | 1 << 7 - p;
	    }
	}
	bytes[offset++] = b;
    }
}
data.setTargetFileObject(0, bytes);
}

Link to comment
Share on other sites

  • 3 weeks later...

Did you know: Doing it right is alwyas more work than a quick hack?

Yesterday I invested some time into the graphics conversion again and gradually my port of the Fail library is becoming complete.

Almost all formats (incl. the 2nd HIP format I never knew of ;-) ) are now done, only TIP,ILC,INT,AP3 and CIN are missing yet.

 

post-17404-129735593394_thumb.pngpost-17404-129735619722_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...