diff options
author | Paul Duncan <pabs@pablotron.org> | 2018-06-21 20:13:04 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2018-06-21 20:13:04 -0400 |
commit | a41aa781303b1ffb4923c3728f5b0dc7e022add4 (patch) | |
tree | 0b166aa1e5f5c64bd693092d5faed4ee69c9f7f2 /gen.rb | |
parent | 827be7304a4c40b6465951e55195caab1d666f86 (diff) | |
download | gb-c-a41aa781303b1ffb4923c3728f5b0dc7e022add4.tar.bz2 gb-c-a41aa781303b1ffb4923c3728f5b0dc7e022add4.zip |
add auto-pc handling, implement pc for ops
Diffstat (limited to 'gen.rb')
-rwxr-xr-x | gen.rb | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -26,6 +26,13 @@ DATA['ops'].each do |set_id, ops| op['cat'], ] else + # pc_expr + pc_expr = if op['pc'] + 'cpu_ww(ctx, RW_PC, old_pc + %d);' % [op['len']] + else + '' + end + # time expr time_expr = case op['time'] when Numeric @@ -41,6 +48,7 @@ DATA['ops'].each do |set_id, ops| [ "case 0x%s: /* op: \"%s\", cat: \"%s\" */", " %s", # action_expr + " %s", # pc_expr " %s", # time_expr " break;" ].join("\n") % [ @@ -48,6 +56,7 @@ DATA['ops'].each do |set_id, ops| op['id'], op['cat'], op['code'] || 'not_implemented(ctx, old_pc, op);', + pc_expr, time_expr, ] end |