mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-01-13 16:32:42 +00:00
Original BrainBoard card
This commit is contained in:
parent
e17033329d
commit
f0f8d6448e
@ -51,11 +51,13 @@ func (at *apple2Tester) getText80() string {
|
||||
return screen.RenderTextModeString(at.a, true, false, false, at.a.isApple2e)
|
||||
}
|
||||
|
||||
func buildTerminateConditionCycles(cycles uint64) terminateConditionFunc {
|
||||
return func(a *Apple2) bool {
|
||||
return a.cpu.GetCycles() > cycles
|
||||
/*
|
||||
func buildTerminateConditionCycles(cycles uint64) terminateConditionFunc {
|
||||
return func(a *Apple2) bool {
|
||||
return a.cpu.GetCycles() > cycles
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
const textCheckInterval = uint64(100_000)
|
||||
|
||||
|
@ -73,7 +73,7 @@ func newCardBrainBoardBuilder() *cardBuilder {
|
||||
} else if bank == "down" {
|
||||
c.isBankB = true
|
||||
} else {
|
||||
return nil, fmt.Errorf("Invalid bank '%s', must be up or down", bank)
|
||||
return nil, fmt.Errorf("invalid bank '%s', must be up or down", bank)
|
||||
}
|
||||
|
||||
dips, err := paramsGetDIPs(params, "dips", 8)
|
||||
|
@ -29,6 +29,8 @@ func TestBrainBoardCardWozaniam(t *testing.T) {
|
||||
}
|
||||
at.run()
|
||||
|
||||
at.terminateCondition = buildTerminateConditionText(at, "_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@", false, 100_000)
|
||||
|
||||
text := at.getText()
|
||||
if !strings.Contains(text, "_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@_@") {
|
||||
t.Errorf("Expected screen filled with _@_@', got '%s'", text)
|
||||
@ -38,9 +40,7 @@ func TestBrainBoardCardWozaniam(t *testing.T) {
|
||||
func TestBrainBoardCardIntegerBasic(t *testing.T) {
|
||||
at := buildBrainBoardTester(t, "brainboard,switch=down")
|
||||
|
||||
at.terminateCondition = func(a *Apple2) bool {
|
||||
return a.cpu.GetCycles() > 10_000_000
|
||||
}
|
||||
at.terminateCondition = buildTerminateConditionText(at, "APPLE ][\n>", false, 1_000_000)
|
||||
at.run()
|
||||
|
||||
text := at.getText()
|
||||
|
Loading…
x
Reference in New Issue
Block a user