#159 C64 monitor: A command for saving/viewing the RAM banks also if is active the ROM

general
pending
nobody
None
new feature (Monitor)
2013-06-23
2013-06-22
Massi cadenti
No

In the VICE monitor, the Save command (S) work like SAVE command of CBM BASIC, saving only the "visible" banks to 6510. I would have a "powerful" command, saving always the RAM without changing the bank switching. Normally, if I write in (ie.) $A563, I can write in the RAM under the BASIC, but if I read $A563 (with BASIC ROM active) I'll read (and save) the BASIC data. I want to save always the RAM also under other chipset. This thing can be useful also for M (memory dump) and D (disassemble): a modified command like (ie.) SR (instead of S), or DR (instead of D), or MR (instead of M) can be really useful, without obliging the user to prior disable BASIC, KERNAL, etc..
Basically, I need a command for viewing and saving ONLY into the 64KB of RAM, for the monitor only, same as writing in (already always activated in writing, 'cause obviously we cant write into the ROM :D). Into the emulated C64 we can continue to use BASIC, KERNAL etc.without problems.

Example pratical with LOAD & SAVE (by monitor)
LOAD (already implemented :D):

L"*" 08
Loading * from 0801
to B512 (ad11 bytes)
(from $A000 to $B512, the data are written into the RAM under the BASIC ROM)

MEMORY DUMP (actual):
M A000
(C:$e5cf) m A000

C:a000 94 e3 7b e3 43 42 4d 42 ..{.CBMB
C:a008 41 53 49 43 30 a8 41 a7 ASIC0.A.
C:a010 1d ad f7 a8 a4 ab be ab ........
C:a018 80 b0 05 ac a4 a9 9f a8 ........
C:a020 70 a8 27 a9 1c a8 82 a8 p.'.....
C:a028 d1 a8 3a a9 2e a8 4a a9 ..:...J.
C:a030 2c b8 67 e1 55 e1 64 e1 ,.g.U.d.
(we see only the BASIC ROM)

MR a000 (command to implement for viewing the RAM):

C:a000 82 82 00 00 82 82 01 0a ........
C:a008 00 bd eb bd eb bd bd fa ........
C:a010 fa e1 e4 e1 e4 e1 e1 c8 ........
C:a018 c8 84 8d 84 8d 84 84 ff ........
C:a020 ff a1 ac a1 ac a1 a1 a9 ........
C:a028 a9 1a 13 a7 c8 6f 26 d9 .....o&.
C:a030 46 24 7e cd e8 ad 0d 10 F$~.....

same for D and DR you don't really have to know how it work, right? ;)

In these conditions, if I'll save the file like (we don't have to save the last byte)

s"TEST" 08 0801 b511 <--- we need to use capital character... I don't know why
in this way the "TEST" program don't work, 'cause from $a000 to $b512 we will save the BASIC ROM and not the RAM.

I ask something like this:

sr"TEST" 08 0801 b511
note the SR (not S) command. This will save the RAM under the ROMs, then we'll have a perfect digital copy of the program loaded before, without changing the 6510 registry ;)

Obviously, SR MR and DR are examples, you can call it as you wish, or add an option or a parameter to S / M / R commands...

I hope my request it's clear (my English isn't so good), otherwise please ask and I'll try to explain more.
Thank you so much :)

Discussion

  • Moiree
    Moiree
    2013-06-22

    I think you can do this with the BANK monitor command, it will not affect the C64 emulation, only your view of it in the monitor. No?
    <preformatted text,="" please?="">
    (C:$e5cf) bank
    Available banks (some may be equivalent to others):
    default *cpu ram rom io cart
    (C:$e5cf) m a000

    C:a000 94 e3 7b e3 43 42 4d 42 41 53 49 43 30 a8 41 a7 ..{.CBMBASIC0.A.
    C:a010 1d ad f7 a8 a4 ab be ab 80 b0 05 ac a4 a9 9f a8 ................
    C:a020 70 a8 27 a9 1c a8 82 a8 d1 a8 3a a9 2e a8 4a a9 p.'.......:...J.
    C:a030 2c b8 67 e1 55 e1 64 e1 b2 b3 23 b8 7f aa 9f aa ,.g.U.d...#.....
    C:a040 56 a8 9b a6 5d a6 85 aa 29 e1 bd e1 c6 e1 7a ab V...]...).....z.
    C:a050 41 a6 39 bc cc bc 58 bc 10 03 7d b3 9e b3 71 bf A.9...X...}...q.
    C:a060 97 e0 ea b9 ed bf 64 e2 6b e2 b4 e2 0e e3 0d b8 ......d.k.......
    C:a070 7c b7 65 b4 ad b7 8b b7 ec b6 00 b7 2c b7 37 b7 |.e.........,.7.
    C:a080 79 69 b8 79 52 b8 7b 2a ba 7b 11 bb 7f 7a bf 50 yi.yR.{.{...z.P
    (C:$a090) bank ram
    (C:$a090) m
    C:a090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C:a0a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C:a0b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C:a0c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
    C:a0d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
    C:a0e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
    C:a0f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
    C:a100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    C:a110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    (C:$a120) bank
    Available banks (some may be equivalent to others):
    default cpu *ram rom io cart
    (C:$a120) help bank

    Syntax: bank [<memspace>] [bankname]

    If bankname is not given, print the possible banks for the memspace.
    If bankname is given set the current bank in the memspace to the given
    bank.

     
  • gpz
    gpz
    2013-06-23

    • status: open --> pending
     
  • gpz
    gpz
    2013-06-23

    what you are looking for is the "bank" command

    bank ram
    s "dump" 0 0800 f000

    saves all RAM from 0800-f000

     
  • Massi cadenti
    Massi cadenti
    2013-06-23

    Yes this was exactly what I mean ;) thank you