Shop OBEX P1 Docs P2 Docs Learn Events
P2 Rom listing — Parallax Forums

P2 Rom listing

Is there source code for the P2 rom contend? Or part of it?

Comments

  • cgraceycgracey Posts: 14,151

    Yes, but I think it is not in the zip files, lately. I will start adding it in again and I'll post it here, too, in about an hour.

  • I've been getting my versions mixed up but this one checks out.

  • Thanks Peter & Chip

  • cgraceycgracey Posts: 14,151

    Thanks, Peter.

  • Peter, thank you for all those files with listings and binaries. Evanh, the website (github) has some missing files (for v32i).

    Main differences between those versions:

    (Note: v33k has much less size (bytes) due to use of tabs instead of spaces but only 12 lines changed)

    $ ls -ltra
      301952 Feb 19  2019 P2ROM_v33h.spin2
      434366 Feb 19  2019 p2rom_v33h.lst
     1048512 Feb 19  2019 p2rom_v33h.bin
      284842 Dec 31  2019 ROM_Booter_v33k.spin2
    
    $ sha1sum.exe *
    f3747f930771b52d08a03fb76863b72c0ef18a18 *P2ROM_v33h.spin2
    70ed94af9fe662145eec30cb9108ecc65951292f *p2rom_v33h.bin
    5df945a31959cd53a5099d6b564e74f2c644512f *p2rom_v33h.lst
    ae4e5cbf3838cd15d11322c4105e6ca8b122c0f5 *ROM_Booter_v33k.spin2
    
    $ md5sum *
    4d58507ddc3f976904bfd7ffb6e5414b *P2ROM_v33h.spin2
    6c62ac4a20ae0a107af3b99cb4f48527 *p2rom_v33h.bin
    748efc968b01ce4fcc640dfaacd436ec *p2rom_v33h.lst
    ff5746137fa9d7bf8711bf17eba7f587 *ROM_Booter_v33k.spin2
    

    How can we dump the ROM? I am thinking three ways:

    • One option might be the ROM monitor,
    • another option TAQOZ,
    • and another option some spin code to send to print into serial output?
  • evanhevanh Posts: 15,914

    Well, you can examine the running live ROM code in hubRAM after boot, via Taqoz/Monitor/whatever, but I don't think there is a way to re-extract from the ROM itself. I think it vanishes after the initial COGINIT. One special case for Cog0 only.

    The initial copy is placed in the last 16 KB of hubRAM ($fc000 .. $fffff) - https://forums.parallax.com/discussion/comment/1520358/#Comment_1520358

  • I will check those differences in the files to see what's happened but I checked the listing against the actual ROM contents since the ROM is copied to $FC000 and TAQOZ ROM doesn't touch this area (or $7C000) so that it is still intact.

    TAQOZ# $FC240 $40 DUMP --- 
    FC240: 26 00 00 FF  26 00 00 77  00 00 00 00  70 6F 72 50     '&...&..w....porP'
    FC250: 6B 68 43 5F  6B 6C 43 5F  78 65 48 5F  74 78 54 5F     'khC_klC_xeH_txT_'
    FC260: 0D 0A 50 72  6F 70 5F 56  65 72 20 47  0D 0A 00 00     '..Prop_Ver G....'
    FC270: 2E 00 00 00  50 72 6F 70  00 00 00 00  00 00 FF 03     '....Prop........' ok
    TAQOZ# $7C240 $40 DUMP --- 
    7C240: 26 00 00 FF  26 00 00 77  00 00 00 00  70 6F 72 50     '&...&..w....porP'
    7C250: 6B 68 43 5F  6B 6C 43 5F  78 65 48 5F  74 78 54 5F     'khC_klC_xeH_txT_'
    7C260: 0D 0A 50 72  6F 70 5F 56  65 72 20 47  0D 0A 00 00     '..Prop_Ver G....'
    7C270: 2E 00 00 00  50 72 6F 70  00 00 00 00  00 00 FF 03     '....Prop........' ok
    
  • I think that there should be no issue. I was comparing rev. A to rev. B. Reading the ROM is just some learning exercise.

  • Cluso99Cluso99 Posts: 18,069
    edited 2021-04-26 03:57

    I'll post my list version(s) when I get home tonight.
    IIRC there were some last minute changes and a rush to get the code to OnSemi, so the three of us (Chip, Peter and I) had to combine our blocks together quickly.

    There is no difference in Versions B & C.
    Versions A to B had some minor tweeks by Chip, TAQOZ has some good extras added, and the SD boot code had a few tweeks to fix the DO release problem. The Monitor did not change, and it's position remained static in the ROM.

  • Yes, I would get Chip's and Ray's code and run them through with all my individual build files through an M4 preprocessor and then through Dave Hein's p2asm and loadp2 so I could get a proper listing to check the mapping etc. Then I would load it onto my CVA9 board that was plugged into another board with all the test stuff on it and with Flash and an SD socket then also verify the timings with a scope etc. I would then shoot the combined and processed files back to Chip and Ray to check.
    Chip didn't have any SD on his board.
    I have a feeling that the last version was an "i" but ended up labelled as "g" in the code.

  • evanhevanh Posts: 15,914

    Here's comments section, post-v32, from ROM_Booter_v33k.spin2

    '' RR20190215  v33_01a  ROM_Booter_v33_01a.spin - tweek SD Booter
    '' RR20190216        b  force release of SD-DO pin (& tweek to make space)
    '' RR20190217        f  combine _SDcard_Init & _readMBR --> Init/CSD/CID/MBR/VOL/FSI/FAT etc
    '' PBJ
    '' RR20190219        h  remove SD_CS pull-up check for Start_SDcard (ROM booter)
    '                    i  fix timeout bug
    '                    j  use "G" for Prop2 silicon v2 (for Prop_Chk response)
    

    and the version string

    CON
    '   ver     =   "A"     'Prop123-A9 / BeMicro-A9, 8 cogs, 64 smart pins
    '   ver     =   "B"     'DE2-115
    '   ver     =   "C"     'DE0-Nano / DE0-Nano Bare
    '   ver     =   "D"     'BeMicro-A2
    '   ver     =   "E"     'Prop123-A7
    '   ver     =   "F"     'Prop123-A9 / BeMicro-A9, 16 cogs, 12 smart pins
        ver     =   "G"     'Prop2 Silicon v2
    
  • Cluso99Cluso99 Posts: 18,069

    These are what I believe was final code for P2 Rev2 known as v33j

Sign In or Register to comment.