MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

palindrome
MAME Fan
Reged: 05/15/09
Posts: 14
Loc: NSW, Australia
Send PM
Aristocrat Mark 4 - need help with DS1302
05/18/09 03:10 PM Attachment: enchanted forest2.JPG 167 KB (4 downloads)


I've started a preliminary driver for the above platform and have a game up and running. I am currently working on the RTC, the board uses a DS1287 Dallas RTC chip.

There is a PIA-6821 adapter which provides various output signals to other devices including the RTC. I've discovered the address mapping for the RTC 0x5380 - 0x5381. If I simply just return 0x01 from my read_handler it sets the time,date and year to 01:01:01 01 JAN 01.

I may need to implement a proper handler for the RTC so that the random number generator will generate the correct reel stops.

MAME has a ds1302 driver but I have no idea how to use it and nobody seems to be using it for anything.

Available functions are.

extern void DS1302_RST(UINT8 val);
extern void DS1302_DAT(UINT8 val);
extern void DS1302_CLK(running_machine *machine, UINT8 val);
extern UINT8 DS1302_RD(void);

I could always get the time/date from the PC system and return that from my read handler but I guess that is almost cheating ?

Would appreciate any input.

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment

Edited by palindrome (05/18/09 04:00 PM)







Entire thread
Subject Posted by Posted on
* Aristocrat Mark 4 - need help with DS1302 palindrome 05/18/09 03:10 PM
. * Re: Aristocrat Mark 4 - need help with DS1302 Sune  06/22/09 08:36 AM
. * Re: Aristocrat Mark 4 - need help with DS1302 byuu  05/21/09 01:18 AM
. * Re: Aristocrat Mark 4 - need help with DS1287 palindrome  05/28/09 11:48 AM
. * Re: Aristocrat Mark 4 - need help with DS1302 R. Belmont  05/19/09 01:25 AM
. * Re: Aristocrat Mark 4 - need help with DS1302 palindrome  05/19/09 03:58 PM
. * Re: Aristocrat Mark 4 - need help with DS1302 R. Belmont  05/20/09 08:13 PM
. * Re: Aristocrat Mark 4 - need help with DS1287 palindrome  05/28/09 11:51 AM

Extra information Permissions
Moderator:  Pi 
0 registered and 4 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4698