Search found 23 matches
- Thu Dec 10, 2020 4:58 am
- Forum: Programming
- Topic: ML Optimization discussion (split from: ROM calls and other tricks)
- Replies: 21
- Views: 4100
Re: ML Optimization discussion (split from: ROM calls and other tricks)
Yeah, I use the DEX/BPL loop pretty frequently. I learned it from some KERNAL code. The important thing about this optimization is that X must start between $00-$80 (because X is decremented before the first check). You can't use this technique to iterate over an entire page, for example. For doing...
- Thu Nov 05, 2020 9:43 am
- Forum: Programming
- Topic: ML Optimization discussion (split from: ROM calls and other tricks)
- Replies: 21
- Views: 4100
Re: ML Optimization tips and tricks
[..] [..] Operations without temporarily save the accumulator to memory: To subtract the value in A from location's value ( (mem)-A ) use EOR #$FF; SEC; ADC mem (negate A with two's complement and simply add). Merge some bits from A into a memory location using EOR mem; AND #mask_bits_taken_from_ac...
- Sat Oct 24, 2020 11:07 am
- Forum: Programming
- Topic: ML Optimization discussion (split from: ROM calls and other tricks)
- Replies: 21
- Views: 4100
Re: ML Optimization discussion (split from: ROM calls and other tricks)
For all points or just the ones I added?
- Sat Oct 24, 2020 9:02 am
- Forum: Programming
- Topic: ROM calls and other tricks
- Replies: 33
- Views: 104244
Re: ML Optimization tips and tricks
Remove NOP’s [...] This list could be extended by Hold flag in bit 7 of a location, so you can check the flag by "BIT flag" followed by "BMI/BPL destination" keeping A untouched, clear the flag with "LSR flag". If carry is set by an condition before, use "ROR flag...
- Thu Oct 03, 2019 3:14 pm
- Forum: Programming
- Topic: V-FORTH - Forth-83 for the VIC
- Replies: 302
- Views: 144674
Re: V-FORTH - Forth-83 for the VIC
Well done with the curve plotting. I started a hires pixel vocabulary just before I went on holiday. Where did you get the sine table from? I want to add a maths vocabulary but I couldn't find a fixed point implementation when I looked a while ago. Anyone who likes Perl might be happy with this: pe...
- Fri Aug 23, 2019 10:43 am
- Forum: Programming
- Topic: Waiting routine in assembly
- Replies: 3
- Views: 4550
Re: Waiting routine in assembly
I am stuck with a problem. In my game, which I write in assembler, I have to slow down the speed, which is also flexible. However, this routine sometimes interferes with the joystick query. How can I solve this without interrupt? In case you are using a delay routine which only burns cpu cycles it ...
- Tue Apr 09, 2019 3:36 pm
- Forum: Other Systems
- Topic: Any love for the TRS-80 Color Computer?
- Replies: 17
- Views: 19063
Re: Any love for the TRS-80 Color Computer?
What I can tell you; all from memory. [..] It has an unusual CPU; not Z-80 series. [..] There is an O.S. produced for the later version of the machine that still has a small hobbyist following. [..] To be more specific, the CPU used in the Coco is the well known 6809. For sure, not that spread like...
- Sun Mar 31, 2019 7:57 am
- Forum: Programming
- Topic: Divide 16-bit value by 8-bit constant
- Replies: 2
- Views: 3852
Re: Divide 16-bit value by 8-bit constant
[..] LDA #0 LDX #16 .loop ASL zp ROL zp+1 ROL A CMP #xx BCC skip SBC #xx INC zp .skip DEX BNE loop zp and zp+1 contain the 16-bit value to be divided, and the result afterwards. The 8-bit divisor constant is encoded in the immediate fields of CMP #xx and SBC #xx . The remainder ends up in the Accum...
- Sat Mar 30, 2019 6:01 pm
- Forum: Programming
- Topic: My BASIC Roguelike
- Replies: 7
- Views: 10685
Re: My BASIC Roguelike
I like loop constructions preventing absolute jumps. It's also nice to melt together the exit decision branch and the one for the loop's back-jump ... not here, but maybe in other situations a matter of efficiency. *=$1300 start LDX #$0 BEQ getchar cycle JSR $FFD2 INX getchar LDA hworld,X BNE cycle ...
- Sun Sep 23, 2018 4:59 am
- Forum: Other Systems
- Topic: CMD Super CPU
- Replies: 4
- Views: 6796
Re: CMD Super CPU
Does anyone know if there was any way to load/save code that was in any bank other than bank 0. There exist monitor programs for the SCPU, which can access the entire RAM, so it should be possible, yes. I want to recommend Jammon (Jamaica Monitor) http://www.ffd2.com/fridge/jammon/ It has some issu...
- Sun Jun 24, 2018 7:11 am
- Forum: Programming
- Topic: V-FORTH - Forth-83 for the VIC
- Replies: 302
- Views: 144674
Re: V-FORTH - Forth-83 for the VIC
Thanks a lot, Simon!
BTW, will you provide a link to the ZIP for distribution or upload the image here again?
Johann
BTW, will you provide a link to the ZIP for distribution or upload the image here again?
Johann
- Sat Jun 23, 2018 3:19 pm
- Forum: Programming
- Topic: V-FORTH - Forth-83 for the VIC
- Replies: 302
- Views: 144674
Re: V-FORTH - Forth-83 for the VIC
Thanks for reporting this, I did pick up a number of bug fixes I found on 6502.org but I don't recall seeing this one mentioned. I think this is the correct change to handle both the missing carry set and switch to use a relative jump Thanks Simon for the quick response. As I remember Mike Barry's ...
- Sat Jun 23, 2018 8:00 am
- Forum: Programming
- Topic: V-FORTH - Forth-83 for the VIC
- Replies: 302
- Views: 144674
Re: V-FORTH - Forth-83 for the VIC
In addition to the previous one might replace the final JMP by a BCS which is in this case always taken. 272 THEN, BOT SBC, SEC 2+ STA, SEC 3 + LDA, BOT 1+ SBC, 273 L442 JMP, could be written as 272 THEN, BOT SBC, SEC 2+ STA, SEC 3 + LDA, BOT 1+ SBC, 273 L442 HERE 2- CS NOT C, C, This saves the byte...
- Sat Jun 23, 2018 7:17 am
- Forum: Programming
- Topic: V-FORTH - Forth-83 for the VIC
- Replies: 302
- Views: 144674
Re: V-FORTH - Forth-83 for the VIC
[..] I meant to mention, the source and build can be downloaded from http://eden.mose.org.uk/vforth.git Great stuff, nice work! FIG Forth which this Forth is based on has historically a lot of bugs. Couple of weeks ago I went through the U/ or UM/MOD field and looked for implementations in various ...
- Tue Apr 10, 2018 5:11 pm
- Forum: General Topics
- Topic: Vic-20 vs Plus/4 (and C64 vs Plus/4)
- Replies: 12
- Views: 13787
Re: Vic-20 vs Plus/4 (and C64 vs Plus/4)
I wrote these comparisons between the Plus/4 and the Vic-20 and C64 a few months ago. I have now translated them from Swedish into English. Here you go: English: Plus/4 vs Vic-20: http://www.boray.se/commodore/plus4-vic20-eng.pdf Plus/4 vs C64: http://www.boray.se/commodore/plus4-c64-eng.pdf Just w...