|
Markus L. Noga <markus@noga.de> wrote:
> I'm currently implementing LNP. As a first demo application, I just
> finished a quad-speed firmware downloader. If you're using replacement
> firmware, maybe this will be of use to you.
Just for the record, I implemented a dual-speed downloader a few months ago
and mailed John Tamplin with information about it with regards to the JVM
port that seems to have died.
I used a different strategy to hack the dual speed downloads. My
dual-speed download used a much shorter firmware stub that simply
reinitialized the ROM to use a double baud rate. My stub required only 72
bytes as opposed to the 992 required for the implementation Markus
released, considerably reducing the overhead of using fast downloading.
It might be possible to eliminate the checksums to coerce my version to do
quad-speed downloads, but I'd need to review the checksum settings used by
the ROM to be sure, since my notes indicate that some of the alternate ROM
checksum modes are broken. Markus, if you want to compare notes, I have
attached my double-rate firmware stub. After downloading this using
firmdl, I used a hacked firmdl with a double baud rate to do the real
firmware download, i.e. firmdl fastdl.srec; firmdl2 calc.srec.
One thing I noticed was that double-rate downloads were sensitive to
lighting conditions and did not work reliably under all conditions. Did
you find this also, Markus?
-Kekoa
---
/*
* fastdl.s
*
* A hack so to get the ROM running in a state with a doubled serial
* baud rate, at least until it is turned off and back on again.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Librcx code, released February 9, 1999.
*
* The Initial Developer of the Original Code is Kekoa Proudfoot.
* Portions created by Kekoa Proudfoot are Copyright (C) 1999
* Kekoa Proudfoot. All Rights Reserved.
*
* Contributor(s): Kekoa Proudfoot <kekoa@graphics.stanford.edu>
*/
.lsym rom_init_handlers, 0x0688
.lsym init_timer, 0x3b9a
.lsym rom_main_loop_state, 0xee5e
.lsym rom_dispatch_struct, 0xee64
.lsym rom_counter_struct, 0xee74
.lsym rom_power_off_minutes, 0xee80
.lsym rom_update_function_state, 0xef06
.global __start
__start:
; Set up as if ROM were waking RCX up
mov.w #15,r6
mov.w r6,@rom_power_off_minutes
mov.w #rom_dispatch_struct,r6
push r6
mov.w #rom_counter_struct,r6
jsr @init_timer
adds.w #2,r7
mov.w #rom_main_loop_state,r6
jsr @rom_init_handlers
; Double the baud rate
mov.b #103,r6l
mov.b r6l,@0xd9:8
; Hack the update function state so we don't hear two beeps
mov.b #2,r6l
mov.b r6l,@rom_update_function_state
; Hack the main loop state so we reenter ROM main loop correctly
mov.b #13,r6l
mov.b r6l,@rom_main_loop_state
; Return control back to ROM
rts
; String needed for new firmware
.string "Do you byte, when I knock?"
|
|
Message has 2 Replies:
Message is in Reply To:
19 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|