Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2016-10-11 20:26:41

Thermodynamic5000
New member
Registered: 2016-10-11
Posts: 1

Gameboy clock display

Hey,

I have an old Gameboy DMG that I'd love to have on display at home.

I think it would be cool to use the Gameboy as a clock.

It would be constantly running and would have a constant power supply.

Has anyone ever made something like this?

Offline

 

#2 2016-10-14 13:59:06

bbsfoo
Member
Registered: 2016-02-08
Posts: 16

Re: Gameboy clock display

you need a pokemon crystal

Offline

 

#3 2016-10-16 06:15:14

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: Gameboy clock display

Thermodynamic5000 wrote:

Hey,

I have an old Gameboy DMG that I'd love to have on display at home.

I think it would be cool to use the Gameboy as a clock.

It would be constantly running and would have a constant power supply.

Has anyone ever made something like this?

It can be done, just make the gameboy draw the numbers and then use the screen refresh rate to add seconds to the clock, I think the screen has 60 Hz, it refreshes 60 times /second.

This program will count seconds:

Code:

int TIM = 0;
int SEC = 0;

void main()
{
    while(1)
    {
        if (TIM == 60){ ;
            printf("SECONDS: %u\n", SEC); 
            SEC+=1;
            TIM = 0;
        }
        TIM++;
        wait_vbl_done();    
    }        
}

Offline

 

#4 2016-10-16 07:42:05

AntonioND
Member
Registered: 2014-06-17
Posts: 134
Website

Re: Gameboy clock display

Actually, it's 59.7275 Hz, which is about 0.5% slower than 60 Hz. That means that every 200 sec (about 3 min and a half) the GB clock would be delayed 1 sec. I don't know if that's a clock I'd like to use. However, by using the timer interrupt it MAY be accurate enough to be used this way, I have no idea about how accurate the system clock is.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson