rubygb 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -3
- data/Rakefile +6 -1
- data/lib/galp/{ibmpx1.inc → ibmpc1.inc} +0 -0
- data/lib/rubygb/cli.rb +2 -1
- data/lib/rubygb/rubygb.rb +12 -3
- data/lib/rubygb/template/template.rb +1 -1
- data/lib/rubygb/version.rb +1 -1
- data/rubygb.gemspec +1 -1
- metadata +17 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2002f6eab608799d468baf2b37c82997c22c044
|
4
|
+
data.tar.gz: 07bf5ace57f0feadd5f97c3b6d22754f0d93827c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 000926f76cc444a467baaa3ebc656d454d057acbe6357a46ed4560f13d8da0e4fc3402a8d87e40decbaac4bfd6f271043f0ff189f53e796fb93ed2b55b9bac9c
|
7
|
+
data.tar.gz: 37f4426f6e0d1cee6aaef241b0cf80252ba12f28c8db36cca4899e54fb3453d88e099e2b7c32f019300a2b62531f703ed17bfdab11e8a14138135ad47cc34cfc
|
data/README.md
CHANGED
@@ -35,6 +35,13 @@ $ gameboyemulator --open you.gb
|
|
35
35
|
|
36
36
|
![despite everything, it's still you](wiki-images/you.gif)
|
37
37
|
|
38
|
+
## Goals
|
39
|
+
* other platform support
|
40
|
+
* bundle an emulator
|
41
|
+
* tools
|
42
|
+
* image converter
|
43
|
+
|
44
|
+
|
38
45
|
## Awesomeness
|
39
46
|
|
40
47
|
All the cool parts are from other people
|
@@ -43,6 +50,3 @@ All the cool parts are from other people
|
|
43
50
|
* [gameboy assembly language primer (galp)](http://www.devrs.com/gb/docs.php) - devrs.com
|
44
51
|
|
45
52
|
|
46
|
-
## MIT License
|
47
|
-
|
48
|
-
Copyright (C) 2016 Donald Hutchison <donaldhutchison.info>. Released under the MIT license.
|
data/Rakefile
CHANGED
@@ -12,7 +12,7 @@ info = "#{gemspec.name} | #{gemspec.version} | " \
|
|
12
12
|
# Gem build and install task
|
13
13
|
|
14
14
|
desc info
|
15
|
-
task :gem do
|
15
|
+
task :gem => :check_debug do
|
16
16
|
puts info + "\n\n"
|
17
17
|
print " "; sh "gem build #{gemspec_file}"
|
18
18
|
FileUtils.mkdir_p 'pkg'
|
@@ -20,6 +20,11 @@ task :gem do
|
|
20
20
|
puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
|
21
21
|
end
|
22
22
|
|
23
|
+
desc "Check for debug code"
|
24
|
+
task :check_debug do
|
25
|
+
raise "you left in some stupid debug stuff" if system("grep -irl binding\.pry lib") or system(%(grep -irl -e 'require.*pry' lib))
|
26
|
+
end
|
27
|
+
|
23
28
|
|
24
29
|
# # #
|
25
30
|
# Start an IRB session with the gem loaded
|
File without changes
|
data/lib/rubygb/cli.rb
CHANGED
@@ -4,7 +4,8 @@ require 'fileutils'
|
|
4
4
|
module Rubygb
|
5
5
|
class CLI < Thor
|
6
6
|
desc 'build FILENAME', 'attempt to assemble, link + fix FILENAME and create a gb rom from it'
|
7
|
-
option :no_fix, :
|
7
|
+
option :no_fix, type: :boolean, desc: 'skip header fixing'
|
8
|
+
option :output, desc: 'dir to put all build files'
|
8
9
|
def build filename
|
9
10
|
Rubygb.build filename, options
|
10
11
|
end
|
data/lib/rubygb/rubygb.rb
CHANGED
@@ -4,14 +4,23 @@ module Rubygb
|
|
4
4
|
raise "Fatal: can't find #{filename}"
|
5
5
|
end
|
6
6
|
|
7
|
+
if options[:output]
|
8
|
+
Dir.mkdir(options[:output]) unless Dir.exists? options[:output]
|
9
|
+
end
|
10
|
+
|
7
11
|
base = File.basename(filename, ".*")
|
8
12
|
exe_path = File.expand_path(File.join(File.dirname(__FILE__),"..","rgbds"))
|
9
13
|
|
10
|
-
|
11
|
-
|
14
|
+
obj_file, map_file, sym_file, rom_file = %w(.obj .map .sym .gb).map do |ext|
|
15
|
+
options[:output] ? File.join(options[:output], "#{base}#{ext}") : "#{base}#{ext}"
|
16
|
+
end
|
17
|
+
|
18
|
+
raise "Assembly failed!" unless system("#{exe_path}/rgbasm -v -o#{obj_file} #{filename}")
|
19
|
+
|
20
|
+
raise "Link failed!" unless system("#{exe_path}/rgblink -m#{map_file} -n#{sym_file} -o#{rom_file} #{obj_file}")
|
12
21
|
|
13
22
|
unless options[:no_fix]
|
14
|
-
raise "Header fix failed!" unless system("#{exe_path}/rgbfix -p0 -v #{
|
23
|
+
raise "Header fix failed!" unless system("#{exe_path}/rgbfix -p0 -v #{rom_file}")
|
15
24
|
end
|
16
25
|
end
|
17
26
|
end
|
data/lib/rubygb/version.rb
CHANGED
data/rubygb.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
|
20
20
|
gem.required_ruby_version = "~> 2.0"
|
21
21
|
gem.add_development_dependency "rake"
|
22
|
-
gem.add_development_dependency "pry-byebug"
|
22
|
+
gem.add_development_dependency "pry-byebug", "~> 3"
|
23
23
|
|
24
24
|
gem.add_runtime_dependency "thor", "~> 0.19"
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Hutchison
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: pry-byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,7 +71,7 @@ files:
|
|
71
71
|
- Rakefile
|
72
72
|
- bin/rubygb
|
73
73
|
- lib/galp/gbhw.inc
|
74
|
-
- lib/galp/
|
74
|
+
- lib/galp/ibmpc1.inc
|
75
75
|
- lib/galp/memory.inc
|
76
76
|
- lib/rgbds/LICENSE
|
77
77
|
- lib/rgbds/rgbasm
|
@@ -96,6 +96,17 @@ files:
|
|
96
96
|
- scrap/example/hello-world-with-comments.sym
|
97
97
|
- scrap/example/ibmpc1.inc
|
98
98
|
- scrap/example/memory.asm
|
99
|
+
- scrap/gbhw.inc
|
100
|
+
- scrap/hello-sprite-good-delay.asm
|
101
|
+
- scrap/hello-sprite-no-interrupts.asm
|
102
|
+
- scrap/hello-sprite-no-interrupts.gb
|
103
|
+
- scrap/hello-sprite-no-interrupts.map
|
104
|
+
- scrap/hello-sprite-no-interrupts.obj
|
105
|
+
- scrap/hello-sprite-no-interrupts.sym
|
106
|
+
- scrap/hello-sprite.asm
|
107
|
+
- scrap/hello-sprite.inc
|
108
|
+
- scrap/ibmpc1.inc
|
109
|
+
- scrap/memory.asm
|
99
110
|
- scrap/tester/lib/gbhw.inc
|
100
111
|
- scrap/tester/lib/ibmpx1.inc
|
101
112
|
- scrap/tester/lib/memory.inc
|