Post Reply 
Sparcom General Chemistry Application Pac
08-15-2023, 03:20 PM
Post: #12
RE: Sparcom General Chemistry Application Pac
This is what I did with the Celestial Navigation Pac that was a ROM image, I wrote a simple BASIC program that modifies the original file, it separates each byte in two nibbles (of course, you can use whatever language you feel comfortable with)

Code:

REM This is a QB64 routine that changes HP48 dump format, from usual two nibbles/byte to one nibble/byte
REM Example: 62 2b b0 -> 02 06 0b 02 00 0b
REM the source should be called nav.bin, the destination nav2.bin or change the names and length below.   


Dim A%%, B%%
Open "nav.bin" For Binary As #1
Open "nav2.bin" For Binary As #2
For n = 1 To 131072
    Get #1, , A%%
    B%% = A%% And &H0F
    Put #2, , B%%
    A%% = (A%% And &HF0) / &H10   REM: shift original byte one nibble to the right
    Put #2, , A%%
Next n
Close 1, 2

Then you should go to the emulator (file/settings/memory) and point port2 file to your converted file, probably it shouldn't matter but I'd mark it nonwritable. Finally do a ON-C to attach.

Hope it works for you.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Sparcom General Chemistry Application Pac - acapde - 08-15-2023 03:20 PM



User(s) browsing this thread: 2 Guest(s)