Jump to content
IGNORED

General Jag scribblings


Recommended Posts

Hi guys (and gals)

 

Thought it may be worth posting this link here, as I just wrote a bit of a note on a RISC (maybe MAC??) bug that keeps getting me, thought I would share a link here to the Jag section of my blog where I do on occasion actually write stuff, usually regards progress with stuff and things..

 

So anyone interested in a sort of dev blog type thing: http://www.linkovitch.me.uk/blog/?cat=3 There are a few posts about the early days of the sound engine, a few penny dropping moments, documented for all history :D

  • Like 3
Link to comment
Share on other sites

Interesting bug. I'm not sure how powerful the macro system is in the assembler but is it possible to put the jump instruction in a macro and then check the alignment of the target address in the macro? If its not aligned correctly then put out a warning. The other solution would be to put an alignment check in the final pass of the assembler source itself.

Link to comment
Share on other sites

Hi guys (and gals)

 

Thought it may be worth posting this link here, as I just wrote a bit of a note on a RISC (maybe MAC??) bug that keeps getting me, thought I would share a link here to the Jag section of my blog where I do on occasion actually write stuff, usually regards progress with stuff and things..

 

So anyone interested in a sort of dev blog type thing: http://www.linkovitc....uk/blog/?cat=3 There are a few posts about the early days of the sound engine, a few penny dropping moments, documented for all history :D

 

Have you tried it with SMAC? I remember SubQmod found some bugs in MadMac he actually fixed in SMAC.

Link to comment
Share on other sites

Interesting bug. I'm not sure how powerful the macro system is in the assembler but is it possible to put the jump instruction in a macro and then check the alignment of the target address in the macro? If its not aligned correctly then put out a warning. The other solution would be to put an alignment check in the final pass of the assembler source itself.

 

I have had a look at the source of the assembler and the linker and there is no way I am hacking into that mess. I am more likely to write my own assembler and linker (heh) from scratch, shouldn't be that hard. Alas you know what my todo list is like :) (still growing too :/ ) so until it annoys me enough and I have a hankering for some more C action...

 

Have tried using the alignment operators in the assembler, but seems that these can be bugged too! ah well :/

 

Have you tried it with SMAC? I remember SubQmod found some bugs in MadMac he actually fixed in SMAC.

 

Yeah, that suffers with the same issues.

Link to comment
Share on other sites

That's weird, I'm not getting this kind of behviour when programming the GPU. The jumps are reliable. However I'm only running programs from local GPU RAM.

When GPU (or DSP for that matter) is running a program from main RAM, jump instructions must follow a few alignment rules. The rules differs between jump and jr instructions. It also changes whether you're jumping within the same page (2Kb) or not. It's almost impossible to follow theses rules manually. Every code you add may change the alignment and may push the destination of the jump outside the page.

SMAC helps you with mjump and mjr pseudo-instructions. I've not written a GPU program running from main RAM so I don't know how reliable SMAC is when it comes to follow the alignemnt rules.

Edited by DrTypo
Link to comment
Share on other sites

That's weird, I'm not getting this kind of behviour when programming the GPU. The jumps are reliable. However I'm only running programs from local GPU RAM.

 

Ah sorry, I should have been clearer.. This is in local RAM! I'd expect the wackyness if I was running it in main, but this is in local! It's not just me that has had this happen either, I have had it occur a few times whilst working on the SE.

 

It was just a bit of a note as much for myself as anyone else as I usually find something like this and then forget it! :D

Link to comment
Share on other sites

I have had this situation arise occassionally.. when the insertion of a 16bit instruction has seemingly messed things up and insertion of a nop to re-align things seems to have fixed it.. despite the presence of .long, .phrase, .dphrase or .qphrase alignements

 

Only very rarely though

 

 

 

on the side note of running in main.. yes, manually tracking is a nightmare, i've not really tried it in SMAC as much as i should have as i'd already written a lot of code and the idea of re-writing it is not attractive

Edited by Atari_Owl
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...