summaryrefslogtreecommitdiff
path: root/apps/codecs/spc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/spc.c')
-rw-r--r--apps/codecs/spc.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c
index 12b236c53d..1cf20098fa 100644
--- a/apps/codecs/spc.c
+++ b/apps/codecs/spc.c
@@ -671,14 +671,31 @@ static int LoadID666(unsigned char *buf) {
671 ID666.emulator=*ib; 671 ID666.emulator=*ib;
672 ib++; 672 ib++;
673 } else { 673 } else {
674 int year, month, day;
675 unsigned long tmp; 674 unsigned long tmp;
676 char buf[64]; 675 char buf[64];
677 676
678 DEBUGF("text tag detected\n"); 677 DEBUGF("text tag detected\n");
679 678
680 year=month=day=0; 679 memcpy(buf, ib, 2);
681 ib+=11; 680 buf[2] = 0;
681 tmp = 0;
682 for (i=0;i<2 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0';
683 ID666.month = tmp;
684 ib+=3;
685
686 memcpy(buf, ib, 2);
687 buf[2] = 0;
688 tmp = 0;
689 for (i=0;i<2 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0';
690 ID666.day = tmp;
691 ib+=3;
692
693 memcpy(buf, ib, 4);
694 buf[4] = 0;
695 tmp = 0;
696 for (i=0;i<4 && buf[i]>='0' && buf[i]<='9';i++) tmp=tmp*10+buf[i]-'0';
697 ID666.year = tmp;
698 ib+=5;
682 699
683 memcpy(buf, ib, 3); 700 memcpy(buf, ib, 3);
684 buf[3] = 0; 701 buf[3] = 0;
@@ -861,6 +878,8 @@ enum codec_status codec_main(void)
861 ci->id3->title = ID666.song; 878 ci->id3->title = ID666.song;
862 ci->id3->album = ID666.game; 879 ci->id3->album = ID666.game;
863 ci->id3->artist = ID666.artist; 880 ci->id3->artist = ID666.artist;
881 ci->id3->year = ID666.year;
882 ci->id3->comment = ID666.comments;
864 883
865 reset_profile_timers(); 884 reset_profile_timers();
866 } 885 }