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

0-Row Sprites #72

Closed
12Me21 opened this issue Nov 1, 2017 · 3 comments
Closed

0-Row Sprites #72

12Me21 opened this issue Nov 1, 2017 · 3 comments

Comments

@12Me21
Copy link

12Me21 commented Nov 1, 2017

I was using DXY0 as a simple method to create a single frame of delay, but Octo assumes this is the Super Chip instruction, which draws a 16 pixel sprite instead.

@JohnEarnest
Copy link
Owner

After extensive consideration, I've decided to avoid creating a new feature flag for this. Drawing a 1-pixel tall blank sprite with the vblank flag enabled will achieve your desired effect provided you can find a zero byte anywhere in your program, which should be trivial to arrange.

@tobiasvl
Copy link
Contributor

tobiasvl commented Jan 6, 2020

@JohnEarnest Note that this behavior is (as far as I can gather) unique to Octo, which means that games written with Octo as a target platform that use DXY0 to draw a 16x16 sprite in low-resolution mode will not work in anything but Octo. (Your own "Eaty the Alien" comes to mind.)

Considering the number of games out there that use DXY0 as a delay routine is probably zero (at least now that 12Me21 has been dissuaded from doing it), that in itself might not be a reason to add a feature/quirks flag to Octo, but in fact the CHIP-8 interpreter for the DREAM 6800 computer used DXY0 to draw an 8x16 sprite.

So there are three different low-resolution behaviors of DXY0 that I know of: 8x16 sprite drawing (DREAM 6800), 16x16 sprite drawing (Octo) and no-op with a "vblank delay" (most/all other implementations),

@JohnEarnest
Copy link
Owner

@tobiasvl the compromise I came up with was to make it so that the linter warns of using 16x16 sprites in low-res mode:

https://github.com/JohnEarnest/Octo/blob/gh-pages/js/debugger.js#L210-L212

Thus, authors are assisted in writing portable programs if they wish to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants