Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tetris.gt1 doesn't run with 64K and VCF.rom #37

Closed
kervinck opened this issue Aug 10, 2018 · 4 comments
Closed

tetris.gt1 doesn't run with 64K and VCF.rom #37

kervinck opened this issue Aug 10, 2018 · 4 comments
Labels
Milestone

Comments

@kervinck
Copy link
Owner

kervinck commented Aug 10, 2018

VCF.rom with built-in tetris.gt1 doesn't load in 64K. It loads ok with 32K.
Interestingly, it loads and runs fine with 32K that has 64K faked by clearing address 1.
The VCF ROM has a hacked SYS_Exec_88, because tetris.gt1 has a first segment that overlaps.

(Also Loader itself has issues in JS emulation with the VCF.rom, also in 32K. It might be specific to the VCF.rom, as it has added text on-screen. Strange, but perhaps not important)

VCF.rom.zip

@kervinck kervinck added this to the ROM v3 milestone Aug 10, 2018
@kervinck
Copy link
Owner Author

kervinck commented Aug 10, 2018

Segments look fine (except for the first zero-page segment).
It runs on 64K system with ROMv2 (in JS emulation and over Loader).
So probably the hacked ROM loader only works for 32K.

:Loading 80 bytes at $A0
:Loading 240 bytes at $200
:Loading 113 bytes at $300
:Loading 154 bytes at $400
:Loading 140 bytes at $500
:Loading 12 bytes at $600
:Loading 64 bytes at $8A1
:Loading 16 bytes at $8E0
:Loading 64 bytes at $9A1
:Loading 64 bytes at $AA1
:Loading 64 bytes at $BA1
:Loading 64 bytes at $CA1
:Loading 64 bytes at $DA1
:Loading 64 bytes at $EA1
:Loading 4 bytes at $FA1
:Loading 18 bytes at $FA6
:Loading 79 bytes at $15A1
:Loading 50 bytes at $16A1
:Loading 74 bytes at $17A1
:Loading 55 bytes at $18A1
:Loading 76 bytes at $19A1
:Loading 89 bytes at $1AA1
:Loading 86 bytes at $1BA1
:Loading 91 bytes at $1CA1
:Loading 68 bytes at $1DA1
:Loading 78 bytes at $1EA1
:Loading 62 bytes at $1FA1
:Loading 28 bytes at $20A1
:Loading 94 bytes at $21A1
:Loading 89 bytes at $22A1
:Loading 54 bytes at $23A1
:Loading 68 bytes at $24A1
:Loading 89 bytes at $25A1
:Loading 27 bytes at $26A1
:Loading 93 bytes at $27A1
:Loading 88 bytes at $28A1
:Loading 90 bytes at $29A1
:Loading 47 bytes at $2AA1
:Loading 53 bytes at $2BA1
:Loading 30 bytes at $2CA1
:Loading 42 bytes at $2DA1
:Loading 77 bytes at $2EA1
:Loading 76 bytes at $2FA1
:Loading 76 bytes at $30A1
:Loading 6 bytes at $31A1
:Loading 50 bytes at $34A1
:Loading 93 bytes at $35A1
:Loading 90 bytes at $36A1
:Loading 91 bytes at $37A1
:Loading 90 bytes at $38A1
:Loading 90 bytes at $39A1
:Loading 89 bytes at $3AA1
:Loading 90 bytes at $3BA1
:Loading 91 bytes at $3CA1
:Loading 89 bytes at $3DA1
:Loading 91 bytes at $3EA1
:Loading 89 bytes at $3FA1
:Loading 90 bytes at $40A1
:Loading 90 bytes at $41A1
:Loading 61 bytes at $42A1
:Loading 93 bytes at $43A1
:Loading 91 bytes at $44A1
:Loading 89 bytes at $45A1
:Loading 90 bytes at $46A1
:Loading 91 bytes at $47A1
:Loading 89 bytes at $48A1
:Loading 91 bytes at $49A1
:Loading 89 bytes at $4AA1
:Loading 90 bytes at $4BA1
:Loading 90 bytes at $4CA1
:Loading 90 bytes at $4DA1
:Loading 90 bytes at $4EA1
:Loading 91 bytes at $4FA1
:Loading 90 bytes at $50A1
:Loading 89 bytes at $51A1
:Loading 90 bytes at $52A1
:Loading 91 bytes at $53A1
:Loading 90 bytes at $54A1
:Loading 89 bytes at $55A1
:Loading 90 bytes at $56A1
:Loading 90 bytes at $57A1
:Loading 90 bytes at $58A1
:Loading 90 bytes at $59A1
:Loading 17 bytes at $5AA1
:Loading 93 bytes at $5BA1
:Loading 90 bytes at $5CA1
:Loading 90 bytes at $5DA1
:Loading 90 bytes at $5EA1
:Loading 90 bytes at $5FA1
:Loading 91 bytes at $60A1
:Loading 90 bytes at $61A1
:Loading 90 bytes at $62A1
:Loading 90 bytes at $63A1
:Loading 89 bytes at $64A1
:Loading 90 bytes at $65A1
:Loading 90 bytes at $66A1
:Loading 91 bytes at $67A1
:Loading 89 bytes at $68A1
:Loading 90 bytes at $69A1
:Loading 90 bytes at $6AA1
:Loading 90 bytes at $6BA1
:Loading 90 bytes at $6CA1
:Loading 90 bytes at $6DA1
:Loading 91 bytes at $6EA1
:Loading 32 bytes at $6FA1
:Loading 93 bytes at $70A1
:Loading 91 bytes at $71A1
:Loading 89 bytes at $72A1
:Loading 91 bytes at $73A1
:Loading 90 bytes at $74A1
:Loading 89 bytes at $75A1
:Loading 90 bytes at $76A1
:Loading 90 bytes at $77A1
:Loading 90 bytes at $78A1
:Loading 49 bytes at $79A1
:Loading 48 bytes at $7AA1
:Loading 48 bytes at $7BA1
:Loading 48 bytes at $7CA1
:Loading 48 bytes at $7DA1
:Loading 48 bytes at $7EA1
:Loading 7 bytes at $7FA1
:Loading 7 bytes at $7FA8
:Loading 3 bytes at $7FAF
:Loading 3 bytes at $7FB2
:Executing from $200

