Jump to content



Photo
- - - - -

Sh3timers


  • Please log in to reply
8 replies to this topic

#1 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 07 October 2005 - 03:41 PM

Here's a librairy with functions to use the timers of the processor...
I think everything is explained in the header file.
To link a librairy on DevC++, just put
-library=directories...\myFile.lib
in the case "Linker" of Project->Project Options->Parameters

Here's the link
http://orwell01.free...3Timers_Lib.zip

For any question or opinion tell it me...

Alexandre

#2 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 07 October 2005 - 05:21 PM

Very good! B)

But I asked you several times how you made these functions. Can you tell me now? I have a lot of projects (I am programming a sort of snake game taken from TI-89 games, where you can turn in all directions, and I need assembler functions to draw the snake because it is too slow in C++).

#3 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 07 October 2005 - 05:59 PM

If you arrive to add me to your contacts msn, I could give you many things about it...
Now I've just find how to use the interruptions...I'm working on it!
Alexandre

#4 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 07 October 2005 - 06:08 PM

If you arrive to add me to your contacts msn


But I added you!!! And you use Hotmail, so I must go to the site www.msn.com, no?

#5 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 07 October 2005 - 08:55 PM

But I added you!!! And you use Hotmail, so I must go to the site www.msn.com, no?

Go to http://messenger.msn...Xp/Default.aspx and click the "Download" link! :lol2:
Then run the installation and launch the program ;)

If you don't want to install it, use the online version:http://webmessenger.msn.com/ :)

#6 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 11 October 2005 - 06:04 PM

I arrive to control interrupts sent by processor timers...
I've made a library tu use easier them...
And with them and the direct control to the screen memory (not the VRAM), I arrive to make "grayscales"...but this is not yet the best as g100
I make still a library for grayscales and I put all these things to download...

Alexandre

#7 SoftCalc

SoftCalc

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 406 posts
  • Location:Portland, OR USA

  • Calculators:
    ClassPad 300 , AFX 2.0, HP-48/49/50, TI-89/92/Voyager, HP Expander, etc...

Posted 11 October 2005 - 08:57 PM

I arrive to control interrupts sent by processor timers...
I've made a library tu use easier them...
And with them and the direct control to the screen memory (not the VRAM), I arrive to make "grayscales"...but this is not yet the best as g100
I make still a library for grayscales and I put all these things to download...

Alexandre

I don't know how you are doing the grayscale. I assume you are using an interrupt to cycle through each bit plane. One method is to copy all the bits for each plane into VRAM. A quicker and better method (if it is possible) is to have fixed buffers for each plane and simply changing the address used for VRAM (no bit copy needed).

I don't remember, does the ClassPad have the ability to change the address used for VRAM? If so, this is the best method.

#8 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 11 October 2005 - 11:04 PM

I don't remember, does the ClassPad have the ability to change the address used for VRAM? If so, this is the best method.

Well we were supposing that you knew the answer of this question :lol2:

But actually I think that the best way to create real grayscales should be to configure the screen's DMA Controller to use 2 video buffers alternatively, instead of one; this way the switch operation will occur between each actual refresh of the screen, and this should make a nice and smooth result.
However, configuring the DMAC is impossible if we don't know its exact references and its corresponding ports on the ClassPad <_<

When one writes something in the "VRAM" one's just actually writing in PEG's internal buffer; and the changes get visible only after the transfer from this buffer to the real video memory (where the DMAC gets the data it needs)... There is a "hidden" function to do this (which code should be known thanks to Gaumerie's work), and I suppose that we implicitely call this function during the call of EndDraw() on a currently visible PegThing. ;)

This means that duplicating the "VRAM" is useless if we do not duplicate the real video memory and make the screen switch automatically between each plane; otherwhise for each cycle we would still have to transfert the content of the current buffer to the video memory, and this could greatly slow down the execution of the program :(

#9 Gaumerie

Gaumerie

    Newbie

  • Members
  • Pip
  • 28 posts

Posted 12 October 2005 - 12:12 PM

I don't use the VRAM, because this is just a intermediate buffer...
I make an interrput that is called at a certain frequency and several buffers...
Each time the interrupt is called, i copy the next buffer directly to the screen...
I know that is not the best way, but I think that until we can use the way of julien, I should be great...
I use a frequency of about 69hz...because when this is more or less, the result is not good...
I will try to make an exemple when I will have time...

Alexandre




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users