T.R | Title | User | Personal Name | Date | Lines |
---|
1020.1 | #2! | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Mon Nov 26 1990 13:26 | 20 |
| I've had a rethink (and fixed the disgusting error of using DC.B
instead of DC.W!)... This is what I've come up with... any comments ?
\ Routine to rotate block of memory
\ bounded by start and end.
lea end, a0
movea a0, a1
deca a1
move.w (a0), d0
loop move.w (a1)-, (a0)-
cmpa start, a1
bne loop
move.w d0, (a0)
Start dc.w $1
dc.w $2
dc.w $3
End dc.w $4
|
1020.2 | Addressing mdoe problems abound | PRNSYS::LOMICKAJ | Jeffrey A. Lomicka | Mon Nov 26 1990 13:43 | 33 |
| I may be a little rusty, so others can correct me when I mess up, but I
interpret the code as follows:
movea end, a0
This moves a "4" into A0. The LEA instruction would
load the address "END". An equivalent instruction would
be to say "MOVEA #end, A0". The difference is that LEA
allows the use of addressing modes that you can't get
with the immediate load of a constant, such
as "LEA (42,A0,D0.l)".
move.w (a0), temp
loop move.w (a0-1), (a0)
I think "A0-1" is actually "D7". Also, you need to be
incrementing A0. Try "move.b (-1,A0), (a0)+". Also, if
youare moving bytes, not words, you use the ".b" form.
cmpa (a0-1), start
This compares with "1". You mean "CMPA A0, #start".
bne loop
move.w temp, (a0-1)
MOVE.W temp, (-1, A0)
rts
This should get you started. Have fun figuring out the rest of the
68000 addressing modes.
|
1020.3 | | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Mon Nov 26 1990 14:31 | 10 |
| That's what I'm having problems with! Getting to grips with the
addressing modes! Thanks for the comments.
One thing I don't understand though; why is (A0-1) equivalent to (D7) ?
Cheers,
Jamie.
|
1020.4 | | PRNSYS::LOMICKAJ | Jeffrey A. Lomicka | Tue Nov 27 1990 10:20 | 4 |
| In some assembelers, the register names are simply pre-defined symbols,
and you can do math on them. Not true in all cases, of course, but I
was trying to figure out a reason why your assembler would accept (a0-1)
without a syntax error.
|
1020.5 | | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Wed Dec 05 1990 05:20 | 16 |
| Having progressed a bit from .0 - got rasters licked, got sprites
fluttering around the screen etc. I've got another more "internals"
related question...
How do you get rid of the top, bottom, left and right borders ? I know
it can definitely be done; I've seen programs do it. Unfortunately I've
not been able to see the source for the code.
Has anyone done this or can anyone suggest how it might be
accomplished ?
Cheers,
Jamie.
|
1020.6 | maybe a trace | MGOI02::FALKENSTEIN | so many girls, so little time... | Wed Dec 05 1990 10:19 | 45 |
|
I can't give you details, but it works like described below:
In 50Hz-Mode one screen consists of 313 lines showing up 50 times per second.
There is no interlace so that the two halfpictures overlay exactly. The first
39 lines are displayed without pixel-graphics but just with the background
color (colorpalette 0). Then followed by 200 lines each beginning on the left
side with the backgroundcolor, in the mid with the pixel-graphic (320 or 640,
depending on the mode) and on the right again terminate with the background-
color. The next 45 lines (displaying the lower border) are again only back-
ground color, no pixels.
The last 29 of 313 lines are blanked out by the blankling signal of the GLUE
and are therefor not seen on the monitor.
The trick some programmers use to display the complete screen is a short
50/60Hz switch which confuses the 199 lines of the glue so that the ST
displays 39200 Bytes screen memory instead of 32000 Bytes (45 lines with
each 160 Bytes = 7200 Bytes more).
I read all this in a mag dated May '89. They said to get the left and right
borders also a complex routine of Interrupt- and Videoaddresscounter
synchronization is neccessary.
Another hint: the DE-signal (display enable in color mode) switches the
display of pixels or backgroundcolor. (High=Pixel, Low=Backgroundcolor).
So you have to modify this signal in a way that in each video-line the
DE is longer and earlier on HIGH. So the line displays more than the normal
320 or 640 pixels.
DE is generated by the GLUE (also Blank, Hsync, Vsync), runs to the MMU,
to the Shifter and then to the B-input of the MFP (counting of lines via
interrupt). The starting address of the next halfpicture is stored from
the location FF8201 and FF8203 into the MMU. Is DE high, so the Display-
Cycle-Clock signal is now generated in the MMU which transports the
videodisplay information from RAM to Shifter with 16bits and uses the Load
Input of the Shifter. The same time the counter in the MMU counts up, the
actual number is in the video address counter FF8205/07/09. Is the DE high
for a longer period of time the MMU addresses more memory as display memory
and gives it to the Shifter as pixel-display.
The software trick is that because of interrupt controlled switching of
50/60Hz in dedicated lines the GLUE-generated DE signal keeps high for
a longer period of time per line. Don't ask me how to do that with
software, in the mag came a schematic (one BC555, 2 diodes, one capacitor,
two resistors and a switch) which does exactly that. It avoids the borders
and gives you a resolution of up to 840*568 pixels in monochrome.
Bernd
|
1020.7 | ST world articles. | UKCSSE::KEANE | | Thu Dec 06 1990 03:44 | 20 |
|
Hi Jamie,
IN the old ST WOrld before its unfortunate takeover by the ST USer
magazine, last year, was a series of articles and code examples of all
sorts of graphic programming techniques in assembler.
It was by one of the top graphic gurus in the UK. I cant remember his
name.... but ..
I have the complete set of articles and I also sent for and received the
compilation disk with all the Code segments used in the series.
If you are interested I will loan you the articles and the code segment
disk. I cannot remember wheter there was a segment on software
overscan.
I also know it can be done, I also have seen those amazing demos,
with all four borders missing!
regards
Pat K.
|
1020.8 | | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Thu Dec 06 1990 04:36 | 17 |
| RE .6
Thanks for the descriptions; I understand the 50hz/60hz switch - that
shouldn't be too bad - but the left/right border bit blew me away!
I'll have to try and find some example code for that!
Which brings me to .7!
I'd love to borrow the articles & disks Pat; if it's the series I
think - by Jeff Lawson - I've got just one issue of the series which I
found very interesting but wished I'd got the others...!
Cheers,
Jamie.
|
1020.9 | jeff LAwson was right! | UKCSSE::KEANE | | Thu Dec 06 1990 09:04 | 12 |
|
Hi Jamie
Yes Jeff Lawson was the guy.
I will bring the articles and disk in Monday and drop them in the mail
Cheers
Pat K.
|
1020.10 | Me too! | GOLLY::JAMISON | | Wed Dec 12 1990 14:23 | 11 |
| I'd love to copy off the articles and look at the disk too. Would this
be possible?
My mail stop is
Al Jamison
ZK02-3/r56
Thanks for any reply,
Al...
|
1020.11 | What is MIT Assembler format? | GOLLY::JAMISON | | Wed Dec 12 1990 14:27 | 10 |
| What is the difference between MIT style 68000 assembler and Motorola
Assembler formats? Anyone know where to get more information?
I have a nice 68000 programmers book '68000 Assembly Language' by Kratz
and another (I think). Prentice Hall. If this is wrong, I'll make
another reply.
Thanks,
Al...
|
1020.12 | | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Mon Jan 07 1991 04:31 | 20 |
| I'm running into some strange problems when leaving supervisor mode...
when I go into supervisor mode, I save the old stack address, then when
I leave supervisor mode, I supply the saved address to the system
routine... this then blows up...
I assume that somehow the contents of the old stack are becoming
corrupted in some way... but I don't see how... since I'm not
addressing that area of memory directly myself and I was under the
impression that when in supervisor mode an entirely different stack was
used...
Has anyone else had problems with this ? I suppose I could save the
contents of the old stack then restore that before jumping out of
supervisor mode but that doesn't sound too safe to me!!!
Cheers,
Jamie.
|
1020.13 | SSP and USP might interfere... | STKHLM::WEBJORN | Gullik Webj�rn TSSC Network Support | Wed Jan 09 1991 04:35 | 5 |
| Going from user to super mode switches from usp to ssp. However,
check if USP and SSP points to the same location......
Gullik
|
1020.14 | | SIEVAX::JAMIE | Use me, Use me... Ooops! Excuse me! | Wed Jan 09 1991 09:33 | 8 |
| That occured to me last night! I might have to point the stack pointer
to another area once I've switched into super. Thanks... your
suspicions confirm mine!
Cheers,
Jamie.
|