From fc35032a9dcc54523dd88fc8e3026dd9e4172c95 Mon Sep 17 00:00:00 2001 From: jbo_85 <> Date: Sun, 16 Oct 2005 12:40:20 +0000 Subject: [PATCH] Get_Date returns correct year now. --- zsnes/src/linux/sdlintrf.asm | 9 ++++++++- zsnes/src/win/winintrf.asm | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/zsnes/src/linux/sdlintrf.asm b/zsnes/src/linux/sdlintrf.asm index e86c4f62..c7957328 100644 --- a/zsnes/src/linux/sdlintrf.asm +++ b/zsnes/src/linux/sdlintrf.asm @@ -339,7 +339,14 @@ NEWSYM Get_Date and al,0xF ;Remove first BCD digit add dl,al ;Add second digit to first*10 mov dh,ah ;Copy month - ;Year still isn't done yet, although I don't think we use it anywhere -Nach + ;Year Calculation + shr eax,16 + movzx ecx,al + shr ecx,4 + imul ecx,10 + and al,0xF + add cl,al + add cx,1900 ret NEWSYM Get_File_Date diff --git a/zsnes/src/win/winintrf.asm b/zsnes/src/win/winintrf.asm index ab0bec49..4b6ed3ec 100644 --- a/zsnes/src/win/winintrf.asm +++ b/zsnes/src/win/winintrf.asm @@ -380,7 +380,14 @@ NEWSYM Get_Date and al,0xF ;Remove first BCD digit add dl,al ;Add second digit to first*10 mov dh,ah ;Copy month - ;Year still isn't done yet, although I don't think we use it anywhere -Nach + ;Year Calculation + shr eax,16 + movzx ecx,al + shr ecx,4 + imul ecx,10 + and al,0xF + add cl,al + add cx,1900 ret NEWSYM Get_File_Date