To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 149
148  |  150
Subject: 
Re: fast firmware downloader
Newsgroups: 
lugnet.robotics.rcx.legos, lugnet.robotics.rcx
Date: 
Sun, 3 Oct 1999 07:18:44 GMT
Viewed: 
722 times
  
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:
  RE: fast firmware downloader
 
(...) This is what I like so much about the "Extreme Team"...usually more than one way to skin a cat. I must have missed those posts, Kekoa. I try to use as much as possible of the ROM code in the brick too. The next step for pbFORTH is to link (...) (25 years ago, 3-Oct-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx)
  Re: fast firmware downloader
 
(...) Oops, I meant complements, not checksums, throughout the above paragraph. After reviewing my notes, it seems that the ROM properly obeys the complement flag when receiving but not when sending. When the ROM is sending a "long" message, it (...) (25 years ago, 3-Oct-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx)

Message is in Reply To:
  fast firmware downloader
 
Hi, 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. (URL) you at MindFest, Markus. (25 years ago, 3-Oct-99, to lugnet.robotics.rcx.legos, lugnet.robotics.rcx)

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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR