All Posts (lameboyadvance)




#31
Re: Clock Demo
Posted on: 2006/9/8 7:29
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
jorgeche: I haven't touched gccVB in ages, and since then its gone an overhaul, so the following may not work right.
This is the timing code from my Zelda demo. I just tested the ROM in the latest (at least I think it is) copy of Reality Boy, and it seems to be running at the correct speed.
I actually used the ROM timer interrupt to increment a counter that I could then use to calculate the time. I'm not sure of the duration of the timer, but I think I have it set to 10x100uS (1mS).


// Timer Interrupt Handler
// Create a timed delay
void INTTIM()
{
    
asm("
    di                   /* Disable interrupts             */
    add -4, r3           /* Increment sp by register size  */
    st.w r2, 0 [r3]      /* Store the contents of r2 in sp */
    movhi 0x0500, r0, r1 /* Put address of timer val in r1 */
    movea 0x0008, r1, r1 /*                                */
    ld.w 0 [r1], r2      /* Load timer value into r2       */
    add 1, r2            /* Increment timer value by 1     */
    st.w r2, 0 [r1]      /* Store timer value back in ram  */
    ld.w 0 [r3], r2      /* Retrieve previous r2 from sp   */
    add 4, r3            /* Set sp back to previous value  */
    ld.w 0 [r3], r1      /* Retrieve previous r1 from sp   */
    add 4, r3            /* Set sp back to previous value  */
    ei                   /* Re-enable interrrupts          */
    reti                 /* Return from interrupt          */
    "
);
    
    return;
}

// Timer Initialisation
// Create a timed delay
void InitTimer()
{
    
HW_REGS[THR] = 0x00// THR, timer duration value high byte
    
HW_REGS[TLR] = 0x09// TLR, timer duration value low byte
    
HW_REGS[TCR] = HW_REGS[TCR] & ~TIMER_20US// T-Clk-Sel = 0, 100uS delay
    
HW_REGS[TCR] = HW_REGS[TCR] | TIMER_INT;   // Tim-Z-Int = 1, enable interrupt
    
HW_REGS[TCR] = HW_REGS[TCR] | TIMER_ENB;   // T-Enb = 1, turn on timer
    
    
return;
}


Hope this is some help. I haven't touched this since the early days (it was made just after the timer was figured out IIRC), so it probably doesn't work anymore.
Top

Topic | Forum


#32
Re: Clock Demo
Posted on: 2006/9/7 15:16
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
...Game engine?

Did I miss something?...
Top

Topic | Forum


#33
Re: Destroy My Virtual Boy
Posted on: 2006/8/12 12:38
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
$50? You could have bought a copy of Jack Bros or Waterworld for that.

...And $250? Wheres he buying it from? Toys 'R' Us way back in 1995?
Top

Topic | Forum


#34
Re: Inquiry: Irrepairable VBs
Posted on: 2006/8/6 13:42
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
How would that work? Besides the eyeholes, the rest of the case is opaque.


I don't have any dead VBs, however I would be interested in the internals (functional preferred) should you come across a complete unit.
Top

Topic | Forum


#35
Re: flashcart for sale??
Posted on: 2006/7/30 11:47
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
You've pretty much included all I've thought of over the years.


Only thing I can think of is releasing your code so we can all make custom skins/OSs.
Top

Topic | Forum


#36
Re: Project:VB back online! And fix your glitchy displays
Posted on: 2006/7/18 12:13
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
Excellent!

With both our (and RunnerPack's) sites offline, a lot of the little stuff that PVB doesn't cover was unavailable.


I've worked a little on my site, but unfortunately I've run out of holidays and it may be even longer before I can get to work on it more.
Top

Topic | Forum


#37
Re: vb dev wiki?
Posted on: 2006/7/6 7:16
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
Sounds good.

I also have to rely on DT's prog doc.
I keep losing my IRC logs of VB stuff I've gained over the years.
Top

Topic | Forum


#38
Re: Question/concern
Posted on: 2006/7/6 7:15
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
This is a common problem.

Over time the glue holding the display cables to the board seems to separate.
DogP is offering a service to reglue the cables. There should be some threads about it somewhere on this forum.
Top

Topic | Forum


#39
Re: PVB v3
Posted on: 2006/7/2 13:32
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
I have a similar problem.

Not with the background image, but with the whole red screen thing (not that I don't like it ).
During the daytime I have to select the text to be able to see it.
Top

Topic | Forum


#40
Re: flashcart for sale??
Posted on: 2006/6/30 10:28
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (9 Years) DonatorApp Coder
4x2 for the link port, and a row each side to fit the port.
Top

Topic | Forum




You are not logged in.
Lost Password?
Register Resend Activation