Trustkill, nice try, but you're wrong... lalo used the selectable patch (there is no permament version of this), there's only a difference because he changed the "set sound number" command to another value. When value is higher than 0x0F the command uses four instead of two bytes. (E0xC becomes to E6FCxx00, where x/xx is your sound number).
So, if you all want to use the version, lalo posted in "Flash patches" thread, it will be fine.
@lalo.lerry: Here's the commented source of hourly beep patch.
Code:
C7DC40: extp #0Eh, #01h
C7DC44: movb r8, 03A42h ; rl4 = [03BA42h] (application menu selection)
C7DC48: extp #0Dh, #01h
C7DC4C: mov r2, 025DCh ; minute value (r2 = [0365DCh])
C7DC50: jnb r4.6, back ; bit r4.6 is zero --> patch not selected
C7DC54: cmp r2, #00h ; do we have minutes = 00?
C7DC56: jmpr cc_NZ, writeOne ; no -> write "1" to flag position
C7DC58: extp #011h, #01h ; yes, then read flag:
C7DC5C: movb r8, 03840h ; rl4 = [047840h]
C7DC60: cmpb rl4, #01h ; flag = #01h ?
C7DC62: jmpr cc_NZ, back ; =00h, we had already beep this hour --> back
C7DC64: mov r12, #01h ; tone number
C7DC68: calls 0C3h, loc_C300B6 ; play tone
;------------------------------------------------------------
C7DC6C: mov r4, #00h ; r4 = #00h, set flag: we had had a beep this 00-minute
C7DC6E: jmpr cc_UC, writeFlag ; -> write flag
writeOne:
C7DC70: mov r4, #01h ; r4 = #01h: we had no beep this hour
writeFlag:
C7DC72: extp #011h, #01h
C7DC76: movb 03840h, r8 ; [047840h] = rl4 = beep flag
back:
C7DC7A: sub r0, #0Ch ; old command from fubu and
C7DC7E: rets ; back to firmware
;------------------------------------------------------------
I presume that the patch is called every second. Then you can change for example these bytes and have tone in every call:
C7DC54: jmpr cc_UC, #07h
or
0x27DC54: FFFF 0D07