Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
Fixing copy and setting pixels.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessefreeman committed Oct 28, 2020
1 parent 3fad259 commit 4b78a17
Show file tree
Hide file tree
Showing 27 changed files with 196 additions and 257 deletions.
2 changes: 1 addition & 1 deletion Content/PixelVisionOS/Tools/BootTool/boot-text.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ message = " " .. SystemName() ..
"\n\n\n" ..
"The " .. SystemName() .. " is built on top of the open source Pixel Vision SDK thanks to the following sponsors: " ..
"Jan Rochat and Ethan Shaughnessy" ..
"\n\n\n\n" ..
"\n\n" ..
"Learn more at pixelvision8.com"
2 changes: 1 addition & 1 deletion Content/PixelVisionOS/Tools/BootTool/code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local nextScreenDelay = .3
local nextScreenTime = 0
local startDelay = .5
local ready = false
local bottomBorder = 224 + 8
local bottomBorder = 232
local safeMode = false
local showPlugin = -1

Expand Down
4 changes: 2 additions & 2 deletions Content/PixelVisionOS/Tools/BootTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"DisplayChip":
{
"width": 264,
"height": 248,
"width": 256,
"height": 240,
"overscanX": 1,
"overscanY": 1,
"layers": 6
Expand Down
4 changes: 2 additions & 2 deletions Content/PixelVisionOS/Tools/ErrorTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"DisplayChip":
{
"width": 264,
"height": 248,
"width": 256,
"height": 240,
"overscanX": 1,
"overscanY": 1,
"layers": 6
Expand Down
4 changes: 2 additions & 2 deletions Content/PixelVisionOS/Tools/LoadTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"DisplayChip":
{
"width": 264,
"height": 248,
"width": 256,
"height": 240,
"overscanX": 1,
"overscanY": 1,
"layers": 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 248
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 0
Expand Down Expand Up @@ -68,14 +61,6 @@ gpuChips = {
name = "displayHeightInputData",
value = 240
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},
{
name = "drawsInputData",
value = 64
Expand Down Expand Up @@ -169,14 +154,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 192
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 64
Expand Down Expand Up @@ -282,14 +260,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 152
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 40
Expand Down Expand Up @@ -370,14 +341,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 136
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 0
Expand Down Expand Up @@ -426,14 +390,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 72
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 0
Expand Down Expand Up @@ -467,14 +424,7 @@ gpuChips = {
name = "displayHeightInputData",
value = 208
},
{
name = "overscanRightInputData",
value = 1
},
{
name = "overscanBottomInputData",
value = 1
},

{
name = "drawsInputData",
value = 0
Expand Down
80 changes: 40 additions & 40 deletions Disks/PixelVisionOS/System/Tools/ChipEditor/code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -314,42 +314,42 @@ function Init()
table.insert(inputFields, displayHeightInputData)


local overscanSize = gameEditor:OverscanBorder()

overscanRightInputData = editorUI:CreateInputField({x = 96, y = 208, w = 8}, tostring(overscanSize.x), "Crops a column (8 px) from the right of the display.", "number")
overscanRightInputData.min = 0
overscanRightInputData.max = 4
overscanRightInputData.onAction = function(value)

local size = gameEditor:OverscanBorder()

gameEditor:OverscanBorder(tonumber(value), tonumber(overscanBottomInputData.text))

ChangeChipGraphic(1, "chipcustomgpu" )

InvalidateData()

end

table.insert(inputFields, overscanRightInputData)


overscanBottomInputData = editorUI:CreateInputField({x = 120, y = 208, w = 8}, tostring(overscanSize.y), "Crops a row (8 px) from the bottom of the display.", "number")
overscanBottomInputData.min = 0
overscanBottomInputData.max = 4
overscanBottomInputData.onAction = function(value)

local size = gameEditor:OverscanBorder()

gameEditor:OverscanBorder(tonumber(overscanRightInputData.text), tonumber(value))

ChangeChipGraphic(1, "chipcustomgpu" )

InvalidateData()

end

table.insert(inputFields, overscanBottomInputData)
--local overscanSize = gameEditor:OverscanBorder()
--
--overscanRightInputData = editorUI:CreateInputField({x = 96, y = 208, w = 8}, tostring(overscanSize.x), "Crops a column (8 px) from the right of the display.", "number")
--overscanRightInputData.min = 0
--overscanRightInputData.max = 4
--overscanRightInputData.onAction = function(value)
--
-- local size = gameEditor:OverscanBorder()
--
-- gameEditor:OverscanBorder(tonumber(value), tonumber(overscanBottomInputData.text))
--
-- ChangeChipGraphic(1, "chipcustomgpu" )
--
-- InvalidateData()
--
--end
--
--table.insert(inputFields, overscanRightInputData)
--
--
--overscanBottomInputData = editorUI:CreateInputField({x = 120, y = 208, w = 8}, tostring(overscanSize.y), "Crops a row (8 px) from the bottom of the display.", "number")
--overscanBottomInputData.min = 0
--overscanBottomInputData.max = 4
--overscanBottomInputData.onAction = function(value)
--
-- local size = gameEditor:OverscanBorder()
--
-- gameEditor:OverscanBorder(tonumber(overscanRightInputData.text), tonumber(value))
--
-- ChangeChipGraphic(1, "chipcustomgpu" )
--
-- InvalidateData()
--
--end
--
--table.insert(inputFields, overscanBottomInputData)


drawsInputData = editorUI:CreateInputField({x = 144, y = 208, w = 24}, tostring(gameEditor:MaxSpriteCount()), "Caps the total spites on the screen. Zero removes the limit.", "number")
Expand Down Expand Up @@ -684,8 +684,8 @@ function OnSelectChip(value)

editorUI:TextEditorInvalidateBuffer(displayWidthInputData)
editorUI:TextEditorInvalidateBuffer(displayHeightInputData)
editorUI:TextEditorInvalidateBuffer(overscanRightInputData)
editorUI:TextEditorInvalidateBuffer(overscanBottomInputData)
--editorUI:TextEditorInvalidateBuffer(overscanRightInputData)
--editorUI:TextEditorInvalidateBuffer(overscanBottomInputData)
editorUI:TextEditorInvalidateBuffer(drawsInputData)

editorUI:TextEditorInvalidateBuffer(cpsInputData)
Expand Down Expand Up @@ -963,8 +963,8 @@ function Update(timeDelta)
if(runnerName ~= DrawVersion) then
editorUI:UpdateInputField(displayWidthInputData)
editorUI:UpdateInputField(displayHeightInputData)
editorUI:UpdateInputField(overscanRightInputData)
editorUI:UpdateInputField(overscanBottomInputData)
--editorUI:UpdateInputField(overscanRightInputData)
--editorUI:UpdateInputField(overscanBottomInputData)
editorUI:UpdateInputField(drawsInputData)
else
editorUI:UpdateInputField(spritePagesInputData)
Expand Down
4 changes: 2 additions & 2 deletions Disks/PixelVisionOS/System/Tools/ChipEditor/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"DisplayChip":
{
"width":264,
"height":248,
"width":256,
"height":240,
"overscanX":1,
"overscanY":1,
"layers":6
Expand Down
4 changes: 2 additions & 2 deletions Disks/PixelVisionOS/System/Tools/DrawTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"DisplayChip":
{
"width":264,
"height":248,
"width":256,
"height":240,
"overscanX":1,
"overscanY":1,
"layers":6
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/FontTool/data.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ColorChip":{"maxColors":128,"backgroundColor":0,"maskColor":"#FF00FF","unique":false,"debug":false,},"DisplayChip":{"width":264,"height":248,"overscanX":1,"overscanY":1,"layers":6},"FontChip":{},"GameChip":{"lockSpecs":false,"maxSize":256,"saveSlots":8},"MusicChip":{"totalSongs":1,"notesPerTrack":127,"totalPatterns":8,"totalLoop":8},"SoundChip":{"totalChannels":4,"totalSounds":8,"channelTypes":[-1,-1,-1,-1]},"SpriteChip":{"maxSpriteCount":0,"unique":true,"spriteWidth":8,"spriteHeight":8,"pages":4,"cps":8},"TilemapChip":{"columns":36,"rows":32,"totalFlags":16,"autoImport":false,}}
{"ColorChip":{"maxColors":128,"backgroundColor":0,"maskColor":"#FF00FF","unique":false,"debug":false,},"DisplayChip":{"width":256,"height":240,"overscanX":1,"overscanY":1,"layers":6},"FontChip":{},"GameChip":{"lockSpecs":false,"maxSize":256,"saveSlots":8},"MusicChip":{"totalSongs":1,"notesPerTrack":127,"totalPatterns":8,"totalLoop":8},"SoundChip":{"totalChannels":4,"totalSounds":8,"channelTypes":[-1,-1,-1,-1]},"SpriteChip":{"maxSpriteCount":0,"unique":true,"spriteWidth":8,"spriteHeight":8,"pages":4,"cps":8},"TilemapChip":{"columns":36,"rows":32,"totalFlags":16,"autoImport":false,}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 512, "backgroundColor": 0, "maskColor": "#FF00FF", "unique": false, "debug": true, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": false, "maxSize": 256, "saveSlots": 8 },
"MusicChip": { "totalSongs": 16, "notesPerTrack": 127, "totalPatterns": 16, "totalLoop": 16 },
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/InfoTool/data.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ColorChip":{"maxColors":128,"backgroundColor":5,"maskColor":"#FF00FF","unique":false,"debug":false,},"DisplayChip":{"width":264,"height":248,"overscanX":1,"overscanY":1,"layers":6},"FontChip":{},"GameChip":{"lockSpecs":false,"maxSize":512,"saveSlots":8},"MusicChip":{"totalSongs":16,"notesPerTrack":127,"totalPatterns":24,"totalLoop":24},"SoundChip":{"totalChannels":5,"totalSounds":32,"channelTypes":[-1,-1,-1,-1,-1]},"SpriteChip":{"maxSpriteCount":0,"unique":true,"spriteWidth":8,"spriteHeight":8,"pages":8,"cps":8},"TilemapChip":{"columns":36,"rows":32,"totalFlags":16,"autoImport":false,}}
{"ColorChip":{"maxColors":128,"backgroundColor":5,"maskColor":"#FF00FF","unique":false,"debug":false,},"DisplayChip":{"width":256,"height":240,"overscanX":1,"overscanY":1,"layers":6},"FontChip":{},"GameChip":{"lockSpecs":false,"maxSize":512,"saveSlots":8},"MusicChip":{"totalSongs":16,"notesPerTrack":127,"totalPatterns":24,"totalLoop":24},"SoundChip":{"totalChannels":5,"totalSounds":32,"channelTypes":[-1,-1,-1,-1,-1]},"SpriteChip":{"maxSpriteCount":0,"unique":true,"spriteWidth":8,"spriteHeight":8,"pages":8,"cps":8},"TilemapChip":{"columns":36,"rows":32,"totalFlags":16,"autoImport":false,}}
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/InstallerTool/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 128, "backgroundColor": 5, "maskColor": "#FF00FF", "unique": false, "debug": false, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": false, "maxSize": 512, "saveSlots": 8 },
"MusicChip": { "totalSongs": 16, "notesPerTrack": 127, "totalPatterns": 24, "totalLoop": 24 },
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/MusicTool/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 256, "backgroundColor": 0, "maskColor": "#FF00FF", "unique": false, "debug": false, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": false, "maxSize": 512, "saveSlots": 32 },
"MusicChip": { "totalSongs": 32, "notesPerTrack": 127, "totalPatterns": 24, "totalLoop": 24 },
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/SFXTool/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 192, "backgroundColor": 0, "maskColor": "#FF00FF", "unique": false, "debug": false, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": false, "maxSize": 357, "saveSlots": 8 },
"MusicChip": { "totalSongs": 16, "notesPerTrack": 127, "totalPatterns": 8, "totalLoop": 8 },
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/SettingsTool/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 128, "backgroundColor": 0, "maskColor": "#FF00FF", "unique": false, "debug": false, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": true, "maxSize": 512, "saveSlots": 8 },
"MusicChip": { "totalSongs": 16, "notesPerTrack": 127, "totalPatterns": 24, "totalLoop": 24 },
Expand Down
2 changes: 1 addition & 1 deletion Disks/PixelVisionOS/System/Tools/TextEditorTool/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ColorChip": { "maxColors": 256, "backgroundColor": 0, "maskColor": "#FF00FF", "unique": false, "debug": false, },
"DisplayChip": { "width": 264, "height": 248, "overscanX": 1, "overscanY": 1, "layers": 6 },
"DisplayChip": { "width": 256, "height": 240, "overscanX": 1, "overscanY": 1, "layers": 6 },
"FontChip": {},
"GameChip": { "lockSpecs": false, "maxSize": 256, "saveSlots": 8 },
"MusicChip": { "totalSongs": 16, "notesPerTrack": 127, "totalPatterns": 16, "totalLoop": 16 },
Expand Down
4 changes: 2 additions & 2 deletions Disks/PixelVisionOS/System/Tools/TilemapTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
},
"DisplayChip":
{
"width":264,
"height":248,
"width":256,
"height":240,
"overscanX":1,
"overscanY":1,
"layers":6
Expand Down
4 changes: 2 additions & 2 deletions Disks/PixelVisionOS/System/Tools/WorkspaceTool/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"DisplayChip":
{
"width":264,
"height":248,
"width":256,
"height":240,
"overscanX":1,
"overscanY":1,
"layers":6
Expand Down
16 changes: 8 additions & 8 deletions SDK/Editor/Editors/GameEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,14 @@ public Point DisplaySize(int? width = null, int? height = null)
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
public Point OverscanBorder(int? x, int? y)
{
if (x.HasValue) displayChip.OverscanX = x.Value;

if (y.HasValue) displayChip.OverscanY = y.Value;

return new Point(displayChip.OverscanX, displayChip.OverscanY);
}
// public Point OverscanBorder(int? x, int? y)
// {
// if (x.HasValue) displayChip.OverscanX = x.Value;
//
// if (y.HasValue) displayChip.OverscanY = y.Value;
//
// return new Point(displayChip.OverscanX, displayChip.OverscanY);
// }


public void RedrawDisplay()
Expand Down

0 comments on commit 4b78a17

Please sign in to comment.