Overview Features Coding Performance Forum Downloads Products OrderV4 Contact

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.



All TopicsNewsPerformanceGamesDemosApolloVampireAROSWorkbenchATARIReleases
The team will post updates and news here

Amiga Home Schoolingpage  1 2 3 4 5 6 

Andrew Miller

Posts 338
25 Sep 2021 21:49


Great video as always. Though I have a question about the last example.
Why do you copy $DFF002 to DMA then alter it by setting the 7th bit? Instead of just moving DMA back to $DFF002 as wouldnt that restore it to the original values?


Gunnar von Boehn
(Apollo Team Member)
Posts 5574
26 Sep 2021 06:24


Andrew Miller wrote:

Great video as always.

Thank you!
I hope you guys liked it.

Andrew Miller wrote:

Though I have a question about the last example.
Why do you copy $DFF002 to DMA then alter it by setting the 7th bit? Instead of just moving DMA back to $DFF002 as wouldnt that restore it to the original values?

Most Amiga chipset registers are WRITE-ONLY.
Those that can be read back, use a different Address for reading and writing.

DMACON  write address ==  DFF096
DMACON  read address  ==  DFF002

Please see also:
CLICK HERE


Andrew Miller

Posts 338
26 Sep 2021 06:42


I had a look at the video again and for some reason I had completely missed the fact that it was being read from and written to different addresses.
 
Though I'm still not sure why bit 7 is set in the DMA alias before writing back.


Gunnar von Boehn
(Apollo Team Member)
Posts 5574
26 Sep 2021 07:46


Andrew Miller wrote:

I had a look at the video again and for some reason I had completely missed the fact that it was being read from and written to different addresses.
 
  Though I'm still not sure why bit 7 is set in the DMA alias before writing back.

The design of this Amiga register is very clever.

Normal memory can not be used by 2 programs in parallel - but this register is designed collision free - and many programs can use it in parallel.

Normally to set a bit in memory the CPU needs to read the old value, then set the bit in it and then write the new value to the memory.
This means you need a READ, modify and WRITE operation (2 memory access).
This Amiga register is designed that 1 Write operation is enough to enable or disable a DMA-channel.

If Bit(15) == "1" then you enable the channels the other bits specify.
If Bit(15) == "0" then you disable the channels.

Example:
Bit0 = Audio DMA Channel 0

move.w #%0000.0000.0000.0001,$DFF096
Bit(15)==0
Bit(0)==1

This means we DISABLE AUDIO DMA Channel 0

Now
move.w #%1000.0000.0000.0001,$DFF096
Bit(15)==1
Bit(0)==1

This means we ENABLE AUDIO DMA Channel 0


Tommo Noorduin

Posts 16
26 Sep 2021 09:36


Gunnar von Boehn wrote:
 
      DMACON  write address ==  DFF096
      DMACON  read address  ==  DFF002
     
      Please see also:
      CLICK HERE     

   
Thank you both for lesson 3.
   
I also have no knowledge of the amiga hardware.
(Only a few weeks slowly building it up now)
   
So both 096(does write to AgnesDennisePaula) and 002(read from AgnesPaula) have the same bitlayout.
But 002(read) is missing the Denise bits?
   
I thought that Copper (bit7) was in Agness.
   
But i would expect to read the state of the missing bits and merge them to restore old value.
   
   
I do not mean to keep this an endless discusion, i too do not get it just yet.


Andrew Miller

Posts 338
27 Sep 2021 03:22


I think I know why now, but not through your explanation.

I now understand the read and write addresses are different, what I was asking is why is bit 7 set manually before copying the read data back to the write register.
Am I right in thinking that bit 7 is the only bit used by Denise and as such is the only bit that is always read from the read register as a 0?
(going by the text you linked where Agnus, Denise and Paula can be written to but only Agnus and Paula can be read, making bit 7 in Denise and therefore always 0 on a read).


Gunnar von Boehn
(Apollo Team Member)
Posts 5574
27 Sep 2021 09:20


Maybe the #7 is confusign here.
Let me explain it.

If you have a WORD in memory, then the bits are numbered:

15-14-13-12-11-10-09-08-07-06-05-04-03-02-01-00

If you look at the 1st Byte of this WORD in Memory this is is numbered.

07-06-05-04-03-02-01-00

BSET is a BYTE operation when working on Memory
This means BIT 7 of this BSET will set BIT15 of the WORD.



Andrew Miller

Posts 338
27 Sep 2021 09:55


Yes it's the #7 that is confusing.

I was assuming that was to set bit #7 of the word not bit #15 of the word, which going by the text you linked: 'Bit 15 SET/CLR Set/clear control bit. Determines if bits written with a 1 get set or cleared.'

Which now does make sense.

Thanks, though I'll have to watch the video again as I still dont get why bset #7 would set bit #15. (unless its only acting on the upper byte somehow)


Andrew Miller

Posts 338
27 Sep 2021 10:34


So as its a word in memory it will take the address of this word and the first byte it sees at this address is the high byte so bit 7 of this byte is bit 15 of the word?

So if a word is at address 00, it will take up two bytes, byte 00 and 01. If I then do a byte operation on the address of this word it would only affect 00 not 01, effectively working on the upper byte of the word.

Thanks, I think I've got it.


Gunnar von Boehn
(Apollo Team Member)
Posts 5574
09 Oct 2021 17:28


Nicht vergessen heute 20:00 Teil 3 des Programmierkurses auf Deutsch.

Please mind today Episode 3 of the Coding lessons in German.


Eric Libert

Posts 8
12 Oct 2021 19:36


Hello Gunnar,

What is the link to watch Episode 3 in English.
I really enjoyed episodes 1 and 2.

Thank you in advance for the info and thank you for sharing your passion.


Tommo Noorduin

Posts 16
13 Oct 2021 13:34


Eric Libert wrote:
 
  What is the link to watch Episode 3 in English.
  I really enjoyed episodes 1 and 2.
 

I can not tell you.

but...

twitch.tv/apollobiggun/videos used to hold all previous lessons, now only the last one (lesson 3 german) is there.

The old ones should be uploaded to youtube.com/channel/UCBRxXzwKLrKEOPaCeBbWULg
but lesson 3 english is not there yet.



Gunnar von Boehn
(Apollo Team Member)
Posts 5574
13 Oct 2021 14:52


Arne does manage the Youtube channel .. He will take car of this on the weekend.


Ivan Richardson II

Posts 1
21 Oct 2021 06:02


I hope Arne gets to it this coming weekend since he didn't get to it (I'm sure something came up) last weekend.  On the plus side, he has posted several Firebird accelerator videos -- very cool!!

Please keep up your great work!!  And please have Arne post the latest Amiga Homeschooling Videos!  Thank You!!


Gunnar von Boehn
(Apollo Team Member)
Posts 5574
23 Oct 2021 13:42


Please mind today at 20:00 german time, is the next episode!

Episode 4) ASM coding

Please prepare also questions



Andrew Miller

Posts 338
23 Oct 2021 19:57


I thought it was the last saturday each month?


Andrew Miller

Posts 338
25 Oct 2021 06:26


Is there an amigaguide containing the information in the Coding/Saga Chipset section of the website?
Might make it a bit easier learning to code on the V4, having the info in an amiga format.


Andrew Miller

Posts 338
25 Oct 2021 14:33


Or even just the same info but in text format?


Andrew Miller

Posts 338
29 Oct 2021 04:56


Can sprites be used on chunky screens or just planar ones?


Tommo Noorduin

Posts 16
29 Oct 2021 18:44


it is not mentioned in the
EXTERNAL LINK 
But i recall it was being implemented.

So not sure, but think it is.

posts 104page  1 2 3 4 5 6