@kervinck
Copy link
Owner Author

Root cause is the "+0x80" hack to make zero-page loading work with the ROM loader of ROMv1. This can be removed however: the ROM loader of ROM v2 doesn't need this hack.

@kervinck
Copy link
Owner Author

VCFv2.rom.zip

@kervinck
Copy link
Owner Author

kervinck commented Aug 10, 2018

The Loader issue in the JS emulation is caused by the tight delay in the emulator when waiting for loader to start. It waits for 60 frames, but ~65 are required for the VCF ROM: it writes some more text to the screen.

loader.js:
this.pressButton(BUTTON_A, 1, 65)

kervinck added a commit that referenced this issue Nov 30, 2019
The dissassembly file can show comments when they are injected with
the C() function. But this is a bit ugly: it is harder to read in
the .py source than regular comments, while regular annotations
don't show up in the .asm file. This leads to two views on the code.
That isn't helpful.

A much better solution is to produce an old-fashioned listing of
the source code, along with the assembly result on the left. This
is possible with the Python inspect module!

Change: Replace .asm output files with .lst files.

For dev.rom, we now have the Python source lines listed in dev.lst.
Almost all C(xxx) calls could be eliminated between enableListing()
and disableListing().

The justification for the explicit enable/disable (instead of "always
on") is that introspection is rather slow. >90% of the ROM file is
storage area generated from the same macro. With that, looking up
the line number for each word in the storage area, and then deciding
that it was already listed, is very slow..

(Note: This can be remedied with more refactoring that eliminates
the _linenos[] list. Maybe later...)

The transition is quite a bit of work, so for the older ROM files
we don't change the output (for now).

Snippet from dev.lst:
-----------------------------------------------------------------------------------
              0b2d fc32  bra  .sysSb#38   3062  bra('.sysSb#38')                #36
              0b2e de00  st   [y,x++]     3063  st([Y,Xpp])                     #37
                                          3064  label('.sysSb#35')
.sysSb#35:    0b2f 0200  nop              3065  wait(38-35)                     #35
              0b30 0200  nop
              0b31 0200  nop
                                          3066  label('.sysSb#38')
.sysSb#38:    0b32 0124  ld   [$24]       3067  ld([sysArgs+0])                 #38
              0b33 2001  anda $01         3068  anda(1)                         #39
-----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant