You don't need a sed script to replace SKIP, just a MACRO.
True, good point.
SKIP is semantically different from NOPP, in that NOPP always encodes 2 words, with the 2nd word ignored. SKIP is used for skipping a single-word instruction unconditionally, like INCR PC would, only without horking the flags. You'd break the code if you replaced SKIP with NOPP, as that would end up inserting an unwanted $0000 into your ROM.
Ahh, OK. So this might explain why I used the DECLE rather than a NOPP. The decle in the ROM is definitely $208 and when writing my post I just thought that using a DECLE was me being stupid and lazy. So I looked up the opcode, bingo, NOPP. Looking at the occurences of SKIP in the disassembly of WCB now it looks like they are post call data (do these constructs have a proper name?), for example this looks like it might be writing the message "walk" to the screen:
JSR R5, G_1ED5 ; 63B3 0004 011C 02D5
JSR R5, L_5241 ; 63B6 0004 0150 0241
SKIP ; 63B9 0208
RLC R3, 2 ; 63BA 0057
SWAP R1, 1 ; 63BB 0041
SLL R0, 2 ; 63BC 004C
SLL R3, 1 ; 63BD 004B
DECLE $0000 ; 63BE 0000
JSR R5, L_6489 ; 63BF 0004 0164 0089
And as such the correct interpretation is, as you say, a DECLE statement, not NOPP. This does vaguely ring a bell now. Apologies for the misinformation.
As for the sed command that replaces G_xxxx and L_xxxx labels with $xxxx labels: You really only want to do that with the G_xxxx labels. The L_xxxx labels should all be defined in the body of the code. If you want to make any modifications that shift things around, you want the L_xxxx labels to move with the code. That still won't find all addresses embedded in data structures, but it at least will help with branches and calls.
Yup that was me being lazy, kind of
In this instance because of what I was doing I wanted to have minimal change. So I was using the absolute addresses as a check against my accidentally shifting something. You are correct in the more general case only changing the G_xxxx labels is the way to go
Edited by decle, Tue Sep 19, 2017 5:22 AM.