Skip to content

Commit

Permalink
2005-07-13 1.03c
Browse files Browse the repository at this point in the history
----------------
- Add the CT60_BOOT_LOG parameter in flash for writes to boot.log the stdout of the AUTO folder files (file sdram.S).
- Add memvalid, memval2, memval3 test for the SDRAM init (files sdram.S and init_par.S).
- Fix for negative temperature (file xbios2.S).
- Fix CTCM frequency error (file sdram.S).
  • Loading branch information
Didier Méquignon committed Jul 12, 2005
1 parent 2b7fb36 commit 1eb9075
Show file tree
Hide file tree
Showing 29 changed files with 1,439 additions and 1,175 deletions.
Binary file modified MagiC/auto/ct60xbio.prg
Binary file not shown.
Binary file modified cpx/ct60conf.cpx
Binary file not shown.
Binary file added cpx/resetnvm/resetnvm.prg
Binary file not shown.
3 changes: 3 additions & 0 deletions cpx/resetnvm/resetnvm.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resetnvm.prg
=
resetnvm.s
12 changes: 12 additions & 0 deletions cpx/resetnvm/resetnvm.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; Nvmaccess()
clr.l -(sp)
clr.w -(sp)
clr.w -(sp)
move.w #2,-(sp)
move.w #46,-(sp)
trap #14
lea.l 12(sp),sp

; Pterm0
clr.w -(sp)
trap #1
2 changes: 2 additions & 0 deletions cpx/src/ct60conf.cpx/ct60.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define CT60_CACHE_DELAY 2L
#define CT60_BOOT_ORDER 3L
#define CT60_CPU_FPU 4L
#define CT60_BOOT_LOG 5L
#define CT60_SAVE_NVRAM_1 7L
#define CT60_SAVE_NVRAM_2 8L
#define CT60_SAVE_NVRAM_3 9L
Expand All @@ -25,6 +26,7 @@ typedef struct
unsigned short timestop;
unsigned short speed_fan;
unsigned long cpu_frequency; /* in MHz * 10 */
unsigned short beep;
} CT60_COOKIE;

#define ct60_read_core_temperature(type_deg) (long)xbios(0xc60a,(short)type_deg)
Expand Down
381 changes: 243 additions & 138 deletions cpx/src/ct60conf.cpx/ct60conf.c

Large diffs are not rendered by default.

35 changes: 21 additions & 14 deletions cpx/src/ct60conf.cpx/ct60temp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* CT60 TEMPerature - Pure C */
/* Didier MEQUIGNON - v1.03b - April 2005 */
/* Didier MEQUIGNON - v1.03c - June 2005 */

