Alter Ego
Re: Alter Ego
Does Uzeamp plays the songs ok?
Can you try setting the bootloader in game start first then cycle the power to see what happens?
Can you try setting the bootloader in game start first then cycle the power to see what happens?
Re: Alter Ego
Yes, 0.
D3thAdd3r wrote:I will check on this when I get home tomorrow, but I might need help verifying as I gave away my 256mB card. Which error number are you getting, 0?
Re: Alter Ego
Yes, Uzeamp plays just fine.
Interesting! I did what you suggested setting boot to game, and it still gives the same "SD ERROR: 0" at
first, then it pauses, clears the screen, and the game starts! Very odd. With boot set to menu, it just gives the
error and goes back to the main menu.
So it would appear the game can be made to work, despite the error.
Thanks,
Mark
Interesting! I did what you suggested setting boot to game, and it still gives the same "SD ERROR: 0" at
first, then it pauses, clears the screen, and the game starts! Very odd. With boot set to menu, it just gives the
error and goes back to the main menu.
So it would appear the game can be made to work, despite the error.
Thanks,
Mark
uze6666 wrote:Does Uzeamp plays the songs ok?
Can you try setting the bootloader in game start first then cycle the power to see what happens?
Re: Alter Ego
That is rather interesting, but I'm afraid I don't know enough to be sure what the cause is. One possibility, as you can see in the code snippet a few posts back, is to increase the retries when mounting fails. This code below explains why you would see it fail, 3 seconds stall, then clear screen(and luckily run). Basically what that means is, somehow, doing a SoftReset() makes it mount next time it runs?!phiber wrote: I did what you suggested setting boot to game, and it still gives the same "SD ERROR: 0" at
first, then it pauses, clears the screen, and the game starts!
Code: Select all
void SDCrash(uint8_t err){
ResetSprites();
StopSong();
AEClearVram();
AEPrintByte(20,12,err,0);
AEPrintBigRam(11,11,"SD ERROR?");
DDRC = 255;
WaitVsync(180);
SoftReset();
}
- Attachments
-
- ALTEREGO.UZE
- (60.02 KiB) Downloaded 499 times
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: Alter Ego
Using the emulator I can see the "SD ERROR" message if the .bin file doesn't exist. However, sometimes I won't get the error but I also will get minimal graphics as well. This only happens if there are other files in the directory such as the Tornado2000 .lvl file.
That is probably more of an emulator bug though.
That is probably more of an emulator bug though.
Re: Alter Ego
The bootloader may be the culprit, but I looked at it a couple time and it's hard to find out what's going on. I'll have another look and try to reinitialize the sd card and correctly de-assert it after flashing the rom and jumping to the game.
Btw, how hard is it to create new levels? Do you have notes on the format of the data file?
Btw, how hard is it to create new levels? Do you have notes on the format of the data file?
Re: Alter Ego
An editor is probably necessary, it would take time to get familiar with how level bytes relate to map tiles, but nothing overly complex. The tables of interest are in "aedefines.h" nameduze6666 wrote:Btw, how hard is it to create new levels? Do you have notes on the format of the data file?
Code: Select all
const uint8_t MapTileTable[] PROGMEM"(a linear list of how map bytes relate to actual tile indices, for each of the 5 tile sets)
const uint8_t IsForegroundTile[] PROGMEM"(bit table, each bit(MSB&MSb first) is directly related to corresponding vram indiex)
const uint8_t tileType[] PROGMEM"(1 byte directly related to vram indices for tile properties like ladder, solid, kill, etc).
Once I was up to speed with the manual "screen shot->hex editor" process, I spent an average maybe 20-30 focused minutes per level, keeping in mind my goal was %100 replication with no creative additions. If an editor existed, I think anyone could build the same episode I did without needing to know the inner workings, probably faster. The best way to understand the level data is to open up the data file in a hex editor, set your columns width to 32 characters, and go to offset 0xd5e0. You will be at the first byte of the first level "HELLO WORLD" . The first 32 bytes of each level is always the header with this format:
Code: Select all
header[0...27] = name of level, 0x20 is space, terminate the string with '?'
header[28] = song to play
header[29] = tile set to use(try changing just this, it works out nice generally!)
header[30] = number of exchanges
header[31] = sync type(vertical or horizontal alter ego)
Objects are specified with "magic numbers" that are >= 0xA0, player start is always "0xFF". Looking at LoadLevel() is better than words to explain that part. If you change the byte at offset 0xd7a5(which should be 0xa4) to 0xa7 you will turn the enemy on the first level into a leftward moving alter skull(player can walk through it, but it kills if it touches your alter ego). There are only 8 types of enemies, or rather 2 types of enemies with 4 possible moving directions(skull/alter skull, up, down, left, right) Other values will be pixels items, etc. The recorded demo format is simple, but the current code that saves it to eeprom is admittedly very bad and I wouldn't base anything off that because you need to manually fix timings quite frequently. It is 1 byte for the state of the pad with another byte for the number of frames to hold that state.
Re: Alter Ego
Thanks for the info, very interesting. Seems pretty easy to do a level by hand, admittedly a level editor would be pretty cool. It's one thing I'd like to work on when I get more time.
Re: Alter Ego
You could make Alter Ego 2 much easier with an editor and I think many people would enjoy it just to play around with their own levels. AE2(ZX Spectrum only, and I believe actually a better game than the first) screenshots do not match up resolution or graphics wise so it's so hard to count tiles and keeping everything in your head without actual visual feedback besides just hex. Not that I am against doing it personally in the semi-distant future, but I have no foreseeable plan for it and would love to see the sequel get ported by you just as well.
As currently compiled, the game has only ~500 bytes of flash free. Eliminate all intro/logo/title/ending code and title/ending music and you would probably have about ~6k free minus whatever pff needs to write SD(and the task perhaps harder than writing the editor, Uzem support for SD writing ) Using the rest of the existing code for in editor level testing should be straight forward work. I was considering it might be better to have all new tiles, but that would take some research and conversion since the speccy version is the only graphics available to use.
Edit---- Yet another option to make another whole game out of it is to port the levels from the PC version. The game map is slightly more tiles wide and they occasionally use a sliding pixel, but it seems most levels could be slightly altered to be narrower and play the same. The sliding pixel I don't recall every adding much to the gameplay, just an eye candy thing like the fancy lighting and stuff they have there.
As currently compiled, the game has only ~500 bytes of flash free. Eliminate all intro/logo/title/ending code and title/ending music and you would probably have about ~6k free minus whatever pff needs to write SD(and the task perhaps harder than writing the editor, Uzem support for SD writing ) Using the rest of the existing code for in editor level testing should be straight forward work. I was considering it might be better to have all new tiles, but that would take some research and conversion since the speccy version is the only graphics available to use.
Edit---- Yet another option to make another whole game out of it is to port the levels from the PC version. The game map is slightly more tiles wide and they occasionally use a sliding pixel, but it seems most levels could be slightly altered to be narrower and play the same. The sliding pixel I don't recall every adding much to the gameplay, just an eye candy thing like the fancy lighting and stuff they have there.
Re: Alter Ego
I guess a compliment is due here
I played this game through, and all I can say it just works perfectly. The animations and all the graphics are nice and pleasant, the game responds well to controls, and its feature of saving is also just all right, simple and efficient for the user. The way of using the SD card also seems smoothly done, all the while keeping size small, by impression just right for the content (of course by no doubt some wild crunching could be done on it, maybe hindered though by the lack of RAM, but it is simply not necessary). For me as of now this game feels like one of the best things done for the console! And it is definitely a good little game, would worth more content! What it already has is fun, some levels really took time and though to figure out, but still I managed it all in a few hours without ever playing any variation of Alter Ego. Hope the engine is capable to handle more!
I played this game through, and all I can say it just works perfectly. The animations and all the graphics are nice and pleasant, the game responds well to controls, and its feature of saving is also just all right, simple and efficient for the user. The way of using the SD card also seems smoothly done, all the while keeping size small, by impression just right for the content (of course by no doubt some wild crunching could be done on it, maybe hindered though by the lack of RAM, but it is simply not necessary). For me as of now this game feels like one of the best things done for the console! And it is definitely a good little game, would worth more content! What it already has is fun, some levels really took time and though to figure out, but still I managed it all in a few hours without ever playing any variation of Alter Ego. Hope the engine is capable to handle more!