Search found 145 matches

by yaros
Thu Aug 29, 2019 12:34 pm
Forum: NESdev
Topic: VRC5
Replies: 43
Views: 19919

Re: VRC5

CaH4e3 wrote:can I have a full version of nes lizard as reward, please? ;)
Only when you update this wiki page http://wiki.nesdev.com/w/index.php/VRC5 :) (joking)
by yaros
Tue Aug 13, 2019 3:29 pm
Forum: Newbie Help Center
Topic: Do you/does it make sense to imitate function calls?
Replies: 18
Views: 7527

Re: Do you/does it make sense to imitate function calls?

I did try this approach, but eventually stripped it due for it being slow. I made a set of macroses to manage it. It will require you to use X to keep stack pointer, but when you need to use X, it gets messy. Anyway, below is the macro code and example for ca65, if you want to play with it. There ar...
by yaros
Fri May 10, 2019 1:53 pm
Forum: NESdev
Topic: Strategies for generating Mesen label files
Replies: 11
Views: 6615

Re: Strategies for generating Mesen label files

For this reason, I decided to not generate Mesen label files directly, but instead export a generic label file with all the information I do keep track of and is relevant to the assembly process, and create an external script that'll convert that into Mesen's format (and possibly other emulators to...
by yaros
Fri May 10, 2019 11:41 am
Forum: NESdev
Topic: A simple optimization
Replies: 23
Views: 11422

Re: A simple optimization

The idea of the "RTS trick" (also known as jump table) in this context makes perfect sense, you have 4 highly optimized sprite mazing routines for all 4 orders. However that's not what I had in mind. The idea was just to use normal indexed mode. The LDX $xxxx,Y or LDY $xxxx,Y instructions would be ...
by yaros
Fri May 10, 2019 8:09 am
Forum: NESdev
Topic: A simple optimization
Replies: 23
Views: 11422

Re: A simple optimization

EDIT: OK I now read the code. I think if you have 4 or less sprites sequences, (i.e. the total length is 256 or less bytes), you should not use indirect adressing to access the sequences, as this is a pure waste of time. This by itself will save more cycles than unrolling of any amount. I'm definit...
by yaros
Thu May 09, 2019 10:38 am
Forum: NESdev
Topic: A simple optimization
Replies: 23
Views: 11422

Re: A simple optimization

Now thinking about it, you have ROM to spare, you can unroll clear loop completely and only clear remaining sprites even with cycling. Something like that. FinishSprites: ; load the last available sprite ldy currentSpriteId ; jump to the appropriate label jsr FinishSpritesJump ; just to avoid copy-p...
by yaros
Thu May 09, 2019 10:16 am
Forum: NESdev
Topic: A simple optimization
Replies: 23
Views: 11422

Re: A simple optimization

I don't think you can unroll the clear/finish loop if you implement blinking using shuffle arrays. Your sprite data is going to be all over the place. But you can still only clear the rest of the sprites you did not use. ; Warning. Code is written in place, not tested. But I hope it explains what I ...
by yaros
Tue Apr 23, 2019 10:59 am
Forum: NESdev
Topic: KickC BETA
Replies: 4
Views: 7681

Re: KickC BETA

I looked over the C documentation, I did not see support for banks that are often used for NES. Am I correct? From my understanding, even if I compile two banks as separate binaries, I would have to extract and use hardcoded address to reference data/subroutines between the bank1 and bank2. There is...
by yaros
Tue Mar 05, 2019 9:13 am
Forum: Homebrew Projects
Topic: I come bearing SEO for your cc65/ca65 open source projects
Replies: 8
Views: 10781

Re: I come bearing SEO for your cc65/ca65 open source projec

I only have this useless thing done, although I'm not sure it is worth adding it to the list :)
by yaros
Fri Feb 22, 2019 10:53 am
Forum: Newbie Help Center
Topic: Guidance for creating a pong game (New here)
Replies: 52
Views: 22470

Re: Guidance for creating a pong game (New here)

Weren't you using ASM6? Yes although I needed to do this (Below) You are not using asm6, you are using cc65 :) It is different assembler/compiler. You can download asm6 here: http://3dscapture.com/NES/asm6.zip (the version from the nesdev wiki, I'm not sure if I should advise the fork, as I don't u...
by yaros
Tue Feb 19, 2019 7:51 pm
Forum: Homebrew Projects
Topic: Untitled adventure game, Milestone 2: Basic gameplay
Replies: 18
Views: 15175

Re: Untitled adventure game, Milestone 2: Basic gameplay

bleubleu wrote: I hope this example can make it clear how easy it is to output this king of bytecode as you parse. Interpreting this is super easy, simple jump table, and a 32-byte array for your "RAM".
It does well, thank you.
by yaros
Tue Feb 19, 2019 10:34 am
Forum: Homebrew Projects
Topic: Untitled adventure game, Milestone 2: Basic gameplay
Replies: 18
Views: 15175

Re: Untitled adventure game, Milestone 2: Basic gameplay

In assembly, bytecode is implemented as a simple jump table. each opcode will fetch the arguments it needs and do whatever it needs to do. I allocate a small "heap" of 32-byte for the script. This includes global variable, local variables, temporary variables. Temporary variables are needed for thi...
by yaros
Mon Feb 18, 2019 7:15 pm
Forum: Homebrew Projects
Topic: Untitled adventure game, Milestone 2: Basic gameplay
Replies: 18
Views: 15175

Re: Untitled adventure game, Milestone 2: Basic gameplay

I love it, I love the graphics too. Can you provide more details on the code generation of your script language?
by yaros
Fri Feb 15, 2019 7:28 pm
Forum: Homebrew Projects
Topic: Brainfuck compiler and VM
Replies: 2
Views: 4935

Re: Brainfuck compiler using ca65 macroses

Too bad, ca65 macroses are too slow to be useful (I should say abused). As soon as I started doing small optimizations, execution time decreased dramatically, so I rewrote compiler to C#. I also changed compilation from jsr opcode to opcodes with jumptable to save space. It runs slower, but now it c...
by yaros
Fri Feb 15, 2019 10:37 am
Forum: Newbie Help Center
Topic: Scroll glitch while turning of PPU right after NMI
Replies: 13
Views: 5275

Re: Scroll glitch while turning of PPU right after NMI

You don't need to reset it. If FrameCounter contains $38 before you wait for vblank, then $38 gets loaded into A. The loop continues until FrameCounter becomes no longer $38. Oops... I should have paid more attention. Thank you tepples! This is very clever way to do so. So the screen shot shows rig...