#include <portab.h>
#include <tos.h>
Expand Down Expand Up @@ -87,7 +87,7 @@ int MT_form_xalert(int fo_xadefbttn,char *fo_xastring,long time_out,void (*call)
void (*function)(void);
int test_stop(unsigned long daytime,unsigned int daystop,unsigned int timestop);
int dayofweek(int year,int mon,int mday);
void bip(void);
void beep_psg(unsigned int beep);
void SendIkbd(int count, char *buffer);
void stop_60(void);
int read_temp(void);
Expand Down Expand Up @@ -190,7 +190,7 @@ int main(int argc,const char *argv[])
{
register int i,temp;
unsigned long daytime;
unsigned int time,trigger_temp,daystop,timestop;
unsigned int time,trigger_temp,daystop,timestop,beep;
int temp_id,app_id=-1,app_sid,app_stype,flag_cpuload,event,ret,end=0,count=0,count_mn=0,loops=1,stop,cpu_060,flag_msg=0;
unsigned long ticks,run_ticks,start_ticks,new_ticks,sum_ticks=0;
long uptime,load,old_load=0,load_avg=0,load_avg_mn=0,delay=ITIME,avenrun[3]={0,0,0};
Expand All @@ -215,6 +215,7 @@ int main(int argc,const char *argv[])
COOKIE *p;
MX_KERNEL *mx_kernel;
trigger_temp=daystop=timestop=0;
beep=1;
if(_app)
{
if(argc>1)
Expand All @@ -223,6 +224,8 @@ int main(int argc,const char *argv[])
daystop=(unsigned int)atoi(argv[2]);
if(argc>3)
timestop=(unsigned int)atoi(argv[3]);
if(argc>4)
beep=(unsigned int)atoi(argv[4])&1;
}
else
{
Expand All @@ -234,6 +237,7 @@ int main(int argc,const char *argv[])
trigger_temp=(unsigned int)ct60_arg->trigger_temp;
daystop=(unsigned int)ct60_arg->daystop;
timestop=(unsigned int)ct60_arg->timestop;
beep=(unsigned int)ct60_arg->beep;
}
}
}
Expand Down Expand Up @@ -382,7 +386,7 @@ int main(int argc,const char *argv[])
stop=test_stop(daytime,daystop,timestop);
if(stop && !old_stop)
{
bip();
beep_psg(beep);
if(!start_lang)
ret=MT_form_xalert(1,"[2][ATTENTION !|Arrˆt programm‚ de votre|ordinateur dans 30 secondes ?][OK|Annuler]",ITIME*30L,0L,myglobal);
else
Expand All @@ -391,7 +395,7 @@ int main(int argc,const char *argv[])
{
if(myglobal[0]>=0x399) /* version AES */
MT_shel_write(SHW_SHUTDOWN,1,0,"","",myglobal); /* send AP_TERM to all applications */
for(i=0;i<10;bip(),evnt_timer(ITIME),i++);
for(i=0;i<10;beep_psg(beep),evnt_timer(ITIME),i++);
if(!start_lang)
MT_form_xalert(1,"[1][ATTENTION !|Arrˆt de votre ordinateur...][]",ITIME*5L,stop_60,myglobal);
else
Expand All @@ -414,7 +418,7 @@ int main(int argc,const char *argv[])
}
if(temp>(MAX_TEMP-5) && ticks-run_ticks>=(5000UL/CLOCKS_PER_SEC))
{
bip();
beep_psg(beep);
if(!start_lang)
sprintf(mess_alert,"[3][ATTENTION !|Votre 060 est trop chaud: %d øC|La destruction est … %d øC|Arrˆt du microprocesseur dans 10 S|aprŠs ce message !][OK]",temp,MAX_TEMP);
else
Expand All @@ -424,7 +428,7 @@ int main(int argc,const char *argv[])
MT_shel_write(SHW_SHUTDOWN,1,0,"","",myglobal); /* send AP_TERM to all applications */
if(_app)
end=1;
for(i=0;i<10;bip(),evnt_timer(ITIME),i++);
for(i=0;i<10;beep_psg(beep),evnt_timer(ITIME),i++);
if(!start_lang)
sprintf(mess_alert,"[3][ATTENTION !|Votre 060 est trop chaud: %d øC|La destruction est … %d øC| |SystŠme Arrˆt‚ ! ][]",temp,MAX_TEMP);
else
Expand Down Expand Up @@ -485,9 +489,10 @@ int main(int argc,const char *argv[])
| (((unsigned short)(eiffel_temp[2]&1))<<15);
}
old_time=time;
if(temp > trigger_temp && temp <= MAX_TEMP && ticks-run_ticks>=(5000UL/CLOCKS_PER_SEC))
if(trigger_temp && temp > trigger_temp && temp <= MAX_TEMP
&& ticks-run_ticks>=(5000UL/CLOCKS_PER_SEC))
{
bip();
beep_psg(beep);
if(!start_lang)
sprintf(mess_alert,"[3][ATTENTION !|Votre 060 est trop chaud: %d øC|La destruction est … %d øC|Arrˆtez votre ordinateur !][OK]",temp,MAX_TEMP);
else
Expand Down Expand Up @@ -543,11 +548,11 @@ int main(int argc,const char *argv[])
}
if(!start_lang)
sprintf(mess_alert,
"[0][ CT60 TEMPERATURE |V1.03b MEQUIGNON Didier 04/2005| |Temp.: %d øC Seuil: %d øC |Lien avec processus %d %s][OK]",
"[0][ CT60 TEMPERATURE |V1.03c MEQUIGNON Didier 06/2005| |Temp.: %d øC Seuil: %d øC |Lien avec processus %d %s][OK]",
temp,trigger_temp,app_id,app_name);
else
sprintf(mess_alert,
"[0][ CT60 TEMPERATURE |V1.03b MEQUIGNON Didier 04/2005| |Temp.: %d øC Threshold: %d øC |Link with process %d %s][OK]",
"[0][ CT60 TEMPERATURE |V1.03c MEQUIGNON Didier 06/2005| |Temp.: %d øC Threshold: %d øC |Link with process %d %s][OK]",
temp,trigger_temp,app_id,app_name);
MT_form_xalert(1,mess_alert,ITIME*10L,0L,myglobal);
break;
Expand All @@ -560,6 +565,7 @@ int main(int argc,const char *argv[])
trigger_temp=(unsigned int)message[3];
daystop=(unsigned int)message[4];
timestop=(unsigned int)message[5];
beep=(unsigned int)message[6];
if(avenrun[0]>=0)
load=avenrun[0];
else
Expand Down Expand Up @@ -1016,13 +1022,14 @@ int dayofweek(int year,int mon,int mday)
return(doe %7);
}

