View Single Post
Old 03 March 2022, 21:36   #55
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 185
With command >e we get the content from all custom registers.
If I want rip the state, for instance the color regs for a programm
it is very laborious to convert them.

So, I wrote I small processing sketch that converts the output
from command >e to dc's. (a usefull command for this could be: >er)

Code:
08C COPINS      0000    180 COLOR00     005A
08E DIWSTRT     0581    182 COLOR01     0FFF
090 DIWSTOP     40C1    184 COLOR02     0002
to
Code:
dc.w  $180,$005A ; COLOR00
dc.w  $182,$0FFF ; COLOR01
dc.w  $184,$0002 ; COLOR02
Code:
String[] text_File_lines = loadStrings("HW-regs.txt");
String[] text1 = new String[114]; String[] text2 = new String[114]; 
String[] text3 = new String[114]; String[] text4 = new String[114];
String[] text5 = new String[114]; String[] text6 = new String[114];
//----------------------------------------------------------------- 
println("HWregs:"); // 000 BLTDDAT     0000    106 BPLCON3     0C00 
for (int j= 0; j < text_File_lines.length; j++) {
  text1[j]=text_File_lines[j].substring(0, 3);    // 000  
  text2[j]=text_File_lines[j].substring(4, 11);   // BLTDDAT
  text3[j]=text_File_lines[j].substring(16, 20);  // 0000  
  text4[j]=text_File_lines[j].substring(24, 27);  // 106  
  text5[j]=text_File_lines[j].substring(28, 35);  // BPLCON3 
  text6[j]=text_File_lines[j].substring(40, 44);  // 0C00
}
for (int j= 0; j < text_File_lines.length; j++) {
  println("dc.w  $"+text1[j]+",$"+text3[j]+" ; "+text2[j]); }

for (int j= 0; j < text_File_lines.length; j++) {
  println("dc.w  $"+text4[j]+",$"+text6[j]+" ; "+text5[j]); }
Rock'n Roll is offline  
 
Page generated in 0.04432 seconds with 11 queries