zemu 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/zemu/instance.rb +4 -4
  3. data/lib/zemu.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e21eb92ebce3eb8f03d9a17ddaec4f857989216a673791267602c0eb848319c7
4
- data.tar.gz: 3ff049b8e132ae33a3376f21768378f06d6bd59b8f5014b81ede14f50e37eda6
3
+ metadata.gz: 7d5844a8eefff0375ee504c0b00d2348fcd4b4c0f0a745c62b3a85048525d7fd
4
+ data.tar.gz: d48dffdd9ce6213cd674e091e56bacb12afd8f7d212cd0c6443f870b34d3c096
5
5
  SHA512:
6
- metadata.gz: 34706fc39b8212b6b3a07e077f5cd63479550e1832509bb01f742f86928c8c79844ce9689d4a11d79a2664d4ac13c6433f8a502b8806bf5e3390110009a27237
7
- data.tar.gz: 74082dc5aad00935a79f3af11db3b288179015ddce3ce4cbd96439771cd1bce4377f08cc069c23574474942dc4ba5dff736c44cc7cc263df0a6a007e715a6fe0
6
+ metadata.gz: c790425ce48e7b88bc2f9c4d03eb9113b039cadde64ec1f171fe5ec8b120efdd3951d00ad23d96426bd2e77af85638babdc7844d8c1bd9fe00ab68f3574e9808
7
+ data.tar.gz: 97d8e53911049e9dde8eb816ff0c8635d061901dc7e672fbaf653464f434d9fd0840250b8504f724408f281ae6431dea1441300ab820afb289eae764c755d8d1
data/lib/zemu/instance.rb CHANGED
@@ -65,7 +65,7 @@ module Zemu
65
65
 
66
66
  @state = RunState::UNDEFINED
67
67
 
68
- @breakpoints = []
68
+ @breakpoints = {}
69
69
  end
70
70
 
71
71
  # Returns the clock speed of this instance in Hz.
@@ -161,7 +161,7 @@ module Zemu
161
161
 
162
162
  # If the PC is now pointing to one of our breakpoints,
163
163
  # we're in the BREAK state.
164
- if (@breakpoints.select { |b| b == pc }.size) > 0
164
+ if @breakpoints[pc]
165
165
  @state = RunState::BREAK
166
166
  elsif @wrapper.zemu_debug_halted()
167
167
  @state = RunState::HALTED
@@ -177,7 +177,7 @@ module Zemu
177
177
  # @param type The type of breakpoint:
178
178
  # * :program => Break when the program counter hits the address given.
179
179
  def break(address, type)
180
- @breakpoints << address
180
+ @breakpoints[address] = true
181
181
  end
182
182
 
183
183
  # Remove a breakpoint of the given type at the given address.
@@ -186,7 +186,7 @@ module Zemu
186
186
  # @param address The address of the breakpoint to be removed.
187
187
  # @param type The type of breakpoint. See Instance#break.
188
188
  def remove_break(address, type)
189
- @breakpoints.reject! { |b| b == address }
189
+ @breakpoints[address] = false
190
190
  end
191
191
 
192
192
  # Returns true if the CPU has halted, false otherwise.
data/lib/zemu.rb CHANGED
@@ -128,7 +128,7 @@ module Zemu
128
128
 
129
129
  includes_str += " -I" + autogen
130
130
 
131
- command = "#{compiler} -Werror -Wno-unknown-warning-option -fPIC -shared -Wl,-undefined -Wl,dynamic_lookup #{includes_str} #{defines_str} -o #{output} #{inputs_str}"
131
+ command = "#{compiler} -O2 -Werror -Wno-unknown-warning-option -fPIC -shared -Wl,-undefined -Wl,dynamic_lookup #{includes_str} #{defines_str} -o #{output} #{inputs_str}"
132
132
 
133
133
  # Run the compiler and generate a library.
134
134
  return system(command)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zemu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Valentine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-03-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Zemu is a gem which allows the user to configure a Z80-based system