void bip(void)
void beep_psg(unsigned int beep)

{
static unsigned char tab_bip[] = {
static unsigned char tab_beep[] = {
0,0xA0,1,0,2,0,3,0,4,0,5,0,6,0,7,0xFE,8,13,9,0,10,0,0xFF,10,
0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0xFF,8,0,9,0,10,0,0xFF,0 };
Dosound(tab_bip);
if(beep)
Dosound(tab_beep);
}

void SendIkbd(int count, char *buffer)
Expand Down
6 changes: 3 additions & 3 deletions cpx/src/ct60conf.cpx/ct60xbio.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* CT60 XBIOS - Pure C */
/* Didier MEQUIGNON - March 2005 */
/* Didier MEQUIGNON - June 2005 */

#include <tos.h>
#include <stdio.h>
Expand Down Expand Up @@ -53,9 +53,9 @@ int main(void)
}
Cconws("\r\n\n");
Cconout(27);
Cconws("p XBIOS CT60 v1.03b ");
Cconws("p XBIOS CT60 v1.03c ");
Cconout(27);
Cconws("q March 2005\r\n");
Cconws("q June 2005\r\n");
if(((p=get_cookie('_MCH'))==0) || (p->v.l!=0x30000) /* Falcon */
#ifndef TEST
|| ((p=get_cookie('_CPU'))==0) || (p->v.l!=0x3C) /* 68060 */
Expand Down
3 changes: 1 addition & 2 deletions cpx/src/ct60conf.cpx/temp.s
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ ct4: clr.l _texas_tlv0831_clk_high ;clk=1
moveq #0,D0 ;read
jsr ct60_rw_param
add.l D3,D0 ;offset
cmp.w #MES_TEMP_ERROR,D0 ;error
beq.s ct3
bmi.s ct5
cmp.w #MES_TEMP_0,D0
bcs.s ct5
cmp.w #MES_TEMP_25,D0
Expand Down
Binary file modified doc/english/ct60.hyp
Binary file not shown.
Binary file modified doc/english/ct60.ref
Binary file not shown.
7 changes: 5 additions & 2 deletions doc/english/ct60.u
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!title Documentation of the
!programimage ..\img\ct60.img
!program CT60
!version Version 1.03b
!version Version 1.03c
!date (!today)
!author Didier MEQUIGNON
!street 25, rue de l'Ascenseur
Expand Down Expand Up @@ -637,7 +637,7 @@ logo copied at the top of the ST-RAM (needed if the TOS in ROM is a 4.02).
!item The replacement of the XBIOS Bconout routine (display texts).
!item The picture in 65K colors displayed during 2 seconds.
!item Check and fix the modecode get from NVM.
!item Check and set the serial programmable clock with a CY27EE16 (I2C port).
!item Check and set the serial programmable clock (I2C port).
!item The display of the 68060's type (revision, mask and frequency).
!item The modification of PCR for the bugged types revision 1.
!item The reading and the display of the SDRAM's type from his EEPROM.
Expand All @@ -664,6 +664,7 @@ displayed.
!item Add speed test for bootables devices.
!end_itemize
!item The patch for the boot menu.
!item The displays redirection of the AUTO programs to a file boot.log.
!item The patch for the Pexec function for the copyback (cpush after the
relocation).
!item The blitter patchs of the VDI functions, vro_cpyfm, vr_trnfm, and
Expand Down Expand Up @@ -1733,6 +1734,7 @@ ST-RAM and the SDRAM).
!item Set the transfer of TOS 4.0x in RAM with using of the PMMU.
!item Under TOS, remove the caches during 5 seconds when a program is
started or remove the copyback alert box.
!item Redirect displays of the AUTO folder's programs to a file boot.log.
!end_itemize


Expand Down Expand Up @@ -1764,6 +1766,7 @@ At this page you can :
!begin_itemize
!item Select the mode of the stop programmed after a shutdown procedure.
!item Enter the time if the mode of stop is actived.
!item Enable the alarm beep for the stop procedure.
!end_itemize


