Search found 786 matches
- Wed Apr 04, 2012 6:30 am
- Forum: Sound
- Topic: z80 init and sound effect playback
- Replies: 11
- Views: 8458
z80_driver.bin is any compiled Z80 code that you going to use as driver. This code only loads the driver, however, you also will need a bit of similar code to pass parameters to the driver, instead of loop you'll have to do few pokes that will put the parameters into certain locations of the Z80 RAM...
- Tue Apr 03, 2012 6:30 pm
- Forum: Sound
- Topic: z80 init and sound effect playback
- Replies: 11
- Views: 8458
You don't need any special code to init the Z80, it is just few register writes - busreq on, fill Z80 RAM with your code, reset Z80, busreq off. You probably can easily do it with pokes in BEX, or, if there are some alignment problems, with few inline move opcodes that will act like pokes. Something...
- Fri Mar 30, 2012 2:16 pm
- Forum: Blabla
- Topic: Developping on arcade hardware?
- Replies: 2
- Views: 3481
- Wed Mar 28, 2012 12:01 pm
- Forum: Demos
- Topic: Axelay scroll proof of concept
- Replies: 17
- Views: 19468
- Tue Mar 27, 2012 4:43 pm
- Forum: Tools
- Topic: VGM Music Maker
- Replies: 93
- Views: 77738
- Sat Mar 24, 2012 6:59 pm
- Forum: Megadrive/Genesis
- Topic: Efficient C Question: Global variables
- Replies: 17
- Views: 12039
- Sat Mar 24, 2012 3:46 pm
- Forum: Megadrive/Genesis
- Topic: Efficient C Question: Global variables
- Replies: 17
- Views: 12039
It would be interesting to test a simple time-wasting loop that uses few variables as counters, and check if there is difference when these variables are local and global. I mean, something like unsigned short cnt1; unsigned long cnt2,cnt3; for(cnt1=0;cnt1<50000;++cnt1) { for(cnt2=0;cnt2<10000;++cnt...
- Fri Mar 23, 2012 12:06 pm
- Forum: Megadrive/Genesis
- Topic: Efficient C Question: Global variables
- Replies: 17
- Views: 12039
Good start. The tearing is probably because you see scroll offsets too late. You need to organize the code in a way that you only do VRAM/VDP parameters updates at VBlank time, and everything else, including preparation of the data for the updates in remaining time. Like: Wait for vblank Set scroll ...
- Fri Mar 16, 2012 2:37 am
- Forum: SGDK
- Topic: GFX_WRITE_VRAM_ADDR is expensive? (was: code benchmarking)
- Replies: 19
- Views: 12721
- Thu Mar 15, 2012 2:56 am
- Forum: SGDK
- Topic: GFX_WRITE_VRAM_ADDR is expensive? (was: code benchmarking)
- Replies: 19
- Views: 12721
These aren't calls, actually, as you can see there is nothing that could be that slow: #define GFX_WRITE_VRAM_ADDR(adr) ((0x4000 + ((adr) & 0x3FFF)) << 16) + (((adr) >> 14) | 0x00) #define TILE_ATTR(pal, pri, flipV, flipH) (((flipH) << 11) + ((flipV) << 12) + ((pal) << 13) + ((pri) << 15)) So probab...
- Wed Mar 14, 2012 11:34 pm
- Forum: Megadrive/Genesis
- Topic: Code benchmarking techniques?
- Replies: 14
- Views: 11090
Not a big deal to sacrifice Z80 for a debug build. However, why not simply modify an emulator and add a profiler? I.e. a write to a not existing reg starts a counter, a write to other reg stops it, and the value is displayed with OSD. It done this way in few debugging NES emulators, measurement is d...
- Tue Mar 13, 2012 11:12 pm
- Forum: Blabla
- Topic: General 68000 Discussion Forum?
- Replies: 3
- Views: 4117
- Mon Mar 12, 2012 3:26 pm
- Forum: Megadrive/Genesis
- Topic: Best practices for writing C on 68000?
- Replies: 3
- Views: 3611
Many C optimization tricks are CPU-independent, so you may check these two pages, they are about CC65 compiler and 6502: 1 , 2 . However, it is a good idea to test some of the tricks and check assembly output, because in your enviroment one tricks could be effective, while other aren't too effective...
- Sat Feb 25, 2012 3:03 pm
- Forum: Demos
- Topic: Axelay scroll proof of concept
- Replies: 17
- Views: 19468