Expand Down
Binary file modified doc/french/cpx4.img
Binary file not shown.
Binary file modified doc/french/cpx5.img
Binary file not shown.
Binary file modified doc/french/ct60.hyp
Binary file not shown.
Binary file modified doc/french/ct60.ref
Binary file not shown.
8 changes: 5 additions & 3 deletions doc/french/ct60.u
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!title Documentation de la
!programimage ..\img\ct60.img
!program CT60
!version Version 1.03b
!version Version 1.03c
!date (!today)
!author Didier MEQUIGNON
!street 25, rue de l'Ascenseur
Expand Down Expand Up @@ -654,8 +654,7 @@ en ROM est un 4.02).
!item Le remplacement de la routine d'affichage de texte du BIOS.
!item Une image en 65K couleurs affich�e pendant 2 secondes.
!item Contr�le et correction du modecode obtenu de la NVM.
!item Contr�le et initialisation d'une horloge programmable s�rielle avec
un CY27EE16 (port I2C).
!item Contr�le et initialisation d'une horloge programmable s�rielle (port I2C).
!item L'affichage du type de 68060 (r�vision, masque et fr�quence).
!item La modification du PCR pour les mod�les bugg�s r�vision 1.
!item La lecture et l'affichage du type de SDRAM via sa EEPROM.
Expand All @@ -682,6 +681,7 @@ MSDOS et recherche un *.SYS pour charger le driver de disques.
!item Test de vitesse pour les disques bootables.
!end_itemize
!item Le patch pour le menu de boot.
!item La redirection de l'affichage des programmes AUTO vers un fichier boot.log.
!item Le patch de la fonction Pexec pour le copyback (cpush apr�s la
relocation).
!item Les patchs blitter des fonctions VDI, vro_cpyfm, vr_trnfm, et
Expand Down Expand Up @@ -1768,6 +1768,7 @@ besoin de beaucoup de temps si vous voulez tester la ST-RAM et la SDRAM).
PMMU.
!item Sous TOS, couper les caches pendant 5 secondes lors du lancement
d'un programme ou supprimer la boite d'alerte copyback.
!item Redirige l'affichage des programmes du dossier AUTO vers un fichier boot.log.
!end_itemize


Expand Down Expand Up @@ -1802,6 +1803,7 @@ Sur cette page vous pouvez :
!item S�l�ctionner le mode d'extinction programm�e apr�s une proc�dure
shutdown.
!item Entrer l'heure d'arr�t si le mode d'arr�t est activ�.
!item Activer le bip d'alame de la phase d'arr�t.
!end_itemize


Expand Down
Binary file modified doc/img/cpx4.img
Binary file not shown.
Binary file modified doc/img/cpx5.img
Binary file not shown.
Binary file modified flash.tos/ct60tos.bin
Binary file not shown.
9 changes: 9 additions & 0 deletions flash.tos/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,12 @@ with a CY27EE16 (file sdram.S).
- Fix rev 5 CPU display.
- Cookies moved to SDRAM (128 maxi).
- Add PSG printer patch (file magxboot.S).

2005-07-13 1.03c
----------------
- Add the CT60_BOOT_LOG parameter in flash for writes to boot.log the
stdout of the AUTO folder files (file sdram.S).
- Add memvalid, memval2, memval3 test for the SDRAM init (files sdram.S
and init_par.S).
- Fix for negative temperature (file xbios2.S).
- Fix CTCM frequency error (file sdram.S).
3 changes: 2 additions & 1 deletion flash.tos/include/ct60.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* TOS 4.04 Xbios for the CT60 board
* Didier Mequignon 2002 December, e-mail: [email protected]
* Didier Mequignon 2002-2005, e-mail: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -30,6 +30,7 @@
#define CT60_CACHE_DELAY 2
#define CT60_BOOT_ORDER 3
#define CT60_CPU_FPU 4
#define CT60_BOOT_LOG 5
#define CT60_SAVE_NVRAM_1 7
#define CT60_SAVE_NVRAM_2 8
#define CT60_SAVE_NVRAM_3 9
Expand Down
4 changes: 3 additions & 1 deletion flash.tos/include/vars.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* TOS 4.04 Xbios vars for the CT60 board
* Didier Mequignon 2002-2004, e-mail: [email protected]
* Didier Mequignon 2002-2005, e-mail: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,11 +20,13 @@
#define _VARS_H

#define etv_critic 0x404
#define memvalid 0x420
#define memctrl 0x424
#define resvalid 0x426
#define resvector 0x42A
#define phystop 0x42E
#define _memtop 0x436
#define memval2 0x43A
#define flock 0x43E
#define _bootdev 0x446
#define sshiftmd 0x44C
Expand Down
25 changes: 23 additions & 2 deletions flash.tos/src/ct60tos/init_par.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* TOS 4.04 Boot order patch for the CT60 board
* Didier Mequignon 2003 November, e-mail: [email protected]
/* TOS 4.04 Boot memory patch for the CT60 board
* Didier Mequignon 2003-2005, e-mail: [email protected]
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -27,4 +27,25 @@ begin1:
jmp init_flash_parameters
end1:

.align 2
.long 0x1B4
.long end2-begin2
begin2:
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
end2:


Loading

0 comments on commit 1eb9075

Please sign in to comment.